freemartianTotal Bridges
    Updated 2024-04-02

    with op_tx AS (
    SELECT
    ethereum.public.udf_hex_to_int(substr(regexp_substr_all(SUBSTR(input, 11, len(input)), '.{64}')[2], 1, 64):: STRING) AS destination_chain,
    *
    FROM optimism.core.fact_traces
    -- WHERE tx_hash IN ('0x8922f454eb87ae501138328f5e1ae93acae041ffaaa41e09c71f2857f961bf18','0xdd90d43f9a131c1b4c1cac1abc724c372803399557aa0e695e0c7f7dd6b65f04')

    WHERE to_address = '0x7ead444f525922666d128859b76e8f96ebf8d4a2'
    AND destination_chain = '8453'
    AND block_timestamp >= '2024-03-28'
    ),

    arb_tx AS (
    SELECT
    ethereum.public.udf_hex_to_int(substr(regexp_substr_all(SUBSTR(input, 11, len(input)), '.{64}')[2], 1, 64):: STRING) AS destination_chain,
    *
    FROM arbitrum.core.fact_traces
    WHERE to_address = '0x777e05d02ea7b42f32f103c089c175017082f531'
    AND destination_chain = '8453'
    AND block_timestamp >= '2024-03-28'
    ),

    poly_tx AS (
    SELECT
    ethereum.public.udf_hex_to_int(substr(regexp_substr_all(SUBSTR(input, 11, len(input)), '.{64}')[2], 1, 64):: STRING) AS destination_chain,
    tx_hash
    FROM polygon.core.fact_traces
    WHERE from_address = '0x777e05d02ea7b42f32f103c089c175017082f531'
    AND destination_chain = '8453'
    AND block_timestamp >= '2024-03-28'
    ),

    base_tx AS (
    SELECT
    ethereum.public.udf_hex_to_int(substr(regexp_substr_all(SUBSTR(input, 11, len(input)), '.{64}')[2], 1, 64):: STRING) AS identify,
    QueryRunArchived: QueryRun has been archived