I made contract ERC20 token MTCZx


which can sell MTCZx tokens for ETH.

When I deployed it I make query to balanceOf with contract owner



and see contract owner has 1 000 000 MTCZx balance.

When I add MTCZx to metamask I see balance only 1 MTCZx instead of 1 000 000.

The same 1 MTCZx total supply here instead of 1 000 000


Also when I send tokens to another user https://ropsten.etherscan.io/tx/0xdcfc79ff803eda40f9a7841c84acb76434565be9fb120bc3fbdfb2f46793d7ae

I see in Metamask balance 0 tokens instead of 0.01 MTCZx

What's wrong with metamask? I or ERC20 contract?


1 Answer 1


The denomination unit in your ERC20 contract is 6:

uint8 public constant decimals = 6;

MetaMask displays the balance according to this value, i.e., the balance divided by 10 ** 6.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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