lagandispensernumber of ETH bridge actions from/to StarkNet
    Updated 2022-06-29
    with tx_ids as (
    select TX_HASH ,
    case when ORIGIN_FUNCTION_SIGNATURE = '0x00f714ce' then 'Withdraw'
    when ORIGIN_FUNCTION_SIGNATURE = '0xb6b55f25' then 'Deposit'
    end as type
    from ethereum.core.fact_event_logs
    where lower(CONTRACT_ADDRESS) = lower('0xae0Ee0A63A2cE6BaeEFFE56e7714FB4EFE48D419')
    and block_timestamp::date >= '2022-05-01'
    group by 1,2 HAVING type is not NULL
    )
    select
    block_timestamp::date as date,
    type,
    sum (amount) as Volume,
    sum (Volume) over (partition by type order by date) as cum_Volume,
    sum (amount_usd) as USD_Volume,
    sum (USD_Volume) over (partition by type order by date ) as cum_USD_volume ,
    count (distinct tx_hash) as num_actions,
    sum (num_actions) over (partition by type order by date ) as cum_actions,
    count (distinct origin_from_address) as num_wallets
    from ethereum.core.ez_eth_transfers join tx_ids using (tx_hash)
    group by 1,2

    Run a query to Download Data