> ## Documentation Index
> Fetch the complete documentation index at: https://docs.allium.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Events

All events flattened from Canton's update tree. Each update contains a tree of events connected via parent/child relationships. There are two event types: `created_event` (a new Daml contract was created) and `exercised_event` (a choice was exercised on an existing contract). The event tree encodes the full call stack of a Canton transaction — the root is the top-level choice, and children are sub-choices triggered by it.

### Table Details

| Property | Value |
| - | - |
| Table Name | `canton.raw.events` |
| Table Status | Production-Ready |
| Unique Key | `record_time`, `event_id` |
| Clustering Key(s) | `to_date("record_time")` |

### Table Columns

| Column Name | Data Type | Description |
| - | - | - |
| event\_id | VARCHAR(16777216) | Unique identifier for this event, formatted as `update_id:index` (e.g., `1220d1ae...b412df:2`). The index suffix indicates position within the update's event tree. |
| event\_index | NUMBER(38,0) | Sequential index of this event within the update, derived from the event\_id suffix. |
| event\_type | VARCHAR(16777216) | Type of event: `created_event` (a new Daml contract was created) or `exercised_event` (a choice was exercised on an existing contract). |
| update\_id | VARCHAR(16777216) | The update (transaction) this event belongs to. Foreign key to `canton.raw.updates`. |
| record\_time | TIMESTAMP\_NTZ(9) | The timestamp at which the synchronizer sequenced the parent update. Inherited from the update. |
| migration\_id | NUMBER(38,0) | Synchronizer migration epoch. Canton upgrades increment this value (currently 0–4). The active migration\_id must match the time range being queried. |
| contract\_id | VARCHAR(16777216) | The Daml contract this event acts on. For exercised\_event, the contract being acted on. For created\_event, the newly created contract. |
| template\_id | VARCHAR(16777216) | The Daml template of the contract, formatted as `package_hash:Module.Path:TemplateName`. Identifies the contract type (e.g., `Splice.Amulet:Amulet`, `Splice.Round:OpenMiningRound`). |
| package\_name | VARCHAR(16777216) | Human-readable Daml package name (e.g., `splice-amulet`, `splice-dso-governance`, `splice-wallet`). |
| interface\_id | VARCHAR(16777216) | The Daml interface used when exercising the choice, if applicable. Non-null when the caller used an interface rather than the template directly (e.g., `Splice.Api.Token.TransferInstructionV1:TransferFactory`). |
| choice | VARCHAR(16777216) | The name of the Daml choice exercised (exercised\_event only). For example, `AmuletRules_Transfer`, `AmuletRules_BuyMemberTraffic`, `Archive`. |
| consuming | BOOLEAN | Whether exercising the choice archived (destroyed) the source contract. True for transfers that consume a UTXO; false for read-only or rules-contract choices. |
| acting\_parties | VARIANT | Array of parties that authorized this choice exercise. |
| signatories | VARIANT | Array of parties that signed the contract (for created\_event) or must consent to its creation. |
| observers | VARIANT | Array of parties that can observe this contract but are not signatories. |
| create\_arguments | VARIANT | The constructor arguments of the created contract (created\_event only). Contains the full contract payload including owner, amounts, and metadata. |
| choice\_argument | VARIANT | The arguments passed to the exercised choice (exercised\_event only). Contains what the caller requested, including sender, receiver, amount, and metadata. |
| exercise\_result | VARIANT | The return value of the exercised choice (exercised\_event only). For AmuletRules\_Transfer, contains the TransferSummary with accounting details (inputAmuletAmount, senderChangeAmount, amuletPrice, etc.). |
| event\_address | VARCHAR(16777216) | Dotted path showing this event's position in the update's event tree (e.g., null for root, `"0"` for first child of root, `"0,0"` for first grandchild). Used to reconstruct the call tree. |
| parent\_event\_id | VARCHAR(16777216) | The event\_id of the parent event in the tree. Null for root events. |
| block\_number | NUMBER(38,0) | Synthetic 1-second block index inherited from the parent update. |
| block\_timestamp | TIMESTAMP\_NTZ(9) | Start timestamp of the synthetic 1-second block window for this event. |
| contract\_created\_at | TIMESTAMP\_NTZ(9) | For exercised\_event, the record\_time when this contract was originally created. Useful for computing contract lifetime. |
| child\_event\_ids | VARIANT | Array of event\_ids that are direct children of this event in the tree. Follow these to traverse the full call tree. |
| child\_event\_count | NUMBER(38,0) | Number of direct child events triggered by this event. |
| output\_count | NUMBER(38,0) | For AmuletRules\_Transfer events, the number of transfer outputs (receiver Amulets created). Used for structural validation. |
| \_created\_at | TIMESTAMP\_NTZ(9) | Timestamp of when the entry was created in the database. |
| \_updated\_at | TIMESTAMP\_NTZ(9) | Timestamp of when the entry was last updated in the database. |
