cloudr3nLB Liquidity Pool - Current liquidity
Updated 2023-07-11
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
›
⌄
-- 0xafeBf9bBa7984954e42d7551AB0cE47130BfDC0A
-- 0xB5352A39C11a81FE6748993D586EC448A01f08b5
with
ab_tb as (
select
*,
case
when topics[0] = '0x2c8d104b27c6b7f4492017a6f5cf3803043688934ebcaa6a03540beeaf976aff' then 'LBPairCreated'
when topics[0] = '0x63a7af39b7b68b9c3f2dfe93e5f32d9faecb4c6c98733bb608f757e62f816c0d' then 'FeeParametersSet'
-- when topics[0] = '0xd09e5ddc721ff14c5c1e66a305cbba1fd70b82c5232bc391aad6f55e62e4b046' then 'StaticFeeParametersSet'
else event_name
end as event_name1
from
arbitrum.core.fact_event_logs
where
contract_address in (
'0x1886d09c9ade0c5db822d85d21678db67b6c2982', -- v2.0
'0x8e42f2f4101563bf679975178e880fd87d3efd4e' -- v2.1
)
order by
block_timestamp,
event_index asc
),
ab_lbpair1 as (
SELECT
concat('0x', right(substr(topics[1], 3 + 24, 64), 40))::string as tokenX,
concat('0x', right(substr(topics[2], 3 + 24, 64), 40))::string as tokenY,
concat('0x', right(substr(data, 1 + 2 + 64 * 0, 64), 40)) as LBPair,
ethereum.public.udf_hex_to_int (substr(data, 1 + 2 + 64 * 1, 64)) as pid,
try_to_decimal(COALESCE(ethereum.public.udf_hex_to_int (right(substr(topics[3], 3 + 24, 64), 40)),'0')) as binStep1,
contract_address,
case
when contract_address = '0x1886d09c9ade0c5db822d85d21678db67b6c2982' then 'v2.0'
when contract_address = '0x8e42f2f4101563bf679975178e880fd87d3efd4e' then 'v2.1'
Run a query to Download Data