flipsidecrypto2023-08-01 02:42 PM
    Updated 2023-08-01
    SELECT l.event_name
    , l.topics[0]::string AS topic
    , COUNT(1) AS n
    FROM avalanche.core.ez_decoded_event_logs l
    JOIN avalanche.core.fact_transactions t
    ON t.tx_hash = l.tx_hash
    WHERE t.block_timestamp >= CURRENT_DATE - 4
    AND t.to_address = '0xb4315e873dbcf96ffd0acd8ea43f689d8c20fb30' --place the contract address you interacted with here and select the appropriate related event_names and their corresponding topics. For example the current event is a swap, so we will select all topics with the event_name "swap"
    GROUP BY 1, 2
    ORDER BY 3 DESC
    Run a query to Download Data