hbd1994Wormhole 1
Updated 2025-03-01Copy Reference Fork
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
›
⌄
with chains as (
select *
from $query('d46b92dc-794b-4a63-a681-cf84888b0274')),
base as (
select
BLOCK_TIMESTAMP,
'Base' || ' ---> ' || Chain_Name as bridge_route,
TX_HASH,
'0x' || substr(TOPIC_1, 27, 42) as Protocol_address,
ethereum.public.udf_hex_to_int(substr(data, (3 + (64*4)), 64)) as Payload_size,
length(DATA) as length,
case
when length = '386' and substr(data, 325, 2) = '01' then '2' -- Ethereum
when length = '386' and substr(data, 325, 2) = '02' then '4' -- BNB
when length = '386' and substr(data, 325, 2) = '04' then '1' -- Solana
when length = '386' and substr(data, 325, 2) = '05' then '5' -- Polygon
when length = '386' and substr(data, 325, 2) = '06' then '23' -- Arbitrum
when length = '386' and substr(data, 325, 2) = '08' then '6' -- Avalanche
when length = '386' and substr(data, 325, 2) = '09' then '30' -- Base
when length = '386' and substr(data, 325, 2) = '0a' then '24' -- Optimism
when length = '386' and substr(data, 325, 2) = '0b' then '14' -- Celo
when length = '386' and substr(data, 325, 2) = '0d' then '21' -- Sui
when Protocol_address in ('0x8d2de8d2f73f1f4cab472ac9a881c9b123c79627') then ethereum.public.udf_hex_to_int(substr(A.data, 521, 4))
when Protocol_address in ('0x706f82e9bb5b0813501714ab5974216704980e31') and length >= '1026' then ethereum.public.udf_hex_to_int(substr(A.data, 325, 4))
when Protocol_address in ('0x706f82e9bb5b0813501714ab5974216704980e31') and length = '834' then ethereum.public.udf_hex_to_int(substr(A.data, 411, 4))
when Protocol_address in ('0x706f82e9bb5b0813501714ab5974216704980e31') and length = '1090' then ethereum.public.udf_hex_to_int(substr(A.data, 793, 4))
when length = '642' and Protocol_address in ('0x496a6c57dbc1c7770cb9afe118e3268f979bc53f') then ethereum.public.udf_hex_to_int(substr(A.data, 521, 4))
when length = '706' and Protocol_address in ('0xc95b6b051c485bb661414207139a3f8b5c48f08c') then ethereum.public.udf_hex_to_int(substr(A.data, 521, 4))
when length = '770' and A.ORIGIN_FUNCTION_SIGNATURE = '0xb293f97f' then ethereum.public.udf_hex_to_int(substr(A.data, 749, 4))
--when length = '834' and Protocol_address in ('0x11aa521c888d84f374b63823d9b873caa3591f55') then ethereum.public.udf_hex_to_int(substr(A.data, 389, 4))
when length > '1026' and Protocol_address in ('0x3c5c5436bca59042cbc835276e51428781366d85') then ethereum.public.udf_hex_to_int(substr(A.data, 385, 2))
end as destination_id
from base.core.fact_event_logs a
left join chains on destination_id = Chain_ID
where TOPIC_0 = '0x6eb224fb001ed210e379b335e35efe88672a8ce935d981a6896b27ffdf52a3b2'
QueryRunArchived: QueryRun has been archived