Query editor
/*Liquidity detailPair Created*//* event log topic0v1: 0x9d42cb017eb05bd8944ab536a8b35bc68085931dd5f4356489801453923953f9v2: 0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9v3: 0x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118*/with pool_create_evt as (selectcontract_address as factory_address,'ethereum' AS blockchain,bytearray_ltrim(topic1) as token0,case when topic0 = 0x9d42cb017eb05bd8944ab536a8b35bc68085931dd5f4356489801453923953f9 then 0x else bytearray_ltrim(topic2) end as token1,case when topic0 = 0x9d42cb017eb05bd8944ab536a8b35bc68085931dd5f4356489801453923953f9 then bytearray_ltrim(bytearray_substring(topic2,1,32)) -- v1when topic0 = 0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9 then bytearray_ltrim(bytearray_substring(data,1,32)) -- v2when topic0 = 0x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118 then bytearray_ltrim(bytearray_substring(data,1+36,36)) -- v3end as lp_address,case when topic0 = 0x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118 then bytearray_to_uint256(bytearray_ltrim(topic3)) -- v3when topic0 = 0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9 then CAST(3000 as uint256) -- v2when topic0 = 0x9d42cb017eb05bd8944ab536a8b35bc68085931dd5f4356489801453923953f9 then CAST(3000 as uint256) -- v1end as fee,case when topic0 = 0x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118 then bytearray_to_uint256(bytearray_ltrim(bytearray_substring(data,1,32))) else bytearray_to_uint256(0x) end as tick_spacing,case when topic0 = 0x9d42cb017eb05bd8944ab536a8b35bc68085931dd5f4356489801453923953f9 then 'v1'when topic0 = 0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9 then 'v2'when topic0 = 0x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118 then 'v3'end as version,block_number,block_time,tx_hash,indexfrom ethereum.logs -- ************ blockchain *************where topic0 in (0x9d42cb017eb05bd8944ab536a8b35bc68085931dd5f4356489801453923953f9,0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9,0x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118)AND block_time >= TIMESTAMP '2021-01-01 00:00:00' -- *************** Start Time ***************UNION Allselectcontract_address as factory_address,'arbitrum' as blockchain,bytearray_ltrim(topic1) as token0,case when topic0 = 0x9d42cb017eb05bd8944ab536a8b35bc68085931dd5f4356489801453923953f9 then 0x else bytearray_ltrim(topic2) end as token1,case when topic0 = 0x9d42cb017eb05bd8944ab536a8b35bc68085931dd5f4356489801453923953f9 then bytearray_ltrim(bytearray_substring(topic2,1,32)) -- v1when topic0 = 0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9 then bytearray_ltrim(bytearray_substring(data,1,32)) -- v2when topic0 = 0x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118 then bytearray_ltrim(bytearray_substring(data,1+36,36)) -- v3end as lp_address,case when topic0 = 0x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118 then bytearray_to_uint256(bytearray_ltrim(topic3)) -- v3when topic0 = 0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9 then CAST(3000 as uint256) -- v2when topic0 = 0x9d42cb017eb05bd8944ab536a8b35bc68085931dd5f4356489801453923953f9 then CAST(3000 as uint256) -- v1end as fee,case when topic0 = 0x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118 then bytearray_to_uint256(bytearray_ltrim(bytearray_substring(data,1,32))) else bytearray_to_uint256(0x) end as tick_spacing,case when topic0 = 0x9d42cb017eb05bd8944ab536a8b35bc68085931dd5f4356489801453923953f9 then 'v1'when topic0 = 0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9 then 'v2'when topic0 = 0x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118 then 'v3'end as version,block_number,block_time,tx_hash,indexfrom arbitrum.logs -- ************ blockchain *************where topic0 in (0x9d42cb017eb05bd8944ab536a8b35bc68085931dd5f4356489801453923953f9,