Skip to main content

ABI Method

Encodes a smart contract method call with its arguments, preparing transaction data for execution via Call or Send Transaction nodes.

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 - The ABI ID returned from the Parse ABI node.
  • ABI Method - The name of the contract method to call (e.g., "transfer", "approve", "balanceOf").
  • Args - An array of arguments to pass to the method, matching the method's parameter types.

Output

  • Transaction ID - A unique identifier for the encoded transaction data. Use this with Call (for read operations) or Send Transaction (for write operations) nodes.

How It Works

The ABI Method node encodes a smart contract function call into transaction data. When executed, the node:

  1. Validates the ABI ID and retrieves the parsed ABI
  2. Finds the specified method in the ABI definition
  3. Validates and encodes the provided arguments according to the method signature
  4. Creates a transaction data payload
  5. Returns a Transaction ID for use with execution nodes

Requirements

  • A valid ABI ID from the Parse ABI node
  • The exact method name as defined in the contract
  • Arguments matching the method's parameter types and order
  • Properly formatted argument values

Argument Types and Formatting

Common Solidity Types

Address:

"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"

uint256 / Numbers:

"1000000000000000000"

String:

"Hello, Blockchain!"

Boolean:

true

Array:

["0x123...", "0x456..."]

Bytes:

"0x1234567890abcdef"

Error Handling

The node will return errors for:

  • Empty or invalid ABI ID
  • ABI not found (Parse ABI must be called first)
  • Method name not found in the ABI
  • Incorrect number of arguments
  • Type mismatches in arguments
  • Invalid argument formatting

Usage Notes

  • Method names are case-sensitive and must match exactly
  • Arguments must be provided in the exact order defined in the ABI
  • For methods with no parameters, pass an empty array []
  • The Transaction ID is temporary and only valid during flow execution
  • Use Call node for read-only methods (view/pure functions)
  • Use Send Transaction node for state-changing methods

Example

Encoding an ERC20 transfer:

Inputs:

  • ABI: a1b2c3d4-e5f6-7g8h-9i0j-k1l2m3n4o5p6 (from Parse ABI)
  • ABI Method: transfer
  • Args:
    [
    "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
    "1000000000000000000"
    ]

Output:

  • Transaction ID: tx-9f8e7d6c-5b4a-3c2b-1a0e-f9d8c7b6a5e4

Encoding a balanceOf query (no state change):

Inputs:

  • ABI: a1b2c3d4-e5f6-7g8h-9i0j-k1l2m3n4o5p6
  • ABI Method: balanceOf
  • Args:
    ["0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"]

Encoding approve with unlimited allowance:

Inputs:

  • ABI: a1b2c3d4-e5f6-7g8h-9i0j-k1l2m3n4o5p6
  • ABI Method: approve
  • Args:
    [
    "0x1234567890123456789012345678901234567890",
    "115792089237316195423570985008687907853269984665640564039457584007913129639935"
    ]

Common Use Cases

Token Transfers: Encode transfer() or transferFrom() methods for moving tokens.

Approvals: Encode approve() to allow contracts to spend your tokens.

Balance Queries: Encode balanceOf() to check token holdings.

NFT Operations: Encode mint(), safeTransferFrom(), or approve() for NFT interactions.

DeFi Actions: Encode swap(), deposit(), withdraw(), or harvest() for DeFi protocols.

tip

Use the Call node after ABI Method for read-only operations that don't cost gas. Use Send Transaction for operations that modify blockchain state.

warning

Always verify the contract address and method arguments before sending transactions. Incorrect arguments can result in failed transactions and lost gas fees.