-
Notifications
You must be signed in to change notification settings - Fork 3.9k
feat: custom gas token #17320
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: custom gas token #17320
Conversation
Signed-off-by: Hex <[email protected]> Co-authored-by: niha <[email protected]> Co-authored-by: Ashitaka <[email protected]> Co-authored-by: AgusDuha <[email protected]>
chore(cgt): sync develop
|
/ci authorize 1026df6 |
* feat: add L1BlockCGT * feat: add L2ToL1MessagePasserCGT * chore: remove test exclution in test validation
* test(cgt): fix failing tests * test(cgt): fix portal version * test(cgt): skip tests on forked mode * fix: predeploys test cgt mismatch * test(cgt): minor fixes --------- Co-authored-by: niha <[email protected]>
|
/ci authorize 4590fa8 |
| }, | ||
| CustomGasToken: &CustomGasToken{ | ||
| Enabled: false, | ||
| Name: "Test", |
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.
Name/Symbol should be empty since Enabled is false?
| if len(chain.AdditionalDisputeGames) > 0 { | ||
| return fmt.Errorf("%w: chainId=%s additionalDisputeGames must be nil", ErrNonStandardValue, chain.ID) | ||
| } | ||
| if chain.CustomGasToken != nil && (chain.CustomGasToken.Enabled != standard.CustomGasTokenEnabled) { |
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.
This is something that we may need to revisit
| /// @notice Address of the ETHLockbox contract. | ||
| IETHLockbox public ethLockbox; | ||
|
|
||
| /// @notice Whether the OptimismPortal is using Super Roots or Output Roots. |
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.
We may need to break this out into its own contract pending some open decisions on the rollout, will follow up as soon as possible
|
We will want to add a flag that enables the ability to set the amount of liquidity in the native asset liquidity contract so that it can be set to 0 for chains that would like that usecase |
|
Closing in favor of #17412 |
Description
Enables OP Stack chains to use an asset other than ETH as their native fee currency by introducing a minimal, flexible, and standardizable Custom Gas Token (CGT) architecture. To do so, it introduces new predeploys (
NativeAssetLiquidityandLiquidityController) that decouple native asset management from core bridging operations while using a singleisCustomGasToken()flag that disables ETH transfer flows in all bridging methods. The two new pre-deploys manage the native asset supply.Tests
Core contracts:
OptimismPortalandL1Block: Tests forisCustomGasToken()flag blocking ETH deposits/withdrawalsNativeAssetLiquidity: Tests deposit/withdraw access control and functionalityLiquidityController: Tests minter authorization, mint/burn operations, and metadata functionsMetadata
Contributors