Skip to content

Provide external SuperchainConfig in deploy config#352

Merged
m-chrzan merged 2 commits intopahor/genesisGenerationfrom
m-chrzan/external-superchainconfig
Mar 12, 2025
Merged

Provide external SuperchainConfig in deploy config#352
m-chrzan merged 2 commits intopahor/genesisGenerationfrom
m-chrzan/external-superchainconfig

Conversation

@m-chrzan
Copy link
Copy Markdown

  • Adds a new deploy config field, externalSuperchainConfig, which should be the address pointing to the official OP SuperchainConfig contract. This will be used in CeloSuperchainConfig to pause the Celo system whenever Superchain pauses.
  • Modifies the runCelo entrypoint of Deploy.s.sol to run with needsSuperchain = false, i.e. without deploying a fresh SuperchainConfig contract.
  • With needsSuperchain = false, now the deploy script:
    • As described above, sources the SuperchainConfig address from the new config field.
    • Still deploys a ProtocolVersions contract.

Testing

Added two unit tests to test the new config field. For some reason, the failing path required a vm.skip. vm.expectRevert appeared to short-circuit, failing with "next call did not revert as expected", even though the call does revert as expected when vm.expectRevert is not used.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.65%. Comparing base (694b08e) to head (d5e31df).

Additional details and impacted files
@@                     Coverage Diff                      @@
##           pahor/genesisGeneration     #352       +/-   ##
============================================================
+ Coverage                    54.16%   66.65%   +12.48%     
============================================================
  Files                           55       56        +1     
  Lines                         4660     4666        +6     
============================================================
+ Hits                          2524     3110      +586     
+ Misses                        1992     1384      -608     
- Partials                       144      172       +28     
Flag Coverage Δ
cannon-go-tests-32 61.88% <ø> (?)
cannon-go-tests-64 54.16% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 23 files with indirect coverage changes

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@m-chrzan m-chrzan merged commit 12ee711 into pahor/genesisGeneration Mar 12, 2025
37 of 45 checks passed
@m-chrzan m-chrzan deleted the m-chrzan/external-superchainconfig branch March 12, 2025 12:06
pahor167 added a commit that referenced this pull request May 19, 2025
* L2 allocation generation by itself

* Readme added

* update of readme

* AbstractFeeCurrency

* Celo smart contracts

* added deploy of celo contracts to devnet

* working without preInitializeOptimismPortalBalance

* CustomGasToken L1 working

* REVERT LATER - just for testing

* fix of solidity version

* Update interface solidity version

* Pahor/genesis generation working deploy from celo2 (#307)

* working deploy2.s.sol from celo10

* Deployment refactor

* Compilation fix

* removal of deploy_orig

* [Contract Deployment] Split fault proof deployment (#308)

* working deploy2.s.sol from celo10

* Deployment refactor

* Contract Deployment: Split FP initialization

* Minnor format fixes

---------

Co-authored-by: pahor167 <hornak.pavel@gmail.com>

* Celo token permit

* Dual Guardian mechanism (#302)

* working deploy2.s.sol from celo10

* Deployment refactor

* Compilation fix

* removal of deploy_orig

* Setup new contract for Celo-specific guardian role

* Test the actual new contract

* Add getter for global SuperchainConfig

* Make sure global guardian can't directly pause Celo config

* Rename test contracts

* Return combined Superchain and Celo paused status

* Allow pausing of Celo config when Superchain is paused

* Ensure Celo stays paused if Superchain still paused

* Add CeloSuperchainConfig to Specs test

* Exclude CeloSuperchainConfig from Initializable test for now

* Make test view

* Use CeloSuperchainConfig interface

* Check and propagate superchain paused status in one function

* Setup CeloSuperchainConfig in deploy script

* Point OptimismPortal to CeloSuperchainConfig

* Formatting

* Use CeloSuperchainConfig in contracts that used SuperchainConfig

* Fix CrossDomanMessenger test

* Add NatSpecs

* Add unit test NatSpecs

* Add reference comment to deploy script

* Add comments

* Emit event on config update

* Initialize as paused if Superchain paused at init time

* Test Celo and Superchain pauses on OptimismPortal2

* Test Celo and Superchain pauses on OptimismPortal

* Test Celo and Superchain pauses on L1CrossDomainMessenger

* Test Celo and Superchain pauses on L1ERC721Bridge

* Use checkAndPause in L1ERC721Bridge

* Add enum and event to interface

* Use CeloSuperChainConfig in ChainAssertions

* Remove unused script

* Add CeloSuperchainConfig chain assertion

---------

Co-authored-by: pahor167 <hornak.pavel@gmail.com>

* ICeloSuperchainConfig ignored

* Remove debugging function (#313)

* Fix Initializable test (#312)

* Check CeloSuperchainConfig in Initializable test

* Ignore Celo contracts from Initializable test

* Always deal eth to precompiles (#314)

* removal of ethereum-optimism/latitude-1

* lint

* unused import removal

* Snapshots update

* semver lock

* gas tests fixes

* move of semver diff to celo-contracts/v1.8.0

* removal of debug prints

* Test cimg base image for fuzz-golang

* Install parallel

* Update kona-fpp image

* revert of deal EthToPrecompiles

* unit test fix

* CeloSuperchainConfig adjustements (#323)

* Use new namespace in inheriting contract

* Allow unset superchainConfig

* Minor audit fixes (#325)

* interfaces check fix

* lint fixes

* Implement CeloSuperchainConfig standalone, without inheritance (#326)

* Implement CeloSuperchainConfig standalone, without inheritance

* Use CeloSuperchainConfig in DelayedWETH (#329)

* build fix

* Remove usage of stateful pause check (#332)

* Celo readme

* readme fix

* removed virtual tag from paused function (#335)

* Move constants inside contracts (#336)

* Add ProxyAdmin owner verification to deploy/genesis scripts (#345)

* Provide external SuperchainConfig in deploy config (#352)

* Provide an external superchain config and deploy Celo with it

* Add externalSuperchainConfig in go and config template

* Update CeloTokenL1.sol

* Rolled back change by accident

* Fix Celo token (#358)

* Add chain_op_config field to rollup.json (required for testnets)

---------

Co-authored-by: Javier Cortejoso <javier.cortejoso@gmail.com>
Co-authored-by: Martin <marcin.j.chrzanowski@gmail.com>
Co-authored-by: Martin <martin@clabs.co>
Co-authored-by: soloseng <102702451+soloseng@users.noreply.github.com>
Co-authored-by: Martín Volpe <martin.volpe@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants