0

Is it possible to get the ERC standard of tokens in a transaction from transaction hash?

List of tokens transferred

Etherscan provides the list of tokens and the token standards as shown in the image when we search using transaction hash, my goal is to get the same details from transaction hash using web3 library (Or in any other way)?

1 Answer 1

2

Etherscan index the whole blockchain and track all ERC20, ERC721 and others, so once a transaction interacts with one of these addresses, they already know it's a token.

If you haven't tracked and logged all tokens beforehand, you can read transaction's log and look for standard ERC20/721 log events, such as Transfer, TransferFrom, Approve, etc.

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.