Skip to main content

Try it Live

Run ABI examples in the interactive playground

Overview

Abi.decodeData inspects calldata, matches the selector to a function in your ABI, and decodes the arguments. Use this when you have raw transaction calldata and want to recover the called function and parameters.

Quick Start

Unknown Selectors

If the selector does not match any function in the ABI, Abi.decodeData throws AbiItemNotFoundError.

Decode Parameters Without Selector

If you already know the function and only have parameters (no selector), decode with Abi.Function.decodeParams or Abi.decodeParameters:

See Also