-
I'm trying to query some read-only methods of token contracts on Binance Smart Chain such as number of decimals, totalSupply, …
For some tokens this works just fine and I receive the result. For others I'm getting
but still get this error. According the documentation, querying read-only methods should be free as they can be computed by asking a single node. So I don't understand why I'm getting this error as I'm asking read-only methods. And I don't understand why I'm still getting the error when I manually define a gasLimit. Any suggestions how to fix this would be highly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Some ERC20 tokens do not have the meta data functions, EIP20 says |
Beta Was this translation helpful? Give feedback.
Some ERC20 tokens do not have the meta data functions, EIP20 says
symbol()
is optional, that's probably why your calls might be failing. Also for exampleMKR
returnsbytes32
instead ofstring memory
(I guess this is because of how old Maker is, it was likely created before ERC20 spec was finalized). So you have to handle edge cases whenever you encounter a token that doesn't work in standard form.