-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add custom fee token docs #202
Conversation
|
||
The gas-paying token and the L2 ETH token are set within the L1 `SystemConfig` smart contract. The gas-paying token is set during initialization and cannot be modified by the `SystemConfig` bytecode. The L2 ETH token is set during initialization and can be updated via the `setL2ETHToken` function if the L2 ETH token address is `address(0)`. Since the `SystemConfig` is proxied, it is always possible to modify the storage slot that holds the gas-paying token address and the L2 ETH token address directly during an upgrade. | ||
|
||
If the address in the `GAS_PAYING_TOKEN_SLOT` slot for `SystemConfig` is `address(0)`, the system is configured to use `ether` as the gas paying token, and the getter for the token returns `ETHER_TOKEN_ADDRESS`. If the address in the `GAS_PAYING_TOKEN_SLOT` slot for `SystemConfig` is not `address(0)`, the system is configured to use a custom gas paying token, and the getter returns the address in the slot. |
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.
might be good to mention the value of (ETHER_TOKEN_ADDRESS) here
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.
Fixed
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.
lgtm!
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.
Looks good
📋 Add associated issues, tickets, docs URL here.
Overview
Describe what your Pull Request is about in a few sentences.
Add custom fee token docs
Changes
Describe your changes and implementation choices. More details make PRs easier to review.
Testing
Describe how to test your new feature/bug fix and if possible, a step by step guide on how to demo this.