parseContractEventsXdr

Parses the contractEventsXdr field from a nested list of base64-encoded XDR strings to a nested list of typed ContractEvent objects.

Contract events are explicitly emitted by smart contracts and contain application-specific data. The outer list corresponds to operations in the transaction, and the inner lists contain all events emitted by each operation's contract invocation.

Common uses for contract events:

  • State change notifications (e.g., token transfers, balance updates)

  • Cross-contract communication

  • Logging and auditing

  • Off-chain indexing

Return

A nested list of parsed ContractEvent XDR objects, or null if no contract events exist.

Throws

if any XDR string is malformed or cannot be decoded.