# Contract Internal Transactions

The Contract Internal Transactions table is used to store data extracted from transaction traces. It specifically focuses on traces related to contract creation or traces that involve a transfer of value.

## ETL data class

| Column Name        | Data Type | Note        |
| ------------------ | --------- | ----------- |
| transaction\_hash  | str       | length 66   |
| transaction\_index | int       |             |
| from\_address      | str       | length 42   |
| to\_address        | str       | length 42   |
| value              | int       |             |
| trace\_type        | str       | length 16   |
| call\_type         | str       | length 16   |
| gas                | int       |             |
| gas\_used          | int       |             |
| subtraces          | int       |             |
| trace\_address     | str       | length 8192 |
| error              | str       |             |
| status             | int       |             |
| block\_timestamp   | timestamp |             |
| block\_number      | int       |             |
| block\_hash        | str       | length 66   |
| trace\_id          | str       |             |

Examples

```json
{
  "transaction_hash": "0xd5b40b43483e3aee69f781c3547ff14895244823e766f6f0a696518d3ec05fac",
  "transaction_index": 4,
  "from_address": "0xd06f95a78553fd94b05281aa97e8afd87af48cef",
  "to_address": "0x5dac7efe0b4cd2cabdd350efc0c69bcaa81e76c6",
  "value": 6499999999997945,
  "trace_type": "call",
  "call_type": "call",
  "gas": 371201,
  "gas_used": 312121,
  "subtraces": null,
  "trace_address": "{}",
  "error": null,
  "status": 1,
  "block_timestamp": "2023-10-29T03:34:19.000Z",
  "block_number": 435530,
  "block_hash": "0x68189ad6461faff3837f22571813eb507de3bdca2d1c9b596f233bd1fc8ff810",
  "trace_id": "435530_4_0"
}
```

```csv
0xd5b40b43483e3aee69f781c3547ff14895244823e766f6f0a696518d3ec05fac,4,0xd06f95a78553fd94b05281aa97e8afd87af48cef,0x5dac7efe0b4cd2cabdd350efc0c69bcaa81e76c6,6499999999997945,call,call,371201,312121,,{},,,2023-10-29T03:34:19.000Z,435530,0x68189ad6461faff3837f22571813eb507de3bdca2d1c9b596f233bd1fc8ff810,435530_4_0
```

## Model in the Database

| Column Name        | Data Type   | Note |
| ------------------ | ----------- | ---- |
| transaction\_hash  | bytea       |      |
| transaction\_index | bigint      |      |
| from\_address      | bytea       |      |
| to\_address        | bytea       |      |
| value              | numeric(78) |      |
| trace\_type        | varchar     |      |
| call\_type         | varchar     |      |
| gas                | numeric(38) |      |
| gas\_used          | numeric(38) |      |
| subtraces          | bigint      |      |
| trace\_address     | varchar     |      |
| error              | text        |      |
| status             | integer     |      |
| block\_timestamp   | timestamp   |      |
| block\_number      | bigint      |      |
| block\_hash        | bytea       |      |
| trace\_id          | text        |      |

Examples

```json
{
  "transaction_hash": "E'\\\\xd5b40b43483e3aee69f781c3547ff14895244823e766f6f0a696518d3ec05fac'",
  "transaction_index": 4,
  "from_address": "E'\\\\xd06f95a78553fd94b05281aa97e8afd87af48cef'",
  "to_address": "E'\\\\x5dac7efe0b4cd2cabdd350efc0c69bcaa81e76c6'",
  "value": 6499999999997945,
  "trace_type": "call",
  "call_type": "call",
  "gas": 371201,
  "gas_used": 312121,
  "subtraces": null,
  "trace_address": "{}",
  "error": null,
  "status": 1,
  "block_timestamp": "2023-10-29 03:34:19.000000",
  "block_number": 435530,
  "block_hash": "E'\\\\x68189ad6461faff3837f22571813eb507de3bdca2d1c9b596f233bd1fc8ff810'",
  "trace_id": "435530_4_0"
}
```

```csv
\\xd5b40b43483e3aee69f781c3547ff14895244823e766f6f0a696518d3ec05fac,4,\\xd06f95a78553fd94b05281aa97e8afd87af48cef,\\x5dac7efe0b4cd2cabdd350efc0c69bcaa81e76c6,6499999999997945,call,call,371201,312121,,{},,,1,2023-10-29 03:34:19.000000,435530,\\x68189ad6461faff3837f22571813eb507de3bdca2d1c9b596f233bd1fc8ff810,435530_4_0
```
