Skip to main content
CallDataDecoded represents the structured form of calldata after parsing the function selector and ABI-decoding the parameters.

Structure

Fields

selector - 4-byte function identifier
  • First 4 bytes of keccak256 hash of function signature
  • Required for all function calls
  • Immutable once created
signature - Optional function signature string
  • Human-readable like "transfer(address,uint256)"
  • Useful for debugging and logging
  • Not required for execution (EVM only uses selector)
parameters - Decoded ABI parameter values
  • Array of structured ABI values
  • Preserves type information
  • Enables type-safe parameter access

Decoding CallData

Encoding to CallData

Working with Parameters

Type-Safe Access

Dynamic Parameters

Selector Operations

Matching Selectors

Computing Selectors

Memory Management (Zig)

In Zig, CallDataDecoded owns allocated memory:

Signature Resolution

Known Signatures

4byte.directory API

See Also