feat: introduce OptimismSuperchainERC20Factory#11617
feat: introduce OptimismSuperchainERC20Factory#11617tynes merged 17 commits intoethereum-optimism:developfrom
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 |
tynes
left a comment
There was a problem hiding this comment.
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 <ng@defi.sucks> Co-authored-by: 0xParticle <particle@defi.sucks> Co-authored-by: gotzenx <78360669+gotzenx@users.noreply.github.com>
--------- Co-authored-by: 0xng <ng@defi.sucks>
1a46cd7 to
3e23981
Compare
* test: add L2 standard bridge interop unit tests (ethereum-optimism#13) * 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 * fix: add generic factory interface (ethereum-optimism#14) * test: add L2 standard bridge interop unit tests * fix: add tests natspec * fix: add generic factory interface * feat: modify OptimismMintableERC20Factory for convert (ethereum-optimism#17) * 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 * fix: PR fixes * feat: add superchain erc20 factory implementation (ethereum-optimism#23) * feat: add superchain erc20 factory implementation * fix: remove createX comments * test: add superchain erc20 factory tests (ethereum-optimism#25) * test: add superchain erc20 factory tests * test: add erc20 asserts * test: fix expect emit * fix: remove comments * feat: add constructor to superchain ERC20 beacon (ethereum-optimism#34) * test: remove factory predeploy etch ---------- Co-authored-by: 0xng <ng@defi.sucks> Co-authored-by: 0xParticle <particle@defi.sucks> Co-authored-by: gotzenx <78360669+gotzenx@users.noreply.github.com> * fix: set an arbitrary address for superchain erc20 impl * fix: deploy a proxy for the beacon on genesis (ethereum-optimism#45) --------- Co-authored-by: 0xng <ng@defi.sucks> * fix: conflicts and imports * fix: interfaces * chore: add .testdata * fix: adding back .testdata to gitignore * fix: new conflicts from ci improvements --------- Co-authored-by: 0xng <ng@defi.sucks> Co-authored-by: 0xParticle <particle@defi.sucks> Co-authored-by: gotzenx <78360669+gotzenx@users.noreply.github.com> Co-authored-by: Disco <131301107+0xDiscotech@users.noreply.github.com>
Description
Implement the factory for deploying
OptimismSuperchainERC20Beacon proxies.Spec: ethereum-optimism/specs#332
Tests
Added
OptimismSuperchainERC20FactorytestsTest the
OptimismSuperchainERC20Beacon in its testsAdditional context
Q: Should the
OptimismSuperchainERC20Beaconpredeploy be proxied?TODO: Set the correct address of the
OptimismSuperchainERC20implementation in theOptimismSuperchainERC20Beaconcontract.Metadata