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

# Uniswap V4

> Get events emitted by Uniswap V4 protocols.

The `dex.uniswap_v4_events` table contains the following events emitted by UniswapV4 PoolManger:

* OperatorSet, OwnershipTransferred, ProtocolFeeControllerUpdated, Transfer, ProtocolFeeUpdated, Initialize, Swap, ModifyLiquidity, Donate

<Info>
  - For the flash event, the event log is separated into flash and flash\_paid

  - Columns appended with `_str` are in string format and will retain precision

  - Note that not all columns are applicabel to all events.
</Info>

### Table Columns

Unique Key: `unique_id`

| Column Name                | Data Type         | Description                                                |
| -------------------------- | ----------------- | ---------------------------------------------------------- |
| project                    | VARCHAR           | Name of the project (e.g., uniswap)                        |
| protocol                   | VARCHAR           | DEX protocol or project contract (e.g., uniswap\_v4)       |
| contract\_address          | VARCHAR           | The contract address which emitted the event               |
| event\_name                | VARCHAR           | Name of the emitted event                                  |
| params                     | VARIANT           | The decoded event parameters and their values              |
| hooks                      | VARCHAR           | Hook contract address if applicable                        |
| id                         | VARCHAR           | Unique identifier for the position or operation            |
| token0\_address            | VARCHAR           | Token0 contract address                                    |
| token0\_symbol             | VARCHAR           | Token0 symbol                                              |
| token0\_name               | VARCHAR           | Token0 name                                                |
| token0\_decimals           | BIGINT            | Token0 decimals                                            |
| token0\_amount\_raw\_str   | VARCHAR           | Token0 amount unnormalized, in string format for precision |
| token0\_amount\_raw        | FLOAT             | Token0 amount unnormalized                                 |
| token0\_amount\_str        | VARCHAR           | Token0 amount normalized, in string format for precision   |
| token0\_amount             | FLOAT             | Token0 amount normalized                                   |
| token0\_amount\_usd        | FLOAT             | Token0 USD amount                                          |
| token0\_price\_usd         | FLOAT             | Token0 hourly USD price at event time                      |
| token1\_address            | VARCHAR           | Token1 contract address                                    |
| token1\_symbol             | VARCHAR           | Token1 symbol                                              |
| token1\_name               | VARCHAR           | Token1 name                                                |
| token1\_decimals           | BIGINT            | Token1 decimals                                            |
| token1\_amount\_raw\_str   | VARCHAR           | Token1 amount unnormalized, in string format for precision |
| token1\_amount\_raw        | FLOAT             | Token1 amount unnormalized                                 |
| token1\_amount\_str        | VARCHAR           | Token1 amount normalized, in string format for precision   |
| token1\_amount             | FLOAT             | Token1 amount normalized                                   |
| token1\_amount\_usd        | FLOAT             | Token1 USD amount                                          |
| token1\_price\_usd         | FLOAT             | Token1 hourly USD price at event time                      |
| liquidity                  | VARCHAR           | Liquidity field                                            |
| sqrt\_price\_x96           | VARCHAR           | Square root 96 price                                       |
| transaction\_from\_address | VARCHAR           | The sending party address                                  |
| transaction\_to\_address   | VARCHAR           | The receiving party address                                |
| transaction\_hash          | VARCHAR           | Transaction hash                                           |
| transaction\_index         | BIGINT            | Transaction index in the block                             |
| log\_index                 | BIGINT            | Log index of this event                                    |
| block\_timestamp           | TIMESTAMP\_NTZ(9) | Block timestamp                                            |
| block\_number              | BIGINT            | Block number                                               |
| block\_hash                | VARCHAR           | Block hash                                                 |
| unique\_id                 | VARCHAR           | Unique ID of each event                                    |
| \_created\_at              | TIMESTAMP\_NTZ(9) | Entry creation timestamp                                   |
| \_updated\_at              | TIMESTAMP\_NTZ(9) | Entry update timestamp                                     |
