Skip to main content

Parse ABI

Parses a smart contract ABI (Application Binary Interface) file and creates a reference that can be used with other Web3 nodes for contract interaction.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs

  • ABI File - Path to the JSON file containing the smart contract's ABI. This file defines the contract's functions, events, and data structures.

Output

  • ABI - A unique identifier for the parsed ABI. Use this ID with ABI Method, Decode, Subscribe, and other nodes that interact with smart contracts.

How It Works

The Parse ABI node loads and validates a smart contract ABI definition. When executed, the node:

  1. Reads the ABI JSON file from the specified path
  2. Parses and validates the ABI structure
  3. Stores the ABI in memory with a unique identifier
  4. Returns the ABI ID for use with other nodes

Requirements

  • A valid ABI JSON file saved locally or accessible by the automation
  • The file must contain a properly formatted smart contract ABI

ABI File Format

An ABI file is a JSON array containing function and event definitions:

[
{
"type": "function",
"name": "transfer",
"inputs": [
{"name": "recipient", "type": "address"},
{"name": "amount", "type": "uint256"}
],
"outputs": [{"name": "", "type": "bool"}],
"stateMutability": "nonpayable"
},
{
"type": "event",
"name": "Transfer",
"inputs": [
{"name": "from", "type": "address", "indexed": true},
{"name": "to", "type": "address", "indexed": true},
{"name": "value", "type": "uint256", "indexed": false}
]
}
]

Error Handling

The node will return errors for:

  • Empty file path
  • File not found at the specified path
  • Invalid JSON format
  • Malformed ABI structure
  • File read permission issues

Where to Get ABIs

  • Etherscan/Block Explorers - View verified contracts and copy their ABI
  • Contract Repositories - GitHub repositories often include ABI files
  • Development Tools - Truffle, Hardhat, and Remix generate ABIs during compilation
  • Token Standards - Common interfaces (ERC20, ERC721) have standard ABIs

Usage Notes

  • The ABI must be parsed before calling contract methods or subscribing to events
  • One Parse ABI node can be used for multiple contract interactions
  • The ABI ID remains valid throughout the flow execution
  • Large ABIs with many functions are supported
  • Standard token ABIs (ERC20, ERC721, ERC1155) work out of the box

Example

Loading an ERC20 token ABI:

Input:

  • ABI File: /home/user/contracts/ERC20.abi.json

Output:

  • ABI: a1b2c3d4-e5f6-7g8h-9i0j-k1l2m3n4o5p6

Using the ABI ID:

After parsing, use the ABI ID with:

  • ABI Method - Encode function calls
  • Decode - Decode transaction data
  • Subscribe - Listen to contract events
  • Pending Transactions - Filter transactions by method
tip

Store commonly used ABIs in your project directory for easy reuse across multiple automations.

info

You only need to parse an ABI once per flow execution. The same ABI ID can be used for multiple contract interactions.

Common Use Cases

ERC20 Token Operations: Parse the ERC20 ABI to call transfer, approve, and balanceOf functions.

NFT Contract Interaction: Use ERC721 or ERC1155 ABIs to mint, transfer, and query NFTs.

DeFi Protocol Automation: Load Uniswap, Aave, or other protocol ABIs to automate swaps, lending, and yield farming.

Custom Smart Contracts: Parse your own contract ABI to automate business logic and workflows.