Hi everyone! I need to check whether TRC20 address is contract or account. I assume, there is difference in hash between these types of addresses but I don’t know for sure. would greatly appreciate any info!
2 Likes
Best way to check that would be to use an tron blockchain explorer. https://explorer.just.money/ or tronscan
Just by decoding the address is not possible, the formatting is the same as regular accounts, but you can use the API.
https://api.trongrid.io/v1/accounts/TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t (example with USDT contract) it returns a json with a bunch of keys, you need to look for “type”:“Contract” or “type”:“Active”
1 Like
To check if a TRC20 address is a contract or a regular account on the TRON network, you can use TRONScan or a TRON API. Use the getContract
API method or search the address on TRONScan. If it’s a contract, details about the smart contract will be displayed; otherwise, it’s a regular account.
1 Like