COUNT(DISTINCT ORIGIN_FROM_ADDRESS) | |
---|---|
1 | 274663 |
Hessishlvr agg u
Updated 2 days ago
99
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
›
⌄
with b_data_avax as
(select ORIGIN_FROM_ADDRESS,
DECODED_LOG:gameId as game_Id,
DECODED_LOG:collateral/1e6 as amount,
DECODED_LOG:leverageRate as leverage,
tx_hash,
BLOCK_TIMESTAMP
from avalanche.core.ez_decoded_event_logs
where-- tx_hash = '0x37252c2832e5e236bf09fdd9cf0685dff7c12822e9e0567c7d202748fc462587' and
ORIGIN_TO_ADDRESS = '0xf57e80863fe17086dd6956349c18ee027788c352' and
ORIGIN_FUNCTION_SIGNATURE = '0xf136c3db' and
TOPICS[0] = '0xd026f53b49532f9b4c7e59f32feb5b919b08627ac82d92d57e12a19c45054efa'),
b_data_mon as
(select a.ORIGIN_FROM_ADDRESS,
a.TOPICS[1] as game_id,
CAST(ethereum.public.udf_hex_to_int(b.data) AS NUMERIC) / 1e6 AS amount,
SUBSTRING(a.data, 193, 2)::number as leverage,
a.tx_hash,
a.BLOCK_TIMESTAMP
from monad.testnet.fact_event_logs a
join monad.testnet.fact_event_logs b
on a.tx_hash = b.tx_hash
where --a.tx_hash = '0xb4fad7b9942b28f1d153a4c7c984b791fb1227956756c4fa2293c83f519adbb3' and
a.ORIGIN_TO_ADDRESS = '0x66dd5e0be80417cef966d788079d9be7a8618753'
and a.ORIGIN_FUNCTION_SIGNATURE = '0xf136c3db'
and a.topics[0] = '0xd026f53b49532f9b4c7e59f32feb5b919b08627ac82d92d57e12a19c45054efa'
and b.CONTRACT_ADDRESS = '0xbf7a88acbb8cf66b72af6c399569e37ee4d5195f'
and b.topics[0] = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
having '0x'||SUBSTRING(b.topics[1], 27) = b.ORIGIN_FROM_ADDRESS
union
select a.ORIGIN_FROM_ADDRESS,
a.TOPICS[1] as game_id,
Last run: 1 day ago
1
10B
137s