Skip to main content

Module abi

Module abi 

Source
Expand description

§ABI Parsing and Function Signature Decoding

Provides function selector lookup via 4byte.directory and ABI-based parameter decoding for transaction calldata.

§Function Signature Resolution

  1. If contract ABI is available (verified source), decode directly from ABI
  2. Otherwise, look up the 4-byte selector on 4byte.directory (free, no API key)
  3. Fallback: display raw selector hex

§Calldata Decoding

For verified contracts with ABI, decodes full calldata parameters using ABI type information. For unverified contracts, only the function name is resolved from the selector.

Structs§

DecodedCall
A decoded function call from transaction input data.
DecodedParam
A decoded parameter from calldata.

Enums§

DecodeSource
Source of the function signature resolution.

Functions§

build_selector_map
Build a selector-to-signature map from a contract’s parsed ABI.
decode_calldata
Decode transaction input data using available sources.
get_events
Get all events from an ABI.
get_state_changing_functions
Get all state-changing functions from an ABI.