nitsBridger Destinations after 1 transaction
Updated 2022-08-01Copy Reference Fork
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
›
⌄
with addr as
(SELECT origin_from_address, block_timestamp as bt, tx_hash as tx
from ethereum.core.fact_event_logs
where
origin_to_address = '0xa0c68c638235ee32657e8f720a23cec1bfc77c77' and event_name = 'LockedEther'
or origin_to_address = '0xa0c68c638235ee32657e8f720a23cec1bfc77c77' and event_name = 'LockedERC20'
or (origin_to_address = '0x401f6c983ea34274ec46f84d70b31c151321188b' and contract_address = '0x401f6c983ea34274ec46f84d70b31c151321188b')),
action_after_bridge as
(SELECT tx_hash as txh , from_address as fa from
(SELECT *, row_number() over (partition by tx order by block_timestamp) as rn
from polygon.core.fact_transactions
inner join addr
on origin_from_address = from_address and bt < block_timestamp )
where rn = '2')
SELECT contract_address, count(DISTINCT tx_hash) as total_calls,
case when contract_address = '0x0000000000000000000000000000000000001010' then 'MATIC transfer'
when contract_address = '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619' then 'WETH'
when contract_address = '0x2791bca1f2de4661ed88a30c99a7a9449aa84174' then 'USDC'
when contract_address = '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270' then 'WMATIC'
when contract_address = '0xc2132d05d31c914a87c6611c10748aeb04b58e8f' then 'USDT'
when contract_address = '0x1a1ec25dc08e98e5e93f1104b5e5cdd298707d31' then 'Metamask Swap Router'
when contract_address = '0xbbba073c31bf03b8acf7c28ef0738decf3695683' then 'SAND'
when contract_address = '0x1111111254fb6c44bac0bed2854e76f90643097d' then '1inch Router'
when contract_address = '0x8dff5e27ea6b7ac08ebfdf9eb090f32ee9a30fcf' then 'Aave Lending Pool'
when contract_address = '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063' then 'DAI'
end as contract_name
from polygon.core.fact_event_logs
inner join action_after_bridge
on txh = tx_hash
GROUP by 1
order by 2 desc
limit 10
Run a query to Download Data