> ## 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.

# Contracts

### Table Details

| Property            | Value                                                                    |
| ------------------- | ------------------------------------------------------------------------ |
| Table Name          | `casper.raw.contracts`                                                   |
| Table Status        | Production-Ready                                                         |
| Unique Key          | `block_timestamp`, `block_height`, `transaction_hash`, `transform_index` |
| Clustering Key(s)   | `to_date("block_timestamp")`                                             |
| Search Optimization | `contract_hash`, `contract_package_hash`                                 |

### Table Columns

| Column Name             | Data Type         | Description                                                                                           |
| ----------------------- | ----------------- | ----------------------------------------------------------------------------------------------------- |
| key                     | VARCHAR(16777216) | Global state key where the contract entity is stored.                                                 |
| entity\_type            | VARCHAR(16777216) | Type of contract entity: `Contract` (versioned implementation) or `ContractPackage` (stable package). |
| contract\_hash          | VARCHAR(16777216) | Per-version hash identifying this specific contract revision.                                         |
| contract\_package\_hash | VARCHAR(16777216) | Stable contract package hash that persists across upgrades.                                           |
| contract\_wasm\_hash    | VARCHAR(16777216) | Hash of the compiled Wasm bytecode for the contract.                                                  |
| cep18\_type             | VARCHAR(16777216) | CEP-18 classification if the contract is a fungible token.                                            |
| protocol\_version       | VARCHAR(16777216) | Casper protocol version the contract was deployed under.                                              |
| entry\_point\_names     | VARIANT           | List of entry point (callable function) names exposed by the contract.                                |
| entry\_points\_count    | NUMBER(38,0)      | Number of entry points exposed by the contract.                                                       |
| named\_key\_names       | VARIANT           | List of named key identifiers registered by the contract.                                             |
| named\_keys\_count      | NUMBER(38,0)      | Number of named keys registered by the contract.                                                      |
| era\_id                 | NUMBER(38,0)      | Era (epoch) the block belongs to.                                                                     |
| block\_timestamp        | TIMESTAMP\_NTZ(9) | Timestamp of the block this event was included in.                                                    |
| block\_height           | NUMBER(38,0)      | Height of the block this event was included in.                                                       |
| block\_hash             | VARCHAR(100)      | Hash of the block this event was included in.                                                         |
| transaction\_hash       | VARCHAR(100)      | Hash of the transaction this event belongs to.                                                        |
| transform\_index        | NUMBER(38,0)      | Index of the transform within the transaction's execution result.                                     |
| \_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.                                         |
