Crate tiders_evm_decode

Crate tiders_evm_decode 

Source
Expand description

§tiders-evm-decode

Decodes EVM smart contract data from binary format into Apache Arrow RecordBatches.

Supports three types of decoding:

  • Event logs (decode_events) — Decodes indexed topics and non-indexed body data using Solidity event signatures (e.g. "Transfer(address indexed,address indexed,uint256)").
  • Function call inputs (decode_call_inputs) — Decodes ABI-encoded calldata.
  • Function call outputs (decode_call_outputs) — Decodes ABI-encoded return data.

Also provides ABI parsing utilities (abi_events, abi_functions) to extract event/function signatures from JSON ABI files, and schema generation functions to preview the Arrow output schema without decoding data.

All decoded output uses Arrow’s columnar format with support for arbitrarily nested Solidity types (tuples, arrays, structs) mapped to Arrow Struct and List types.

Structs§

EvmAbiEvent
Parsed event info extracted from a JSON ABI.
EvmAbiFunction
Parsed function info extracted from a JSON ABI.

Functions§

abi_events
Parse a JSON ABI string and extract all events.
abi_functions
Parse a JSON ABI string and extract all functions.
decode_call_inputs
Decodes given call input data in arrow format to arrow format. Output Arrow schema is auto generated based on the function signature. Handles any level of nesting with Lists/Structs.
decode_call_outputs
Decodes given call output data in arrow format to arrow format. Output Arrow schema is auto generated based on the function signature. Handles any level of nesting with Lists/Structs.
decode_events
Decodes given event data in arrow format to arrow format. Output Arrow schema is auto generated based on the event signature. Handles any level of nesting with Lists/Structs.
event_signature_to_arrow_schema
Returns the Arrow schema that decode_events would produce for the given event signature.
function_signature_to_arrow_schemas
Returns the Arrow schemas for a function’s inputs and outputs as (input_schema, output_schema).
signature_to_topic0
Returns topic0 based on given event signature