Skip to main content

History Contract Events

Table Metadata

PropertyConfiguration
Natural Key(s)
Partition Field(s)closed_at (MONTH partition)
Clustered Field(s)contract_id
Documentationdbt docs

Column Details

NameDescriptionData TypeDomain ValuesRequired?Notes
transaction_hashA hex-encoded SHA-256 hash of this transaction's XDR-encoded formstring
transaction_idThe transaction identifier in which the operation executed. There can be up to 100 operations in a given transactionintegerYes
successfulIndicates if this transaction was successful or notbooleanNoA transaction's success does not indicate whether it was included and written to a ledger. It only indicates whether the operations in the transaction were successfully applied to mutate the ledger state.
in_successful_contract_callIndicates whether or not the event is in a successful contract callbooleanYes
contract_idstring
typeThe numeric event typeinteger0, 1, 2Yes
type_stringThe string event typestringContractEventTypeSystem, ContractEventTypeDiagnostic, ContractEventTypeContractYes
topicsThe topics part of an event contains identifying information and metadata for the event and generally what the event signifies. For example, for SAC this could be a "transfer" event signifying token value movement. The values within topics are base64 encoded XDRjsonYes
topics_decodedDecoded, human readable version of the event topicjsonYes
dataThe data part of an event is an object that contains the value(s) significant to an event. For example, for SAC this could be the "amount" of the token movement from a "transfer" event. The values within topics are base64 encoded XDRjsonYes
data_decodedDecoded, human readable version of the event data objectjsonYes
contract_event_xdrThe base64 encoded XDR of the eventstringYes
batch_idString representation of the run id for a given DAG in Airflow. Takes the form of "scheduled__[batch_end_date]-[dag_alias]". Batch ids are unique to the batch and help with monitoring and rerun capabilitiesstringYes
batch_run_dateThe start date for the batch interval. When taken with the date in the batch_id, the date represents the interval of ledgers processed. The batch run date can be seen as a proxy of closed_at for a ledger.datetimeYes
batch_insert_tsThe timestamp in UTC when a batch of records was inserted into the database. This field can help identify if a batch executed in real time or as part of a backfilltimestampYes
closed_atTimestamp in UTC when this ledger closed and committed to the network. Ledgers are expected to close ~every 5 secondstimestampYes
ledger_sequenceThe sequence number of the ledger that this transaction was included inintegerYes