mo115Matic - Total
    Updated 2024-09-15

    with txs as (select t.tx_hash,t.BLOCK_TIMESTAMP, DECODED_LOG:user as user , t.amount , EVENT_NAME
    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')
    union
    select t.tx_hash,t.BLOCK_TIMESTAMP, DECODED_LOG:user as user , t.amount , EVENT_NAME
    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')
    )
    select sum (amount) ,'stake' as action
    from txs
    where EVENT_NAME in ( 'ShareMinted' , 'Staked')
    union
    select sum (amount) ,'unstake' as action
    from txs
    where EVENT_NAME in ('DelegatorUnstakeWithId','DelegatorUnstaked','Unstaked')



    QueryRunArchived: QueryRun has been archived