# Contracts

Contracts table records all the smart contracts deployed on the blockchain. Each row represents a unique contract and contains information about its address, creator, creation code, deployed code, and the transaction and block details associated with its deployment.

## ETL data class

| Column Name                | Data Type | Note |
| -------------------------- | --------- | ---- |
| address                    | str       |      |
| name                       | str       |      |
| contract\_creator          | str       |      |
| creation\_code             | str       |      |
| deployed\_code             | str       |      |
| block\_number              | int       |      |
| block\_hash                | str       |      |
| block\_timestamp           | timestamp |      |
| transaction\_index         | int       |      |
| transaction\_hash          | str       |      |
| transaction\_from\_address | str       |      |

Examples

```json

{
  "address": "0x7c6ba614a28d505ef254cb888db872763d6f5b85",
  "name": null,
  "contract_creator": "0xb3b41365f9179ac0711727ade3e0879c0aaa273b",
  "creation_code": null,
  "deployed_code": null,
  "block_number": 849291,
  "block_hash": "0xbd334c7a4dcd83d6f85b7cacef214433131cc8098f5014b050b15336fd00d535",
  "block_timestamp": "2023-11-13T09:39:42.000Z",
  "transaction_index": 0,
  "transaction_hash": "0x0a16c572c35fc45e65e8daf28c3d58358566d5b69feb0557272812e22a75e7cc",
  "transaction_from_address": "0xb3b41365f9179ac0711727ade3e0879c0aaa273b"
}
```

```csv
0x7c6ba614a28d505ef254cb888db872763d6f5b85,,0xb3b41365f9179ac0711727ade3e0879c0aaa273b,,,849291,0xbd334c7a4dcd83d6f85b7cacef214433131cc8098f5014b050b15336fd00d535,2023-11-13T09:39:42.000Z,0,0x0a16c572c35fc45e65e8daf28c3d58358566d5b69feb0557272812e22a75e7cc,0xb3b41365f9179ac0711727ade3e0879c0aaa273b
```

## Model in the Database

| Column Name                | Data Type | Note          |
| -------------------------- | --------- | ------------- |
| address                    | bytea     | primary key   |
| name                       | varchar   |               |
| contract\_creator          | bytea     |               |
| creation\_code             | bytea     |               |
| deployed\_code             | bytea     |               |
| block\_number              | bigint    |               |
| block\_hash                | bytea     |               |
| block\_timestamp           | timestamp |               |
| transaction\_index         | integer   |               |
| transaction\_hash          | bytea     |               |
| transaction\_from\_address | bytea     |               |
| create\_time               | timestamp | default now() |
| update\_time               | timestamp | default now() |

```csv
\\x7c6ba614a28d505ef254cb888db872763d6f5b85,,\\xb3b41365f9179ac0711727ade3e0879c0aaa273b,,,849291,\\xbd334c7a4dcd83d6f85b7cacef214433131cc8098f5014b050b15336fd00d535,2023-11-13 09:39:42.000000,0,\\x0a16c572c35fc45e65e8daf28c3d58358566d5b69feb0557272812e22a75e7cc,\\xb3b41365f9179ac0711727ade3e0879c0aaa273b,2023-11-13 09:39:42.000000,2023-11-13 09:39:42.000000
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.thehemera.com/hemera-indexer/data-class/generated-tables/contracts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
