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

The contracts table contains all the deployed contracts with bytecode data identified from trace `create` and `create2` opcodes.

A "smart contract" is simply a program that runs on the EVM blockchain. It's a collection of code (its functions) and data (its state) that resides at a specific address on the blockchain.

Deploying a smart contract on EVM chains typically involves sending a transaction containing the compiled code of the smart contract without specifying any recipient.

### Table Details

| Property | Value |
| - | - |
| Table Name | `tron.raw.contracts` |
| Table Status | Production-Ready |
| Unique Key | `block_timestamp::date`, `unique_id` |
| Search Optimization | `address`, `origin_address` |

### Table Columns

| Column Name | Data Type | Description |
| - | - | - |
| create\_type | VARCHAR(18) | Contracts can be created at transaction or trace (internal transactions) level on Tron. For trace contract, there are no ABIs available. |
| result | VARCHAR(16777216) | Result code of the Hedera transaction (e.g. `SUCCESS`, `INSUFFICIENT_ACCOUNT_BALANCE`). |
| address | VARCHAR(34) | Contract address. |
| name | VARCHAR(134217728) | Market display name. |
| bytecode | VARCHAR(134217728) | The bytecode data of this contract. |
| abi | VARIANT | The Application Binary Interface (ABI) of the contract in JSON format |
| origin\_energy\_limit | NUMBER(38,0) | Value of owner consume energy limit for each transaction. |
| consume\_user\_resource\_percent | NUMBER(38,0) | User energy payment percentage of the whole energy payment which includes both contract deployer payment and user energy payment. |
| call\_value | NUMBER(38,0) | TRX amount sent to smart contract during creation. |
| receipt\_contract\_result | VARCHAR(134217728) | The contract result of this transaction. |
| receipt\_fee | NUMBER(38,0) | The transaction fee used. |
| fee\_limit | NUMBER(38,0) | The cost limit for energy and fee when trigger and create contract. |
| origin\_address | VARCHAR(16777216) | Address of smart contract owner at creation.. |
| transaction\_hash | VARCHAR(64) | The transaction hash of the block that this contract was created in. |
| block\_hash | VARCHAR(16777216) | The hash of the block that this contract was created in. |
| block\_number | NUMBER(38,0) | The number of the block that this contract was created in. |
| block\_timestamp | TIMESTAMP\_NTZ(9) | The timestamp of the block that this contract was created in. |
| raw\_data\_hex | VARCHAR(16777216) | Raw data in transaction. |
| unique\_id | VARCHAR(16777216) | Allium's deterministic unique identifier for this row. Generated from the fields that uniquely identify the record (e.g. transaction hash + log index). Stable across full refreshes. |
| \_stg\_created\_at | TIMESTAMP\_NTZ(9) | Internal staging timestamp recording when this row was first written to the staging layer. |
| \_created\_at | TIMESTAMP\_NTZ(9) | Timestamp of the entry creation. |
| \_updated\_at | TIMESTAMP\_NTZ(9) | Timestamp of the entry update. |

### Related Docs

* [EVM Raw Contracts](https://docs.allium.so/historical-data/supported-blockchains/evm/core-schemas/raw/contracts.md)
