Actions3
Overview
This node interacts with the Etherscan API to retrieve information about verified Ethereum smart contracts. Specifically, for the "Get Contract ABI for Verified Contract" resource and "Get" operation, it fetches the Application Binary Interface (ABI) of one or more verified smart contracts by their addresses. The ABI is essential for developers and integrators to understand how to interact programmatically with a smart contract, such as calling its functions or decoding events.
Common scenarios where this node is beneficial include:
- Developers needing to dynamically obtain the ABI of deployed contracts to interact with them without manually searching on Etherscan.
- Automated workflows that require contract ABI data for verification, analysis, or integration purposes.
- Batch processing multiple contract addresses to gather their ABIs for auditing or monitoring.
Example: Given one or multiple contract addresses, the node returns their corresponding ABIs, enabling subsequent nodes in the workflow to decode transactions or call contract methods.
Properties
| Name | Meaning |
|---|---|
| Address | The Ethereum contract address(es) for which to retrieve the ABI. Multiple addresses can be provided separated by commas. |
Output
The node outputs JSON data containing the ABI information for each requested contract address. The structure typically includes fields such as:
status: Indicates success or failure of the API request.message: Provides additional context or error messages.result: Contains the ABI string(s) for the contract(s).
If multiple addresses are provided, the output will include ABI data for each address accordingly.
No binary data output is produced by this node.
Dependencies
- Requires an active API key credential for the Etherscan service to authenticate requests.
- The node makes HTTP GET requests to the Etherscan API endpoint at
https://api.etherscan.io/api. - Proper network connectivity to access the Etherscan API is necessary.
Troubleshooting
- Invalid or missing API key: The node requires a valid API key credential. Ensure the API key is correctly configured in n8n credentials.
- Incorrect contract address format: Addresses must be valid Ethereum addresses. Invalid or malformed addresses may cause errors or empty results.
- Rate limiting: Etherscan enforces rate limits on API usage. Excessive requests may result in temporary blocking or errors.
- Unverified contracts: If a contract is not verified on Etherscan, the ABI will not be available, resulting in an empty or error response.
- Multiple addresses input: When providing multiple addresses, ensure they are comma-separated without extra spaces or invalid characters.
Common error messages from the API might include:
"NOTOK"status with messages indicating invalid parameters or API key issues.- Empty
resultfields if no ABI is found for the given address.
Resolving these usually involves verifying the input addresses, checking API key validity, and respecting API usage limits.