-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metamask showing 0 balance for ERC20 tokens (openzeppelin) #3908
Comments
Yes it works perfect from remix. As in I call the balanceOf function on an
account and it reflects the right balance. I’m not sure how to do it from
myetherwallet, it doesn’t seem to be able to detect my local node. It also
works fine from truffle console.
…On Thu, Apr 5, 2018 at 10:56 PM Lazaridis ***@***.***> wrote:
Have you cross-check this with other wallets, so it's more confirmed that
it's a MM problem?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3908 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AXZOwW9L2OxmlczOftW8GWinkrZXtb5gks5tlwOjgaJpZM4TJdIv>
.
|
This is the legacy code the works with metamask.. https://github.com/CrypTaurus/Token/tree/master/contracts/legacy You want to look at Token.sol. There's really almost no difference besides the fact that the code is collapsed into less files. We decided to follow open zeppelin's already audited contracts and that broke metamask. We're looking forward for a core dev to help out. |
Having the same issue with a development token on a local ganache instance. |
@rawadrifai are you still seeing this issue? |
I have the same problem! ####solved###### |
closing due to inactivity - let us know if you're still having trouble! |
Yes the problem is there. If the balance is created in the constructor function then it doesn't not appear on Metamask (probably because there is no txin for a balance transfer). But if you manually query truffle for balanceOf the balance is there. This is quite important can you reopen? You can try the contract at rinkeby at 0xedEAC23451754F6e54886A20348f31fd38ff61cE that is an ERC20 Openzeppelin Ownable contract with the owner : 0xd587f68be865c8a4f34cc2a53150de0da5771957 The owner has balance 1000 but Metamask shows 0 when added as a custom token. |
I resolved the problem and it turns out it's not a Metamask issue at all. the uint was converted to a tiny number due to decimals so the balance of 0.0000000001 was not showing. Can be closed for me. |
Hi,
If I use open zeppelin's solidity code (npm install zeppelin-solidity), metamask is not showing the right token balance. I create a token from an account and all total supply goes to that account. Then I add the token in metamask and it shows 0. I can almost guarantee I'm not doing any stupid mistakes, I tried it many times, yet it works for a different token where all the code is one file (suspecting that could be it?).
Here's the code: https://github.com/CrypTaurus/Token. The token to deploy is Taur.sol.
The text was updated successfully, but these errors were encountered: