-
Notifications
You must be signed in to change notification settings - Fork 75
feat: Deploy PermissionSplitter via forge #412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
900f4d2
Create PermissionSplitter.sol
nicholaspai 6a7b703
add permission splitter examples
nicholaspai 079eb78
Update PermissionSplitter.sol
nicholaspai f308f6f
Update PermissionSplitter.sol
nicholaspai e9d3e7e
WIP
mrice32 c7afc5d
WIP
mrice32 f096eb6
Add tests
mrice32 fe2fe48
WIP
mrice32 8908e4e
WIP
mrice32 bd55498
add events
mrice32 536ad19
wip foundry tests
nicholaspai de9fb35
Merge branch 'permissions-splitter' into npai/permission-splitter-test
nicholaspai 904f336
Update PermissionSplitter.t.sol
nicholaspai af8716b
Delete forge-std
nicholaspai aaa0877
Revert "Delete forge-std"
nicholaspai 338545e
Remove hardhat-foundry
nicholaspai b45aaf8
add test
nicholaspai 06aea0e
Merge branch 'master' into npai/permission-splitter-test
nicholaspai 90c361e
Merge branch 'master' into npai/permission-splitter-test
nicholaspai a173463
Update PermissionSplitter.t.sol
nicholaspai 887295b
Respond to matt comments
nicholaspai 70c36e1
add more unit tests: transferring ownership back to default admin, mo…
nicholaspai 31d12dc
Update PermissionSplitter.t.sol
nicholaspai 08834ed
feat: Deploy PermissionSplitter via forge
nicholaspai 707eb36
Merge branch 'master' into npai/deploy-permission-splitter
nicholaspai 46203dc
remove
nicholaspai bc0f305
Update PermissionSplitter.t.sol
nicholaspai 7af65d2
Update PermissionSplitter.t.sol
nicholaspai 332143d
Update script/DeployPermissionSplitterProxy.s.sol
nicholaspai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
97 changes: 97 additions & 0 deletions
97
broadcast/DeployPermissionSplitterProxy.s.sol/1/dry-run/run-1706197795.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| { | ||
| "transactions": [ | ||
| { | ||
| "hash": null, | ||
| "transactionType": "CREATE", | ||
| "contractName": "PermissionSplitterProxy", | ||
| "contractAddress": "0x0Bf07B2e415F02711fFBB32491f8ec9e5489B2e7", | ||
| "function": null, | ||
| "arguments": ["0xc186fA914353c44b2E33eBE05f21846F1048bEda"], | ||
| "transaction": { | ||
| "type": "0x02", | ||
| "from": "0x9a8f92a830a5cb89a3816e3d267cb7791c16b04d", | ||
| "gas": "0x117c51", | ||
| "value": "0x0", | ||
| "data": "0x60806040818152346200041c578162001290803803809162000022828562000421565b83396020938491810103126200041c57516001600160a01b03811691908290036200041c57600092838052838152818420338552815260ff828520541615620003d3575b838052838152818420338552815260ff828520541615620000c75750600280546001600160a01b0319168317905551917f814250a3b8c79fcbe2ead2c131c952a278491c8f4322a79fe84b5040a810373e9080a2610dc79081620004a98239f35b81519390925033906001600160401b036060860181811187821017620003bf578452602a86528486019284368537865115620002cf5760308453865190600191821015620003ab576078602189015360295b8281116200033c57506200030b578290855192608084019084821090821117620002f757865260428352868301936060368637835115620002e357603085538351821015620002e35790607860218501536041915b81831162000270575050506200023f57926200020c6048620001fc979462000231946044989785519a8b93620001d28b86019a7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008c5251809260378801906200045b565b8401917001034b99036b4b9b9b4b733903937b6329607d1b6037840152518093868401906200045b565b0103602881018952018762000421565b5194859362461bcd60e51b85526004850152518092816024860152858501906200045b565b601f01601f19168101030190fd5b60648585519062461bcd60e51b82528060048301526024820152600080516020620012708339815191526044820152fd5b909192600f81166010811015620002cf576f181899199a1a9b1b9c1cb0b131b232b360811b901a620002a3858762000480565b5360041c928015620002bb576000190191906200016e565b634e487b7160e01b82526011600452602482fd5b634e487b7160e01b83526032600452602483fd5b634e487b7160e01b81526032600452602490fd5b634e487b7160e01b85526041600452602485fd5b60648686519062461bcd60e51b82528060048301526024820152600080516020620012708339815191526044820152fd5b90600f8116601081101562000397576f181899199a1a9b1b9c1cb0b131b232b360811b901a6200036d838b62000480565b5360041c90801562000383576000190162000119565b634e487b7160e01b85526011600452602485fd5b634e487b7160e01b86526032600452602486fd5b634e487b7160e01b84526032600452602484fd5b634e487b7160e01b83526041600452602483fd5b8380528381528184203385528152818420600160ff198254161790553333857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a462000066565b600080fd5b601f909101601f19168101906001600160401b038211908210176200044557604052565b634e487b7160e01b600052604160045260246000fd5b60005b8381106200046f5750506000910152565b81810151838201526020016200045e565b90815181101562000492570160200190565b634e487b7160e01b600052603260045260246000fdfe60806040526004361015610018575b3661062057610620565b60003560e01c806301ffc9a7146100d85780631dbcb538146100d3578063248a9ca3146100ce5780632f2ff15d146100c957806336568abe146100c457806377da6060146100bf57806382127da1146100ba57806391d14854146100b5578063a217fddf146100b0578063ac9650d8146100ab578063d4b83992146100a65763d547741f0361000e5761059f565b610576565b61050c565b610446565b6103f4565b6103b9565b610350565b6102bc565b6101f8565b6101c9565b610162565b6100f9565b600435906001600160e01b0319821682036100f457565b600080fd5b346100f45760203660031901126100f45760206001600160e01b031961011d6100dd565b16637965db0b60e01b811490811561013b575b506040519015158152f35b6301ffc9a760e01b14905038610130565b602435906001600160a01b03821682036100f457565b346100f45760203660031901126100f4576004356001600160a01b038116908190036100f4576101906106f8565b600280546001600160a01b031916821790557f814250a3b8c79fcbe2ead2c131c952a278491c8f4322a79fe84b5040a810373e600080a2005b346100f45760203660031901126100f45760043560005260006020526020600160406000200154604051908152f35b346100f45760403660031901126100f45760043561021461014c565b6000918083528260205261022e6001604085200154610854565b808352602083815260408085206001600160a01b0385166000908152925290205460ff161561025b578280f35b808352602083815260408085206001600160a01b038516600090815292529020805460ff1916600117905533916001600160a01b0316907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8480a438808280f35b346100f45760403660031901126100f4576102d561014c565b336001600160a01b038216036102f3576102f190600435610963565b005b60405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608490fd5b346100f45760403660031901126100f4576103696100dd565b602435906103756106f8565b6001600160e01b031916600081815260016020526040812083905591907f9aecde1887c209ac367c4ded12201517685403a74b8924f233cc372ccb5f71a58380a380f35b346100f45760203660031901126100f4576001600160e01b03196103db6100dd565b1660005260016020526020604060002054604051908152f35b346100f45760403660031901126100f457602060ff61043a61041461014c565b6004356000526000845260406000209060018060a01b0316600052602052604060002090565b54166040519015158152f35b346100f45760003660031901126100f457602060405160008152f35b60005b8381106104755750506000910152565b8181015183820152602001610465565b9060209161049e81518092818552858086019101610462565b601f01601f1916010190565b602080820190808352835180925260408301928160408460051b8301019501936000915b8483106104de5750505050505090565b90919293949584806104fc600193603f198682030187528a51610485565b98019301930191949392906104ce565b346100f45760203660031901126100f45767ffffffffffffffff6004358181116100f457366023820112156100f45780600401359182116100f4573660248360051b830101116100f4576105729160246105669201610ce1565b604051918291826104aa565b0390f35b346100f45760003660031901126100f4576002546040516001600160a01b039091168152602090f35b346100f45760403660031901126100f4576102f16004356105be61014c565b908060005260006020526105d9600160406000200154610854565b610963565b156105e557565b60405162461bcd60e51b8152602060048201526013602482015272139bdd08185b1b1bddd959081d1bc818d85b1b606a1b6044820152606490fd5b600060043610156106bc575060005b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff168015610682575b610671906105de565b6002546001600160a01b03166106d7565b506001600160e01b03191660009081526001602090815260408083205483528282528083203384529091529020546106719060ff16610668565b366004116106d457356001600160e01b03191661062f565b80fd5b60008080923682803781369134905af13d82803e156106f4573d90f35b3d90fd5b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff161561073157565b61073a33610aec565b600090610745610a1f565b91603061075184610a61565b53607861075d84610a6e565b5360415b6001811161080d5761080960486107f1856107e3886107808815610aa1565b6040519485937f416363657373436f6e74726f6c3a206163636f756e742000000000000000000060208601526107c0815180926020603789019101610462565b84017001034b99036b4b9b9b4b733903937b6329607d1b603782015201906108fb565b03601f198101835282610928565b60405162461bcd60e51b81529182916004830161094f565b0390fd5b90600f811690601082101561084f5761084a916f181899199a1a9b1b9c1cb0b131b232b360811b901a6108408487610a7e565b5360041c91610a8f565b610761565b610a4b565b60008181526020818152604080832033845290915290205460ff16156108775750565b61088033610aec565b610888610a1f565b91603061089484610a61565b5360786108a084610a6e565b5360415b600181116108c35761080960486107f1856107e3886107808815610aa1565b90600f811690601082101561084f576108f6916f181899199a1a9b1b9c1cb0b131b232b360811b901a6108408487610a7e565b6108a4565b9061090e60209282815194859201610462565b0190565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761094a57604052565b610912565b906020610960928181520190610485565b90565b6000818152602081815260408083206001600160a01b038616845290915281205490919060ff1661099357505050565b808252602082815260408084206001600160a01b038616600090815292529020805460ff1916905533926001600160a01b0316917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9080a4565b634e487b7160e01b600052601160045260246000fd5b67ffffffffffffffff811161094a57601f01601f191660200190565b604051906080820182811067ffffffffffffffff82111761094a57604052604282526060366020840137565b634e487b7160e01b600052603260045260246000fd5b80511561084f5760200190565b80516001101561084f5760210190565b90815181101561084f570160200190565b8015610a9c576000190190565b6109ed565b15610aa857565b606460405162461bcd60e51b815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b604051906060820182811067ffffffffffffffff82111761094a57604052602a825260403660208401376030610b2183610a61565b536078610b2d83610a6e565b536029905b60018211610b4557610960915015610aa1565b600f811690601082101561084f57610b77916f181899199a1a9b1b9c1cb0b131b232b360811b901a6108408486610a7e565b90610b32565b67ffffffffffffffff811161094a5760051b60200190565b90610b9f82610b7d565b610bac6040519182610928565b8281528092610bbd601f1991610b7d565b019060005b828110610bce57505050565b806060602080938501015201610bc2565b6000198114610a9c5760010190565b919081101561084f5760051b81013590601e19813603018212156100f457019081359167ffffffffffffffff83116100f45760200182360381136100f4579190565b908092918237016000815290565b3d15610c69573d90610c4f82610a03565b91610c5d6040519384610928565b82523d6000602084013e565b606090565b6020818303126100f45780519067ffffffffffffffff82116100f4570181601f820112156100f4578051610ca181610a03565b92610caf6040519485610928565b818452602082840101116100f4576109609160208085019101610462565b805182101561084f5760209160051b010190565b919091610ced83610b95565b9260005b818110610cfd57505050565b600080610d0b838587610bee565b60409391610d1d855180938193610c30565b0390305af490610d2b610c3e565b9115610d57575090610d5291610d418288610ccd565b52610d4c8187610ccd565b50610bdf565b610cf1565b9060448151106100f457610809610d7c60249260049380858301518301019101610c6e565b925162461bcd60e51b8152928392830161094f56fea2646970667358221220db9dd0d8273246aeab33facf6d83548653a0c9c9998ef7e3853dc6522eee100d64736f6c63430008140033537472696e67733a20686578206c656e67746820696e73756666696369656e74000000000000000000000000c186fa914353c44b2e33ebe05f21846f1048beda", | ||
| "nonce": "0x15e3", | ||
| "accessList": [] | ||
| }, | ||
| "additionalContracts": [], | ||
| "isFixedGasLimit": false | ||
| }, | ||
| { | ||
| "hash": null, | ||
| "transactionType": "CALL", | ||
| "contractName": "PermissionSplitterProxy", | ||
| "contractAddress": "0x0Bf07B2e415F02711fFBB32491f8ec9e5489B2e7", | ||
| "function": "grantRole(bytes32,address)", | ||
| "arguments": [ | ||
| "0x139c2898040ef16910dc9f44dc697df79363da767d8bc92f2e310312b816e46d", | ||
| "0xB524735356985D2f267FA010D681f061DfF03715" | ||
| ], | ||
| "transaction": { | ||
| "type": "0x02", | ||
| "from": "0x9a8f92a830a5cb89a3816e3d267cb7791c16b04d", | ||
| "to": "0x0bf07b2e415f02711ffbb32491f8ec9e5489b2e7", | ||
| "gas": "0x1140d", | ||
| "value": "0x0", | ||
| "data": "0x2f2ff15d139c2898040ef16910dc9f44dc697df79363da767d8bc92f2e310312b816e46d000000000000000000000000b524735356985d2f267fa010d681f061dff03715", | ||
| "nonce": "0x15e4", | ||
| "accessList": [] | ||
| }, | ||
| "additionalContracts": [], | ||
| "isFixedGasLimit": false | ||
| }, | ||
| { | ||
| "hash": null, | ||
| "transactionType": "CALL", | ||
| "contractName": "PermissionSplitterProxy", | ||
| "contractAddress": "0x0Bf07B2e415F02711fFBB32491f8ec9e5489B2e7", | ||
| "function": "__setRoleForSelector(bytes4,bytes32)", | ||
| "arguments": ["0x16c38b3c", "0x139c2898040ef16910dc9f44dc697df79363da767d8bc92f2e310312b816e46d"], | ||
| "transaction": { | ||
| "type": "0x02", | ||
| "from": "0x9a8f92a830a5cb89a3816e3d267cb7791c16b04d", | ||
| "to": "0x0bf07b2e415f02711ffbb32491f8ec9e5489b2e7", | ||
| "gas": "0x1030c", | ||
| "value": "0x0", | ||
| "data": "0x77da606016c38b3c00000000000000000000000000000000000000000000000000000000139c2898040ef16910dc9f44dc697df79363da767d8bc92f2e310312b816e46d", | ||
| "nonce": "0x15e5", | ||
| "accessList": [] | ||
| }, | ||
| "additionalContracts": [], | ||
| "isFixedGasLimit": false | ||
| }, | ||
| { | ||
| "hash": null, | ||
| "transactionType": "CALL", | ||
| "contractName": "PermissionSplitterProxy", | ||
| "contractAddress": "0x0Bf07B2e415F02711fFBB32491f8ec9e5489B2e7", | ||
| "function": "renounceRole(bytes32,address)", | ||
| "arguments": [ | ||
| "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
| "0x9A8f92a830A5cB89a3816e3D267CB7791c16b04D" | ||
| ], | ||
| "transaction": { | ||
| "type": "0x02", | ||
| "from": "0x9a8f92a830a5cb89a3816e3d267cb7791c16b04d", | ||
| "to": "0x0bf07b2e415f02711ffbb32491f8ec9e5489b2e7", | ||
| "gas": "0x8427", | ||
| "value": "0x0", | ||
| "data": "0x36568abe00000000000000000000000000000000000000000000000000000000000000000000000000000000000000009a8f92a830a5cb89a3816e3d267cb7791c16b04d", | ||
| "nonce": "0x15e6", | ||
| "accessList": [] | ||
| }, | ||
| "additionalContracts": [], | ||
| "isFixedGasLimit": false | ||
| } | ||
| ], | ||
| "receipts": [], | ||
| "libraries": [], | ||
| "pending": [], | ||
| "returns": {}, | ||
| "timestamp": 1706197795, | ||
| "chain": 1, | ||
| "multi": false, | ||
| "commit": "70c36e1" | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the real deployment? If so, why is it labeled "dry-run"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is the simulation step that happens for forge scripts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Makes sense.