-
Notifications
You must be signed in to change notification settings - Fork 441
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
How to use Web3.Utils.formatToEthereumUnits() to parse a BigUint? #294
Comments
|
My test code:
@dangell7 Is this right? |
Is this after calling getBalance? Or are you creating variables for interaction with a smart contract? |
@dangell7 Yes. The 'big' constant with type 'BigUInt' is the balance I got from a samrt contract.
|
You can use your own unit using web3Units create Your Unit Fetch balance with web3 instance and your address convert balance in to string |
@AlleniCode Hey, do you still have this issue? |
If I get a token's decimal, and a BigUInt balance, how to format it to a string? THX!
The text was updated successfully, but these errors were encountered: