freemartianTop Actions After Bridging ETH from Polygon Native Bridge
Updated 2022-08-01
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 eth_bridges as (
select
origin_from_address as user, tx_hash, block_timestamp,
sum(amount_usd) as eth_volume
from ethereum.core.ez_eth_transfers
where origin_to_address = '0xa0c68c638235ee32657e8f720a23cec1bfc77c77'
and block_timestamp > '2022-05-02'
group by 1, 2, 3
order by eth_volume desc
),
next_transactions as (
select ft.tx_hash as tx, from_address, ft.block_timestamp
from polygon.core.fact_transactions ft
inner join eth_bridges e on e.user = ft.from_address
where from_address in (select user from eth_bridges)
and ft.block_timestamp::date = e.block_timestamp::date
and ft.block_timestamp > e.block_timestamp
order by ft.block_timestamp ASC)
select distinct event_name as event, count(tx_hash) as count, contract_address, origin_to_address,
case
when event_name in ('Swapped', 'Swap', 'TokenSwap', 'DODOSwap') then 'swap'
when event_name = 'Mint' then 'mint'
when event_name = 'Deposit' then 'deposit'
when event_name = 'Withdraw' then 'withdraw'
when event_name = 'Claim' then 'claim'
when event_name in('IncreasedLiquidity', 'AddLiquidity', 'DecreaseLiquidity') then 'liquidityAction'
when event_name = 'VoteCast' then 'vote'
when event_name = 'Borrow' then 'borrow'
when event_name = 'Repay' then 'repay'
when event_name = 'FlashLoan' then 'flashloan'
when event_name = 'FlashLoan' then 'flashloan'
end as action,
case
when origin_to_address = '0x1111111254fb6c44bac0bed2854e76f90643097d' then 'QuickSwap'
Run a query to Download Data