datavortexmajor-white
Updated 2024-10-22
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
›
⌄
⌄
/*
select
tx_hash,
block_number,
contract_address,
decoded_log:from :: string as from_address,
decoded_log:to :: string as to_address,
decoded_log:value :: integer as value,
decoded_log:topics:: string as topics
from
ethereum.core.fact_decoded_event_logs
where
contract_address = lower('0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48')
and block_number between 16400000
and 16405000
and event_name = 'Transfer'
limit
50 ;
*/
/*
SELECT
block_timestamp,
tx_hash,
topics[0] as topics0,
-- concat('0x', right(substr(topics[2],3+24,64),40)) as item0,
concat('0x',right(substr(data, 1 + 2 + 64 * 0, 64),40)) as item1, -- trader
concat('0x',right(substr(data, 1 + 2 + 64 * 1, 64),40)) as item2, -- subject
ethereum.public.udf_hex_to_int (substr(data, 1 + 2 + 64 * 2, 64)) as item3, -- isBuy
ethereum.public.udf_hex_to_int (substr(data, 1 + 2 + 64 * 3, 64)) as item4, -- shareAmount
ethereum.public.udf_hex_to_int (substr(data, 1 + 2 + 64 * 4, 64)) as item5, -- amount
ethereum.public.udf_hex_to_int (substr(data, 1 + 2 + 64 * 5, 64)) as item6, -- protocolAmount
ethereum.public.udf_hex_to_int (substr(data, 1 + 2 + 64 * 6, 64)) as item7, -- subjectAmount
ethereum.public.udf_hex_to_int (substr(data, 1 + 2 + 64 * 7, 64)) as item8, -- referralAmount
ethereum.public.udf_hex_to_int (substr(data, 1 + 2 + 64 * 8, 64)) as item9, -- supply
ethereum.public.udf_hex_to_int (substr(data, 1 + 2 + 64 * 9, 64)) as item10, -- buyPrice
ethereum.public.udf_hex_to_int (substr(data, 1 + 2 + 64 * 10, 64)) as item11 -- myShares
QueryRunArchived: QueryRun has been archived