Execute.decodeData
Decodes calls from ERC-7821 execute function data.
Decodes the single batch modes only (mode.default and mode.opData). Throws Execute.UnsupportedModeError for the "batch of batches" mode (use Execute.decodeBatchOfBatchesData instead) and for unknown modes.
Imports
Named
import { Execute } from 'ox/erc7821'Examples
import { Execute } from 'ox/erc7821'
const { calls } = Execute.decodeData('0x...')Definition
function decodeData(
data: Hex.Hex,
): decodeData.ReturnTypeSource: src/erc7821/Execute.ts
Parameters
data
- Type:
Hex.Hex
The encoded data.
Return Type
The decoded calls and optional opData.
decodeData.ReturnType

