[Ethereum] how can i find the contract name from the address using the etherscan API

etheretherscan

I have the address but I want to know the name of contract. Is there any way to get that from the etherscan API?

Best Answer

There is no special API method to get the name of contract. But if you are talking about ERC20 Tokens, you can try another method [BETA]:

https://api.etherscan.io/api?module=account&action=tokentx&contractaddress=0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2&page=1&offset=5

It returns ERC20 token transfer events for a specific contract. So you can extract required information "tokenName":"Maker","tokenSymbol":"MKR" from the response.

Related Topic