0

Recently, I've created an ERC20 token on Etherscan and verify the source code but my token information such as token name and total supply not showing up..Instead it shows balance: 0 N/a and supply also 0 N/A.Moreover I've done a first transaction of 15 usd..

I've attached the image below.

enter image description here

it's been 1 and half hour now..

2

1 Answer 1

0

There are a few issues.

  1. While decimals is not strictly part of the standard most ERC20 tokens have the information. But it should be named decimals while you have it as decimal. That's probably why Etherscan doesn't find the information.

  2. Same goes for your variable tokenSupply_. It should be named tokenSupply. And the same is true for name and symbol; they should be named name and symbol.

5
  • ohh!! but it was showing the information in testnet(rinkeby) with the same exact code..How come?
    – Yash
    Nov 24, 2020 at 7:17
  • There is an contract etherscan.io/address/…, they also defined variable name as tokenname, but they also defined function name to access the name variable. is it fine doing so..
    – Yash
    Nov 24, 2020 at 7:22
  • Maybe you can define those somewhere either when verifying or somewhere in etherscan settings Nov 24, 2020 at 7:23
  • Well, I haven't done anything like that..if I change variable name from tokenname, tokensymbol and tokenSuplly_ to name, symbol,totatsupply, do I have to create a function also for returning their values.
    – Yash
    Nov 24, 2020 at 7:31
  • No, public variables get getters generated automatically Nov 24, 2020 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.