0

I there a version of the erc20 balance call that i can use to get the token balance of a specific address?

erc20: (https://api.etherscan.io/api?module=account&action=tokenbalance&contractaddress=0x57d90b64a1a57749b0f932f1a3395792e12e7055&address=0xe04f27eb70e025b78871a2ad7eabe85e61212761&tag=latest&apikey=YourApiKeyToken)

My current contract has a _balanceof(address,tokenid) function, that i would like to call from an api.

2
  • This would be a bad practice. If you want to query the balance of something you should do it on chain. Oct 26, 2021 at 20:21
  • I am using this on the front end of my website to allow the user to submit forms, not sure if on-chain is needed or not. Oct 26, 2021 at 22:34

0

Your Answer

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

Browse other questions tagged or ask your own question.