Tailflow
Skip to article
Browse documentation

Contract lookup · Action

Find function by signature

Looks up the human-readable signature behind a four-byte function selector or an event topic, such as transfer(address,uint256).

When to use it

Saying what a transaction to an unverified contract did: swap, approve, multicall, rather than a string of hex.

At a glance

IntegrationContract lookup
Credits1
ConnectionNone

Settings

selectorRequiredAccepts event fields
Selector or topic. A transaction's input, a four-byte selector such as 0xa9059cbb, or an event's first topic.

What it hands on

Actions run in order, and each one can read what the actions above it produced. This one writes the fields below; a later action reaches them as {{ actions.contract_find_function_1.signature }} — the action’s key, then which one it is if you use more than one of the same kind.

signature
The most likely signature, such as transfer(address,uint256). Empty when none is known.
signatures
Every known signature for the selector, most likely first.
name
The function or event name alone, such as transfer.

Good to know

  • Give it a whole transaction input and it takes the selector from the start of it.
  • A selector is only four bytes, so unrelated functions can share one, and anybody can add a signature to the list. The first match is a likely name, not a certain one. Signatures used by a verified contract are listed first.
  • A selector or topic nobody has recorded completes with signature empty rather than failing.