Skip to content

EthClient.Contract.get_functions/1 only works with etherscan connected chains #22

@SantiagoPittella

Description

@SantiagoPittella

If you try to call EthClient.Contract.get_functions/1 with a contract address as parameter, the function will automatically try to search the functions from etherscan and will generate an error if the contract was deployed in the local node.
Error:

** (MatchError) no match of right hand side value: {:error, :unknown_chain_id_for_etherscan}
    (eth_client 0.1.0) lib/eth_client/abi.ex:12: EthClient.ABI.get_etherscan/1
    (eth_client 0.1.0) lib/eth_client/contract.ex:10: EthClient.Contract.get_functions/1

The functions works locally only if the parameter is the path to the ABI file.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions