Event signature · DEX and liquidity

PoolCreated (Uniswap V3) event signature and topic0

The topic0 of the PoolCreated (Uniswap V3) event is 0x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118, the keccak-256 hash of PoolCreated(address,address,uint24,int24,address); 3 of its 5 arguments are indexed. New pool deployed by the Uniswap V3 factory.

Anatomy of a PoolCreated (Uniswap V3) log

Topics

  • topic00x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118keccak256("PoolCreated(address,address,uint24,int24,address)")
  • topic1token0 (address)indexed: filterable
  • topic2token1 (address)indexed: filterable
  • topic3fee (uint24)indexed: filterable

Data

  • datatickSpacing (int24), pool (address)ABI-encoded, decoded with the ABI
Parameters

Arguments and where they sit in the log

Indexed arguments travel as topics and can be filtered cheaply; the others are ABI-encoded together in the data.

NameTypeIn the log
token0addresstopic1
token1addresstopic2
feeuint24topic3
tickSpacingint24data
pooladdressdata

Solidity declaration

event PoolCreated(address indexed token0, address indexed token1, uint24 indexed fee, int24 tickSpacing, address pool);

Canonical signature

PoolCreated(address,address,uint24,int24,address)

topic0

0x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118

Ready-made alerts

Get an alert on PoolCreated

Each rule opens with the contract and the conditions filled in. Sign in, pick your chat and click Create.

Who emits it

Contracts we list that emit PoolCreated

Any other contract with the same signature emits a log with the same topic0.

Code

Read PoolCreated logs in code

The same filter in viem, ethers and plain JSON-RPC, and the Solidity that emits it. The address is Uniswap V3 Factory, a contract we list that emits it.

viem
import { createPublicClient, http, parseAbiItem } from "viem"
import { mainnet } from "viem/chains"

const client = createPublicClient({ chain: mainnet, transport: http() })

const logs = await client.getLogs({
  address: "0x1f98431c8ad98523631ae4a59f267346ea31f984",
  event: parseAbiItem("event PoolCreated(address indexed token0, address indexed token1, uint24 indexed fee, int24 tickSpacing, address pool)"),
  fromBlock: "latest",
})

for (const log of logs) console.log(log.args) // { token0, token1, fee, tickSpacing, pool }
ethers v6
import { Interface, JsonRpcProvider } from "ethers"

const provider = new JsonRpcProvider(process.env.RPC_URL)
const iface = new Interface(["event PoolCreated(address indexed token0, address indexed token1, uint24 indexed fee, int24 tickSpacing, address pool)"])

const logs = await provider.getLogs({
  address: "0x1f98431c8ad98523631ae4a59f267346ea31f984",
  topics: [iface.getEvent("PoolCreated")!.topicHash],
})

for (const log of logs) console.log(iface.parseLog(log)?.args)
JSON-RPC (eth_getLogs)
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "address": "0x1f98431c8ad98523631ae4a59f267346ea31f984",
      "topics": [
        "0x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118"
      ],
      "fromBlock": "latest"
    }
  ]
}
Solidity
event PoolCreated(address indexed token0, address indexed token1, uint24 indexed fee, int24 tickSpacing, address pool);

// inside a function:
emit PoolCreated(token0, token1, fee, tickSpacing, pool);
Example

An example PoolCreated log, encoded and decoded

Placeholder values, not a real transaction: how each argument is stored in the topics and the data, and what decoding gives back.

Encoded (as the node returns it)
  • topic0keccak256("PoolCreated(address,address,uint24,int24,address)")0x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118
  • topic1token00x0000000000000000000000001111111111111111111111111111111111111111
  • topic2token10x0000000000000000000000002222222222222222222222222222222222222222
  • topic3fee0x0000000000000000000000000000000000000000000000000000000000000bb8
  • data0x0000000000000000000000000000000000000000000000000000000000000fa00000000000000000000000005555555555555555555555555555555555555555
Decoded with the ABI
  • token0address · indexed0x1111111111111111111111111111111111111111
  • token1address · indexed0x2222222222222222222222222222222222222222
  • feeuint24 · indexed3000
  • tickSpacingint244000
  • pooladdress0x5555555555555555555555555555555555555555
FAQ

Frequently asked questions

What is the topic0 of the PoolCreated (Uniswap V3) event?

0x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118: the keccak-256 hash of PoolCreated(address,address,uint24,int24,address).

Which PoolCreated (Uniswap V3) arguments are indexed?

token0, token1, fee are indexed and sit in the log's topics; tickSpacing, pool are in the data.

How do I get an alert when a contract emits PoolCreated (Uniswap V3)?

Open one of the ready-made rules on this page, or add any contract and pick PoolCreated (Uniswap V3) from the event list. Conditions can be set on indexed and non-indexed arguments, and each alert names the contract and links to the transaction.

Keep exploring

More event signatures and tools

Know the moment a contract emits it

The Beta plan is free: one wallet and one contract, no credit card.