-
Notifications
You must be signed in to change notification settings - Fork 266
custom-gas-token #665
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
custom-gas-token #665
Conversation
✅ Deploy Preview for docs-optimism ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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 looks good to me.
WalkthroughThe recent changes introduced a new "Custom Gas Token" feature in the OP Stack, providing comprehensive guides for chain operators on deploying and managing chains with specific ERC-20 tokens as native gas tokens. Clarifications were made to existing tutorials, and new documentation files were added to detail the deployment, configuration, and benefits of using custom gas tokens. Additionally, updates were made to metadata files and a dictionary file to reflect these changes. Changes
Recent Review DetailsConfiguration used: .coderabbit.yaml Files selected for processing (7)
Files skipped from review due to trivial changes (3)
Additional Context UsedLanguageTool (103)
Path-based Instructions (3)
Learnings (1)
Additional comments not posted (3)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 8
Outside diff range and nitpick comments (7)
pages/stack/protocol/features/custom-gas-token.mdx (3)
83-83
: Consider using a more concise phrase."taking into account" could be replaced with "considering" for brevity.
85-85
: Consider using a more concise phrase."take into account" could be replaced with "consider" for brevity.
93-93
: Consider using a more concise phrase."exactly the same" could be replaced with "identical" for brevity.
pages/builders/app-developers/tutorials/standard-bridge-custom-token.mdx (4)
Line range hint
16-16
: Add a comma for correct punctuation.- In this tutorial you'll learn + In this tutorial, you'll learn
Line range hint
31-31
: Consider using a more concise phrase."in order to" could be replaced with "to" for brevity.
Line range hint
52-52
: Consider using a more concise phrase."in order to" could be replaced with "to" for brevity.
Line range hint
122-122
: Consider using a more concise phrase."exactly" could be replaced with "precisely" for variety.
|
||
## Native Gas Tokens | ||
|
||
By default, L2 OP Stack chains allow users to deposit ETH from L1 into the L2 chain as native L2 token that can then be used to pay for gas fees. |
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.
Consider adding an article for clarity.
- as native L2 token
+ as the native L2 token
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
By default, L2 OP Stack chains allow users to deposit ETH from L1 into the L2 chain as native L2 token that can then be used to pay for gas fees. | |
By default, L2 OP Stack chains allow users to deposit ETH from L1 into the L2 chain as the native L2 token that can then be used to pay for gas fees. |
Chain operators get the following benefits by using custom gas tokens: | ||
|
||
* can use an L1 ERC-20 token as the custom gas token for L2 OP Stack chain deployment | ||
* can use an ERC-20 token on an existing L2 OP Stack chain as as the custom gas token for an L3 OP Stack chain deployment |
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.
Remove duplicate word for correct grammar.
- as as the custom gas token
+ as the custom gas token
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
* can use an ERC-20 token on an existing L2 OP Stack chain as as the custom gas token for an L3 OP Stack chain deployment | |
* can use an ERC-20 token on an existing L2 OP Stack chain as the custom gas token for an L3 OP Stack chain deployment |
|
||
### Do node operators need to do anything? | ||
|
||
There are no core changes to `op-geth` or `op-node` so the infrastructure that node operators run is exactly the same as any other OP Stack based chain. The differences are encapsulated in the smart contracts, so only the L1 contract deployments and L2 genesis generation need to be done in a particular way. |
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.
Add a hyphen for correct spelling.
- OP Stack based chain
+ OP Stack-based chain
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
There are no core changes to `op-geth` or `op-node` so the infrastructure that node operators run is exactly the same as any other OP Stack based chain. The differences are encapsulated in the smart contracts, so only the L1 contract deployments and L2 genesis generation need to be done in a particular way. | |
There are no core changes to `op-geth` or `op-node` so the infrastructure that node operators run is exactly the same as any other OP Stack-based chain. The differences are encapsulated in the smart contracts, so only the L1 contract deployments and L2 genesis generation need to be done in a particular way. |
Be sure to check out this tag or you will not deploy a chain that uses custom gas token! | ||
</Callout> | ||
|
||
* Update the deploy config in `contracts-bedrock/deploy-config` with new fields: `useCustomGasToken` and `customGasTokenAddress` |
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.
Clarify the term usage.
- Update the deploy config
+ Update the deployment config
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
* Update the deploy config in `contracts-bedrock/deploy-config` with new fields: `useCustomGasToken` and `customGasTokenAddress` | |
* Update the deployment config in `contracts-bedrock/deploy-config` with new fields: `useCustomGasToken` and `customGasTokenAddress` |
</Callout> | ||
|
||
This guide provides a walkthrough for chain operators who want to run a custom gas token chain. See the [Custom Gas Token Explainer](/stack/protocol/features/custom-gas-token) for a general overview of this OP Stack feature. | ||
An OP Stack chain that uses the custom gas token feature enables an end user to deposit an L1 native ERC20 token into L2 where that asset is minted as the native L2 asset and can be used to pay for gas on L2. |
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.
Add a comma for correct punctuation.
- an L1 native ERC20 token into L2 where
+ an L1 native ERC20 token into L2, where
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
An OP Stack chain that uses the custom gas token feature enables an end user to deposit an L1 native ERC20 token into L2 where that asset is minted as the native L2 asset and can be used to pay for gas on L2. | |
An OP Stack chain that uses the custom gas token feature enables an end user to deposit an L1 native ERC20 token into L2, where that asset is minted as the native L2 asset and can be used to pay for gas on L2. |
``` | ||
|
||
* `DEPLOYMENT_OUTFILE` is the path to the file at which the L1 contract deployment artifacts are written to after deployment. Foundry has filesystem restrictions for security, so make this file a child of the `deployments` directory. This file will contain key/value pairs of the names and addresses of the deployed contracts. | ||
* `DEPLOY_CONFIG_PATH` is the path to the file for the deploy config used to deploy |
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.
Clarify the term usage.
- the deploy config used to deploy
+ the deployment config used to deploy
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
* `DEPLOY_CONFIG_PATH` is the path to the file for the deploy config used to deploy | |
* `DEPLOY_CONFIG_PATH` is the path to the file for the deployment config used to deploy |
|
||
* You have the L1 contracts artifact, specified with `DEPLOYMENT_OUTFILE` | ||
* `CONTRACT_ADDRESSES_PATH` is the path to the deployment artifact from deploying the L1 contracts in the first step, aka `DEPLOYMENT_OUTFILE` | ||
* `DEPLOY_CONFIG_PATH` is the path to the file for the deploy config used to deploy |
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.
Clarify the term usage.
- the deploy config used to deploy
+ the deployment config used to deploy
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
* `DEPLOY_CONFIG_PATH` is the path to the file for the deploy config used to deploy | |
* `DEPLOY_CONFIG_PATH` is the path to the file for the deployment config used to deploy |
<Steps> | ||
### Deploying Your Contracts | ||
|
||
* Checkout the [`v2.0.0-beta.1` of the contracts](https://github.com/ethereum-optimism/optimism/tree/op-contracts/v2.0.0-beta.1) and use the commit to deploy. |
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.
Clarify the sentence structure.
- Checkout the [`v2.0.0-beta.1` of the contracts](https://github.com/ethereum-optimism/optimism/tree/op-contracts/v2.0.0-beta.1) and use the commit to deploy.
+ Check out the [`v2.0.0-beta.1` of the contracts](https://github.com/ethereum-optimism/optimism/tree/op-contracts/v2.0.0-beta.1) and use the commit to deploy.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
* Checkout the [`v2.0.0-beta.1` of the contracts](https://github.com/ethereum-optimism/optimism/tree/op-contracts/v2.0.0-beta.1) and use the commit to deploy. | |
* Check out the [`v2.0.0-beta.1` of the contracts](https://github.com/ethereum-optimism/optimism/tree/op-contracts/v2.0.0-beta.1) and use the commit to deploy. |
draft PR, merge only after eng approves