SocioAnalyticaPolygon txs contract hunt
    Updated 2025-02-06
    -- forked from Polygon txs @ https://flipsidecrypto.xyz/studio/queries/2a4afae7-5a43-48e9-a073-0443eaedc240

    WITH oft_events AS (
    SELECT DISTINCT
    tx_hash,
    block_timestamp,
    chain,
    contract_address as bridge_contract,
    event_index as oft_event_index,
    decoded_log:fromAddress::string as sender,
    decoded_log:amountReceivedLD::number as amount_received,
    decoded_log:amountSentLD::number as amount_sent,
    decoded_log:guid::string as guid
    FROM (
    SELECT
    tx_hash,
    block_timestamp,
    'Polygon' as chain,
    contract_address,
    event_index,
    decoded_log
    FROM polygon.core.ez_decoded_event_logs
    WHERE event_name = 'OFTSent'
    AND contract_address = '0x9aa02d4fae7f58b8e8f34c66e756cc734dac7fe4'
    AND decoded_log:dstEid::string LIKE '%30362%'
    AND block_timestamp >= '2024-02-06'
    -- UNION ALL
    -- [repeat for other chains]
    )
    ),
    tx_events AS (
    -- Arbitrum events
    SELECT
    e.block_timestamp,
    Last run: 3 months ago
    BRIDGE_CONTRACT
    1
    0x9aa02d4fae7f58b8e8f34c66e756cc734dac7fe4
    1
    48B
    82s