forked from ethereum-optimism/specs
-
Notifications
You must be signed in to change notification settings - Fork 0
feat(cgt): related specs #44
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
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
7b03393
feat(cgt): add function specification to system config
hexshire bbd9dff
feat(cgt): add portal modifications
hexshire 8cb2082
feat(cgt): block donateETH function
hexshire e5b1231
feat(cgt): messengers and bridges update
hexshire 9c02927
feat(cgt): fee vaults update
hexshire c227a12
feat(cgt): new predeploys
hexshire 02e3027
feat(cgt): weth to wna
hexshire abbbb0f
feat(cgt): wip address review comments
hexshire a26d921
feat(cgt): address review comments
hexshire 30ae7e6
chore(cgt): undo changes on interop spec
hexshire f73dfe1
chore(cgt): apply correct fork name
hexshire b361e96
chore(cgt): clarify weth behavior
hexshire ce638e6
chore(cgt): fix liquidity controller invariants
hexshire 95fc943
chore(cgt): add custom gas token flag detail
hexshire 4246e7c
chore: run linters
hexshire fd737c5
chore: use jovian folder
hexshire 2598c19
Update specs/protocol/jovian/predeploys.md
hexshire 42adecb
Update specs/protocol/jovian/predeploys.md
hexshire 33bf6b4
chore(cgt): address review comment
hexshire 012a212
chore(cgt): address review comment
hexshire afcebbe
chore(cgt): address review comment
hexshire 681c8d2
chore(cgt): address review comment
hexshire ec3aac6
Update specs/protocol/jovian/bridges.md
hexshire 3c516ef
Update specs/protocol/jovian/optimism-portal.md
hexshire 22f9879
chore(cgt): address review comment
hexshire 00abcfb
chore(cgt): address review comments
hexshire 839c883
chore(cgt): address review comments
hexshire a25aa9d
feat(cgt): bridge spec (#48)
hexshire 0787e74
chore(cgt): new cgt bridges spec
hexshire cb1830b
chore(cgt): remove bridge spec
hexshire aa94a2b
chore(cgt): update cgt flag location
hexshire 67dc17f
chore: remove unnecessary block and run linters
hexshire 74b292e
chore: add l1block details
hexshire File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Bridges | ||
|
|
||
| <!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
| <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
| **Table of Contents** | ||
|
|
||
| - [Overview](#overview) | ||
|
|
||
| <!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
|
|
||
| ## Overview | ||
|
|
||
| ETH bridging functions MUST revert when Custom Gas Token mode is enabled and the function involves ETH transfers. | ||
|
hexshire marked this conversation as resolved.
|
||
| This revert behavior is necessary because when a chain operates in Custom Gas Token mode, ETH is no longer the native | ||
| asset used for gas fees and transactions. The chain has shifted to using a different native asset entirely. | ||
| Allowing ETH transfers could create confusion about which asset serves as the native currency, potentially leading | ||
| to user errors and lost funds. Additionally, the custom gas token's supply is managed independently through | ||
| dedicated contracts (`NativeAssetLiquidity` and `LiquidityController`), and combining ETH bridging with custom gas | ||
| token operations introduces additional complexity to supply management and accounting. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Cross Domain Messengers | ||
|
|
||
| <!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
| <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
| **Table of Contents** | ||
|
|
||
| - [Message Passing](#message-passing) | ||
|
|
||
| <!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
|
|
||
| ## Message Passing | ||
|
|
||
| The `sendMessage` function MUST revert when Custom Gas Token mode is enabled and `msg.value > 0`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # Optimism Portal | ||
|
|
||
| <!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
| <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
| **Table of Contents** | ||
|
|
||
| - [Definitions](#definitions) | ||
| - [Custom Gas Token Flag](#custom-gas-token-flag) | ||
| - [Rationale](#rationale) | ||
| - [Function Specification](#function-specification) | ||
| - [isCustomGasToken](#iscustomgastoken) | ||
| - [donateETH](#donateeth) | ||
| - [depositTransaction](#deposittransaction) | ||
|
|
||
| <!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
|
|
||
| ## Definitions | ||
|
|
||
| ### Custom Gas Token Flag | ||
|
|
||
| The **Custom Gas Token Flag** (`isCustomGasToken`) is a boolean value that indicates | ||
| whether the chain is operating in Custom Gas Token mode. | ||
|
|
||
| ## Rationale | ||
|
|
||
| The OptimismPortal's ETH-related logic must revert when Custom Gas Token mode is enabled to prevent ETH from | ||
| acting as the native asset. Since the client side does not discern native asset supply creation, allowing | ||
| ETH deposits would incorrectly imply that it can be minted in the chain. | ||
|
|
||
| ## Function Specification | ||
|
|
||
| ### isCustomGasToken | ||
|
|
||
| Returns true if the gas token is a custom gas token, false otherwise. | ||
|
|
||
| ### donateETH | ||
|
|
||
| - MUST revert if `isCustomGasToken()` returns `true` and `msg.value > 0`. | ||
|
|
||
| ### depositTransaction | ||
|
|
||
| - MUST revert if `isCustomGasToken()` returns `true` and `msg.value > 0`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.