Events

@Serializable
data class Events(val diagnosticEventsXdr: List<String>? = null, val transactionEventsXdr: List<String>? = null, val contractEventsXdr: List<List<String>>? = null)

Container for Soroban events emitted during transaction execution or simulation.

Events provide insight into smart contract execution, including diagnostic information, transaction-level events, and contract-specific events. Events are returned as base64-encoded XDR strings and can be parsed into typed XDR objects for detailed analysis.

This class is used by various response types including SimulateTransactionResponse, GetTransactionResponse, and GetEventsResponse to encapsulate event data.

See also

Constructors

Link copied to clipboard
constructor(diagnosticEventsXdr: List<String>? = null, transactionEventsXdr: List<String>? = null, contractEventsXdr: List<List<String>>? = null)

Properties

Link copied to clipboard

Nested list of contract events in base64-encoded XDR format. The outer list corresponds to operations in the transaction, and the inner lists contain events emitted by each operation. Contract events are explicitly emitted by smart contracts using the events SDK functions. Can be parsed using parseContractEventsXdr.

Link copied to clipboard

List of diagnostic events in base64-encoded XDR format. Diagnostic events are emitted by the runtime for debugging purposes and include detailed information about contract execution. Can be parsed using parseDiagnosticEventsXdr.

Link copied to clipboard

List of transaction-level events in base64-encoded XDR format. These events are associated with the transaction as a whole. Can be parsed using parseTransactionEventsXdr.

Functions

Link copied to clipboard

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

Link copied to clipboard

Parses the diagnosticEventsXdr field from a list of base64-encoded XDR strings to a list of typed DiagnosticEvent objects.

Link copied to clipboard

Parses the transactionEventsXdr field from a list of base64-encoded XDR strings to a list of typed TransactionEvent objects.