-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
feat: introduce OptimismSuperchainERC20Factory #11617
feat: introduce OptimismSuperchainERC20Factory #11617
Conversation
packages/contracts-bedrock/src/L2/OptimismSuperchainERC20Beacon.sol
Outdated
Show resolved
Hide resolved
@tynes Do you have an usual way to generate an address in the |
An example of how addresses are generated can be found here: https://github.com/ethereum-optimism/specs/blob/9342867e3fd6dcd47038200b21629d25cb7fe566/specs/protocol/fjord/derivation.md#network-upgrade-automation-transactions The idea is that the hardfork includes special deposit transactions at the hardfork block and these deposit transactions can deploy contracts, initialize state, modify implementations in proxies. We will need to compute the address at which the implementation will be deployed at. There isn't really any special reason as to why a particular from is picked, usually a fresh one is used with nonce 0. There needs to be enough gas to do the execution. I recommend just creating an entry in the predeploys library for an arbitrary address for now, and we can think about the hardfork later. For now we just care about new networks |
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.
One small fix to fix CI but the rest of the PR looks good to me
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #11617 +/- ##
========================================
Coverage 78.78% 78.78%
========================================
Files 41 41
Lines 3262 3262
========================================
Hits 2570 2570
Misses 529 529
Partials 163 163
Flags with carried forward coverage won't be shown. Click here to find out more. |
784d8fb
to
997d8d8
Compare
d2a1848
to
1a46cd7
Compare
It looks like this may need to be rebased one more time to get the latest CI to run with it, some new required CI was added since this was last committed to. The code looks good to me, great work! |
* test: add L2 standard bridge interop unit tests * fix: add tests natspec * fix: unit tests fixes * fix: super to legacy tests failing * fix: mock and expect mint and burn
* test: add L2 standard bridge interop unit tests * fix: add tests natspec * fix: add generic factory interface
* test: add L2 standard bridge interop unit tests * fix: add tests natspec * fix: add generic factory interface * feat: modify OptimismMintableERC20Factory for convert * fix: use only a public function for create3 * feat: rollback interop factory, modify legacy one * fix: delete local token return variable
* feat: add superchain erc20 factory implementation * fix: remove createX comments
* test: add superchain erc20 factory tests * test: add erc20 asserts
---------- Co-authored-by: 0xng <[email protected]> Co-authored-by: 0xParticle <[email protected]> Co-authored-by: gotzenx <[email protected]>
--------- Co-authored-by: 0xng <[email protected]>
1a46cd7
to
3e23981
Compare
232c54d
Description
Implement the factory for deploying
OptimismSuperchainERC20
Beacon proxies.Spec: ethereum-optimism/specs#332
Tests
Added
OptimismSuperchainERC20Factory
testsTest the
OptimismSuperchainERC20
Beacon in its testsAdditional context
Q: Should the
OptimismSuperchainERC20Beacon
predeploy be proxied?TODO: Set the correct address of the
OptimismSuperchainERC20
implementation in theOptimismSuperchainERC20Beacon
contract.Metadata