Skip to content

Get token information #1652

Answered by zemse
vlbhtcno1 asked this question in Q&A
Jun 5, 2021 · 1 comments · 15 replies
Discussion options

You must be logged in to vote

Yes you should be able to call the name(), symbol() and decimals() functions on the token contract. However note that, these methods are optional in the ERC20 specification, so you can come across some ERC20 tokens through which you may not be able to get that information. Also some edge cases: MKR token returns bytes32 value for name & symbol.

Replies: 1 comment 15 replies

Comment options

You must be logged in to vote
15 replies
@vlbhtcno1
Comment options

@zemse
Comment options

zemse Jun 7, 2021
Collaborator

@vlbhtcno1
Comment options

@zemse
Comment options

zemse Jun 8, 2021
Collaborator

@vlbhtcno1
Comment options

Answer selected by vlbhtcno1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants