Skip to main content

Contract Data

Table Metadata

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

Column Details

NameDescriptionData TypeDomain ValuesRequired?Notes
contract_idSoroban contract idstringYes
contract_key_typeContract key type which is an ScVal that can have the following valuesstring
contract_durabilityContract can either be temporary or persistentstring
asset_codeThe 4 or 12 character code representation of the asset on the network.string
asset_issuerThe account address of the original asset issuer that created the asset.string
asset_typeThe identifier for type of asset code, can be an alphanumeric with 4 characters, 12 characters or the native asset to the network, XLM.string
balance_holderThe address/account that holds the balance of the asset in contract datastring
balanceThe number of units of XLM held by the accountstring
last_modified_ledgerThe ledger sequence number when the ledger entry (this unique signer for the account) was modified. Deletions do not count as a modification and will report the prior modification sequence numberintegerYes
ledger_entry_changeCode that describes the ledger entry change type that was applied to the ledger entry.integerYes
deletedIndicates whether the ledger entry (balance id) has been deleted or not. Once an entry is deleted, it cannot be recovered.booleanYes
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 this ledger. It represents the order of the ledger within the Stellar blockchain. Each ledger has a unique sequence number that increments with every new ledger, ensuring that ledgers are processed in the correct order.integerYes
ledger_key_hashLedger key hash used to identify expiring contract data or contract code ledger entriesstringYes
keyThe encoded key used to identify a specific piece of contract data. The encoded key has two components (type and value) where type describes the data type and the value describes the encoded value of the data type for the contract datajson
key_decodedThe human-readable or decoded version of the key. This provides an understandable format of the key, making it easier to interpret and use in analysisjson
valThe encoded value associated with the key in the contract data. The encoded val has two components (type and value) where type describes the data type and the value describes the encoded value of the data type for the contract datajson
val_decodedThe human-readable or decoded version of the value. This provides a clear and understandable representation of the value, making it easier to interpret and use in analysisjson
contract_data_xdrThe XDR (External Data Representation) encoding of the contract data. XDR is a standard format used to serialize and deserialize data, ensuring interoperability across different systems. This field contains the raw, serialized contract data in XDR formatstring