1

I'm doing some tests deploying some contracts and using truffle's console. I need to check what is the balance of a given token in one of the default accounts that truffle/ganache creates. Is there a way to do this without having to provide the ABI of the contract? If not, how can I even provide this ABI to create the contract "web3 style" inside truffle's console?

Thanks

Hiperfly
  • 459
  • 4
  • 11
  • It is possible for example using web3.eth.call and manually format the call to balanceOf(). See something similar with totalSupply() https://ethereum.stackexchange.com/questions/24990/how-can-i-get-token-info-by-the-contract-address – Ismael Jun 03 '21 at 06:24
  • 1
    Thanks a lot! This seems to work up to a point and really glad I learned how to do this. However the balance I obtain is always 0, I have opened a separate question with the issue: https://ethereum.stackexchange.com/questions/100237/balanceofaddress-returns-always-0-balance – Hiperfly Jun 03 '21 at 11:01

0 Answers0