zksync-era icon indicating copy to clipboard operation
zksync-era copied to clipboard

feat: Add l1 token address endpoint

Open jrchatruc opened this issue 1 year ago • 0 comments

What ❔

This PR adds an RPC method that answers the chain's base token, or 0x0..01 if the base token is eth.

Why ❔

To make clients like block explorers or cli tools able to know which token the chain they point to is operating on, now that it could be one different from eth.

Checklist

  • [x] PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • [ ] Tests for the changes have been added / updated.
  • [ ] Documentation comments have been added / updated.
  • [x] Code has been formatted via zk fmt and zk lint.
  • [x] Spellcheck has been run via zk spellcheck.
  • [x] Linkcheck has been run via zk linkcheck.

jrchatruc avatar Feb 07 '24 19:02 jrchatruc