pinehearstHop Protocol Decoding
Updated 2022-12-23
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
›
⌄
select
case
when contract_address = '0x3666f603cc164936c1b87e207f36beba4ac5f18a' then 'USDC' -- I think should replace with token contract
when contract_address = '0x3e4a3a4796d16c0cd582c382691998f7c06420b6' then 'USDT'
when contract_address = '0x22b1cbb8d98a01a3b71d034bb899775a76eb1cc2' then 'MATIC'
when contract_address = '0x3d4cc8a61c7528fd86c55cfe061a78dcba48edd1' then 'DAI'
when contract_address = '0xb8901acb165ed027e32754e0ffe830802919727f' then 'ETH' else null end as contract_pool,
tokenflow_eth.hextoint(substr(topics[1], 1+2 +64*0, 64)) as chainid, -- destination chain
concat('0x', right(topics[2], 40)) as recipient,
concat('0x', right(topics[3], 40)) as relayer,
tokenflow_eth.hextoint(substr(data, 1+2 +64*0, 64)) as amountOut,
tokenflow_eth.hextoint(substr(data, 1+2 +64*1, 64)) as amountOutMin,
tokenflow_eth.hextoint(substr(data, 1+2 +64*2, 64)) as deadline ,
tokenflow_eth.hextoint(substr(data, 1+2 +64*3, 64)) as relayerFee,
tx_fee,
contract_address, -- Bridge Address, which tells the token getting transferred
tx_hash,
origin_function_signature,
block_timestamp
from ethereum.core.fact_event_logs
left join (select tx_hash as tx_hash1, tx_fee from ethereum.core.fact_transactions) on tx_hash = tx_hash1
where topics[0] = '0x0a0607688c86ec1775abcdbab7b33a3a35a6c9cde677c9be880150c231cc6b0b' -- TransferSentToL2 event
and block_timestamp > '2022-12-01'
and tx_status = 'SUCCESS'
limit 100
Run a query to Download Data