freemartianETH bridge to linea
    Updated 2023-11-19
    with
    ethereum AS (
    select
    block_timestamp::date AS day,
    count(DISTINCT from_address) AS wallet_count,
    count(tx_hash) AS transacton_count,
    sum(eth_value) AS eth_value,
    'Ethereum' AS from_chain
    FROM ethereum.core.fact_traces
    WHERE RIGHT (ethereum.public.udf_hex_to_int(data:value :: STRING),4) = 9023
    AND to_address IN ('0xe4edb277e41dc89ab076a1f049f4a3efa700bce8','0x80c67432656d59144ceff962e8faf8926599bcf8')
    AND block_timestamp::date > '2023-07-01'
    GROUP BY day, from_chain
    ),
    optimism AS (
    select
    block_timestamp::date AS day,
    count(DISTINCT from_address) AS wallet_count,
    count(tx_hash) AS transacton_count,
    sum(eth_value) AS eth_value,
    'Optimism' AS from_chain
    FROM optimism.core.fact_traces
    WHERE RIGHT (optimism.public.udf_hex_to_int(data:value :: STRING),4) = 9023
    AND to_address IN ('0xe4edb277e41dc89ab076a1f049f4a3efa700bce8','0x80c67432656d59144ceff962e8faf8926599bcf8')
    AND block_timestamp::date > '2023-07-01'
    GROUP BY day, from_chain
    ),
    arbitrum AS(
    select
    block_timestamp::date AS day,
    count(DISTINCT from_address) AS wallet_count,
    count(tx_hash) AS transacton_count,
    sum(eth_value) AS eth_value,
    'Arbitrum' AS from_chain
    FROM arbitrum.core.fact_traces
    WHERE RIGHT (ethereum.public.udf_hex_to_int(data:value :: STRING),4) = 9023
    Run a query to Download Data