gigiokobaguilty-violet
    Updated 2025-02-07
    WITH contract_transactions AS (
    SELECT
    block_timestamp,
    block_number,
    tx_hash,
    from_address,
    to_address,
    value as native_amount,
    tx_succeeded,
    origin_function_signature
    FROM swell.core.fact_transactions
    WHERE (to_address = LOWER('0xa6cb988942610f6731e664379d15ffcfbf282b44')
    OR from_address = LOWER('0xa6cb988942610f6731e664379d15ffcfbf282b44'))
    AND block_timestamp >= DATEADD(day, -30, CURRENT_TIMESTAMP)
    ),
    contract_events AS (
    SELECT
    block_timestamp,
    block_number,
    tx_hash,
    event_name,
    contract_name,
    decoded_log,
    origin_from_address,
    origin_to_address
    FROM swell.core.ez_decoded_event_logs
    WHERE contract_address = LOWER('0xa6cb988942610f6731e664379d15ffcfbf282b44')
    AND block_timestamp >= DATEADD(day, -30, CURRENT_TIMESTAMP)
    )

    -- Summary of events
    SELECT
    'Event Summary' as analysis_type,
    event_name,
    contract_name,
    COUNT(*) as count,
    Last run: about 1 month ago
    No Data to Display
    0
    2B
    1s