Tailflow
Skip to article
Browse documentation

Actions

Decode

Read contract calldata or event data using an ABI.

Choose data and an ABI

An ABI describes how a contract’s functions and events are encoded. Add Decode, set Encoded data, and select the ABI for the contract whose bytes you are interpreting.

For Transaction in Contract, use {{ event.input }} to decode the call. Contract events can carry raw data and topics for event decoding. A token transfer or price sample does not necessarily carry the raw input you need.

Decode Action Configuration
Path 1
Every event
Decode
Selected action
1Decode
Continue on error
A failure stops later actions on this path.
Example. Encoded data selects the input to interpret. Choose the ABI for that contract, then test to inspect the decoded arguments.Changes stay in this example. Nothing is saved or sent.

Find or add an ABI

Search by contract name or address. Check its chain and address, since similarly named contracts may have different interfaces. For a proxy, use an ABI that describes the called implementation.

Use Add ABI when your interface is missing. Enter the requested address, name, and ABI JSON, then use it in the action. Account ABIs are reusable; removing one can break actions that rely on it.

ABI Selection and Add ABI Dialog
ABI
+ Add ABI
Add ABI
Use ABI
Example. Search by name or address and check the chain. Add ABI opens the contract address, optional name, and ABI fields; Use ABI saves and selects it.Changes stay in this example. Nothing is saved or sent.

Use the result

Run a test and inspect the decoded output. Later actions can reference fields under actions.decode_1, including args. Copy the exact argument path from the output rather than guessing its name.

If decoding fails, confirm the input is nonempty, the correct kind of encoded data, and compatible with the ABI. Function calls return positional arguments in an array; use paths such as args.0 and args.1. Decoding does not automatically convert integers to human-readable token units.

Decode Output: USDC Transfer
Path 1
Every event
Decode
Selected action
1Decode
Sample output
kind
call
name
transfer
args.0 · recipient
0x1111111111111111111111111111111111111111
args.1 · raw amount
25000000
Continue on error
A failure stops later actions on this path.
Example. Sample output for transfer(address,uint256). Later actions read actions.decode_1.args.0 for the recipient and actions.decode_1.args.1 for the raw amount.Changes stay in this example. Nothing is saved or sent.

Example: a USDC transfer call

Consider a call to the USDC token contract on Ethereum: 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48. Its transfer(address,uint256) function requests a transfer to a recipient with an amount in raw token units.

This is an illustrative call for 25 USDC to 0x1111111111111111111111111111111111111111, not a real transaction. USDC uses six decimal places, so 25 USDC is represented as 25000000.

  1. Choose Transaction in Contract on Ethereum and select the USDC contract address.
  2. Add Decode and select the USDC ABI for Ethereum. For a proxy contract, use the interface containing transfer, not only proxy-management functions.
  3. Leave Encoded data set to {{ event.input }}. Test run decodes the matching example’s input; an actual example may call a different function.
USDC Contract Transaction Trigger
Event source
Trigger
Use the ABI that contains transfer(address,uint256) in the Decode action.
Example. Select Transaction in Contract and the Ethereum USDC address, then add Decode to interpret the call input.Changes stay in this example. Nothing is saved or sent.

The encoded input

The first four bytes, 0xa9059cbb, identify transfer(address,uint256). The following two 32-byte values encode the recipient and amount. Here is the complete sample calldata:

Decode interprets these bytes using the selected ABI. It decodes the function call, not the contract’s source code.

Encoded calldata
0xa9059cbb000000000000000000000000111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000017d7840

The decoded output

For this input and ABI, the action returns the object below under actions.decode_1. Integer values are strings so large amounts retain their precision.

Call arguments are positional: args.0 is the recipient and args.1 is the raw amount. Although the ABI names them to and value, this call output does not expose args.to or args.value.

The decoded output output fields
Field · typeMeaning and availability
kindstring"call" for function calldata. A decoded event log instead has kind "log".
namestringFunction name: "transfer" in this example.
args.0stringThe first function argument: the recipient address.
args.1stringThe second function argument: "25000000", the amount in raw USDC units.
Decode Output: USDC Transfer
Path 1
Every event
Decode
Selected action
1Decode
Sample output
kind
call
name
transfer
args.0 · recipient
0x1111111111111111111111111111111111111111
args.1 · raw amount
25000000
Continue on error
A failure stops later actions on this path.
Example. Sample output for transfer(address,uint256). Later actions read actions.decode_1.args.0 for the recipient and actions.decode_1.args.1 for the raw amount.Changes stay in this example. Nothing is saved or sent.
JSON
{
  "kind": "call",
  "name": "transfer",
  "args": [
    "0x1111111111111111111111111111111111111111",
    "25000000"
  ]
}

Use the result in a message

Place Email or Slack after Decode on the same path. Use the action’s displayed output key; a second Decode action uses decode_2.

Dividing by 1000000 is correct for this USDC example. Other tokens can have different decimals; Decode does not determine a token’s decimals for you.

  1. The rendered function is transfer.
  2. The rendered recipient is 0x1111111111111111111111111111111111111111.
  3. The rendered requested amount is 25 USDC.
Email Configuration with Decode Output
Decode · Output
actions.decode_1.name
transfer
actions.decode_1.args.1
25000000
Email
Example. Place Email after Decode on the same path. The raw USDC amount is divided by 1000000 for this token only.Changes stay in this example. Nothing is saved or sent.
Message template
Function: {{ actions.decode_1.name }}
Recipient: {{ actions.decode_1.args.0 }}
Requested amount: {{ actions.decode_1.args.1 / 1000000 }} USDC

A decoded call is not proof of a transfer

The input describes what the caller requested. It can be decoded even if the transaction reverted. Check the transaction’s success status and emitted transfer events before describing the requested transfer as completed.

Named event-log arguments can have paths such as args.value; they are a different output shape from this function-call array. Inspect the actual Output panel before writing a template.

Transaction Input and Event Logs
Event shape
input
0xa9059cbb…
succeeded
true
from_address
0x1111111111111111111111111111111111111111
Event shape · logs
logs.0.name
Transfer
logs.0.address
0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
logs.0.args.value
25000000
Example. Select a transaction example. Input describes the request; Succeeded tells you whether the transaction succeeded.Changes stay in this example. Nothing is saved or sent.