charliemarketplacelivequeryv2-univ3-wbtceth-optimal
999
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
⌄
/*
This query uses Quicknode credentials and livequery v2
*/
select * from livequery.
with inputs AS (
SELECT
LOWER('0xCBCdF9626bC03E24f779434178A73a0B4bad62eD') as contract_address,
17733559 as from_block,
concat('0x',trim(to_char(from_block,'XXXXXXXXXX'))) as hex_block_from,
17743559 as to_block,
concat('0x',trim(to_char(to_block,'XXXXXXXXXX'))) as hex_block_to,
ARRAY_CONSTRUCT(
'0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67',
NULL,
NULL
) as event_topic_param
),
pool_details AS (
select POOL_NAME,
TOKEN1_SYMBOL,
TOKEN1_DECIMALS,
TOKEN0_SYMBOL,
TOKEN0_DECIMALS,
ABS(TOKEN1_DECIMALS - TOKEN0_DECIMALS) as decimal_adjustment
from ethereum.core.dim_dex_liquidity_pools
where pool_address = (select lower(contract_address) from inputs)
),
create_rpc_request as (
SELECT
contract_address,
from_block,
to_block,
Run a query to Download Data