Skip to content

Move constants inside contracts#336

Merged
m-chrzan merged 2 commits intopahor/genesisGenerationfrom
m-chrzan/constants-in-contract
Feb 27, 2025
Merged

Move constants inside contracts#336
m-chrzan merged 2 commits intopahor/genesisGenerationfrom
m-chrzan/constants-in-contract

Conversation

@m-chrzan
Copy link
Copy Markdown

Small stylistic change: CeloTokenL1 and CeloTokenL1Permit had constants defined outside the contract declaration. Moved them inside for stylistic consistency.

And some minor whitespace changes caught by the linter.

@palango
Copy link
Copy Markdown

palango commented Feb 26, 2025

QQ: Why are there two token contracts for L1?

@m-chrzan
Copy link
Copy Markdown
Author

m-chrzan commented Feb 26, 2025

Not sure to be honest. For what it's worth, I don't see CeloTokenL1Permit being used anywhere in other contracts/scripts.
@martinvol, do you know what the purpose was? Could the file be safely removed?

Copy link
Copy Markdown

@soloseng soloseng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@martinvol
Copy link
Copy Markdown

I think Pavel meant to use CeloTokenL1Permit as the token, because it supports ERC20Permit. He may not have added it to the deploy because maybe the change was rushed to get into the audit.

@m-chrzan m-chrzan merged commit 71b1419 into pahor/genesisGeneration Feb 27, 2025
38 of 45 checks passed
@m-chrzan m-chrzan deleted the m-chrzan/constants-in-contract branch February 27, 2025 15:41
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.

4 participants