Blaze2024-01-22 10:50 AM
    Updated 2024-09-09
    WITH eth_tx as (
    SELECT date(BLOCK_TIMESTAMP) as date,
    tx_hash,
    decoded_log:amount*pow(10,-6) as amount,
    case
    when decoded_log:destinationDomain=0 then 'Ethereum'
    when decoded_log:destinationDomain=1 then 'Avalanche'
    when decoded_log:destinationDomain=2 then 'OP Mainnet'
    when decoded_log:destinationDomain=3 then 'Arbitrum'
    when decoded_log:destinationDomain=4 then 'Noble'
    when decoded_log:destinationDomain=6 then 'Base'
    when decoded_log:destinationDomain=7 then 'Polygon (POS)'
    else NULL
    end as destination_chain,
    'Ethereum' as source_chain,
    concat(source_chain,decoded_log:depositor) as address
    from ethereum.core.ez_decoded_event_logs
    where lower(contract_address) = lower('0xBd3fa81B58Ba92a82136038B25aDec7066af3155')
    and event_name='DepositForBurn'
    ),

    aval_tx as (
    SELECT date(BLOCK_TIMESTAMP) as date,
    tx_hash,
    decoded_log:amount*pow(10,-6) as amount,
    case
    when decoded_log:destinationDomain=0 then 'Ethereum'
    when decoded_log:destinationDomain=1 then 'Avalanche'
    when decoded_log:destinationDomain=2 then 'OP Mainnet'
    when decoded_log:destinationDomain=3 then 'Arbitrum'
    when decoded_log:destinationDomain=4 then 'Noble'
    when decoded_log:destinationDomain=6 then 'Base'
    when decoded_log:destinationDomain=7 then 'Polygon (POS)'
    else NULL
    end as destination_chain,
    'Avalanche' as source_chain,
    QueryRunArchived: QueryRun has been archived