Etherscan v2.0.2 Etherscan.API.Contracts

Module to wrap Etherscan contract endpoints.

Etherscan API Documentation

Link to this section Summary

Functions

Get contract ABI for contracts with verified source code, by address

Get contract source code for contacts with verified source code

Link to this section Functions

Link to this function get_contract_abi(address)
get_contract_abi(address :: String.t()) :: {:ok, list()} | {:error, atom()}

Get contract ABI for contracts with verified source code, by address.

More Info

Example

iex> Etherscan.get_contract_abi("0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413")
{:ok, [%{"name" => _, ...} | _] = contract_abi}
Link to this function get_contract_source(address)

Get contract source code for contacts with verified source code

More Info

iex> Etherscan.get_contract_source("0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413")
{:ok, [%{"name" => _, ...} | _] = contract_source}