1

I would like to read contract information(especially name, symbol, decimal, owner) from token contracts like shown here: https://moonbeam.moonscan.io/token/0x818ec0a7fe18ff94269904fced6ae3dae6d6dc0b#readContract

How do I read that from on-chain? Also, how do I figure out if a contract is a token contract?

context: this is for an indexer project.

1
  • I think once you've decoded the scale, then you have to decode it on the eth side. I'm guessing that github.com/rust-ethereum/ethabi should be able to do it though have not tried this out yet.
    – Squirrel
    Commented May 16, 2022 at 9:58

0