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 RPC endpoint that returns the address of the native token #31

Closed
jrchatruc opened this issue Jan 10, 2024 · 0 comments · Fixed by #37
Closed

Add RPC endpoint that returns the address of the native token #31

jrchatruc opened this issue Jan 10, 2024 · 0 comments · Fixed by #37
Assignees

Comments

@jrchatruc
Copy link
Member

🌟 Feature Request

When the stack is used with an ERC20 as its native token, clients like the explorer need to know which token it is to display information about it (like its name, symbol, decimals, maybe an image, etc).

For this, it's enough that the server has an RPC endpoint zks_getNativeTokenAddress that returns the address of the contract on the L1. With that, clients can call the contract's methods to fetch the information they need.

When the native token is eth, the returned address should be 0.

@jrchatruc jrchatruc changed the title Add RPC endpoint that returns the address of the ERC20 token Add RPC endpoint that returns the address of the native token Jan 10, 2024
@juanbono juanbono self-assigned this Jan 15, 2024
@juanbono juanbono linked a pull request Jan 15, 2024 that will close this issue
5 tasks
Oppen pushed a commit that referenced this issue Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants