Skip to content
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

Merged
merged 8 commits into from
Jun 18, 2024
Merged

Add custom fee token docs #202

merged 8 commits into from
Jun 18, 2024

Conversation

boyuan-chen
Copy link

📋 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.

  • Add docs

Testing

Describe how to test your new feature/bug fix and if possible, a step by step guide on how to demo this.


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.

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

Copy link
Author

Choose a reason for hiding this comment

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

Fixed

Copy link

@souradeep-das souradeep-das left a comment

Choose a reason for hiding this comment

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

lgtm!

Copy link

@souhaillM souhaillM left a comment

Choose a reason for hiding this comment

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

Looks good

@boyuan-chen boyuan-chen merged commit fa08b71 into develop Jun 18, 2024
70 of 73 checks passed
@boyuan-chen boyuan-chen deleted the add-custom-fee-token-docs branch June 18, 2024 16:00
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.

3 participants