decode_gmx_event

Documentation for eth_defi.gmx.events.decode_gmx_event function.

decode_gmx_event(web3, log, event_emitter_contract=None)

Decode a single GMX EventLog from a transaction log entry.

This function handles EventLog, EventLog1, and EventLog2 events emitted by the GMX EventEmitter contract.

Parameters
  • web3 (web3.main.Web3) – Web3 instance

  • log (dict) – A single log entry from transaction receipt

  • event_emitter_contract (web3.contract.contract.Contract | None) – Optional pre-built EventEmitter contract instance. When decoding many logs in a loop, passing a cached contract avoids repeated lookups.

Returns

Parsed GMXEventData or None if not a GMX event

Return type

eth_defi.gmx.events.GMXEventData | None