cypherHop Whales - optimism - frequency of use
    Updated 2022-06-22
    with hop_to_l2_eth as (select
    block_timestamp,
    tx_hash,
    origin_from_address as user,
    event_inputs:amount/1e18 as amount,
    case event_inputs:"chainId"::integer
    when 137 then 'Polygon'
    when 100 then 'xDai'
    when 10 then 'Optimism'
    when 42161 then 'Arbitrum'
    end as chain,
    'Hop' as bridge
    from ethereum.core.fact_event_logs
    where block_timestamp >= '2022-1-1'
    and contract_address = lower('0xb8901acB165ed027E32754E0FFe830802919727f')
    and event_name = 'TransferSentToL2'
    and tx_status = 'SUCCESS'),

    matic_eth as (select
    block_timestamp,
    tx_hash,
    origin_from_address as user,
    event_inputs:amount/1e18 as amount,
    'Polygon' as chain,
    'Native Polygon Bridge' as bridge
    from ethereum.core.fact_event_logs
    where block_timestamp >= '2022-1-1'
    and contract_address = lower('0x8484ef722627bf18ca5ae6bcf031c23e6e922b30')
    and event_name = 'LockedEther'
    and tx_status = 'SUCCESS'),

    opt_eth as (select
    block_timestamp as time,
    tx_hash,
    origin_from_address as user,
    Run a query to Download Data