mo115Polygon - test 1.5
Updated 2024-09-15
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
-- forked from Polygon - test 1 @ https://flipsidecrypto.xyz/studio/queries/7a3de497-0f96-4215-892c-e5b2f4e74f7a
with txs as (select t.tx_hash,t.BLOCK_TIMESTAMP, DECODED_LOG:user as user , t.amount ,'stake' as action
from ethereum.core.ez_token_transfers t left join ethereum.core.ez_decoded_event_logs e on t.tx_hash=e.tx_hash
where t.TO_ADDRESS = '0x5e3ef299fddf15eaa0432e6e66473ace8c13d908'
and t.CONTRACT_ADDRESS in ('0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0','0x455e53cbb86018ac2b8092fdcd39d8444affc3f6')
--and EVENT_NAME in ( 'ShareMinted' , 'Staked')
union
select t.tx_hash,t.BLOCK_TIMESTAMP, DECODED_LOG:user as user , t.amount ,'unstake' as action
from ethereum.core.ez_token_transfers t left join ethereum.core.ez_decoded_event_logs e on t.tx_hash=e.tx_hash
where t.FROM_ADDRESS = '0x5e3ef299fddf15eaa0432e6e66473ace8c13d908'
and t.CONTRACT_ADDRESS in ('0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0','0x455e53cbb86018ac2b8092fdcd39d8444affc3f6')
--and EVENT_NAME in ('DelegatorUnstakeWithId','DelegatorUnstaked','Unstaked')
)
select sum(amount) , BLOCK_TIMESTAMP
from txs
where user = '0xf977814e90da44bfa03b6295a0616a897441acec'
group by 1,2
QueryRunArchived: QueryRun has been archived