scottincryptoAave MintToTreasury Events
    Updated 2022-12-08
    select
    block_timestamp
    , 'Arbitrum' as chain
    , topics[1] as encoded_reserve_address
    , ethereum.public.udf_hex_to_int(data) as raw_amount
    from arbitrum.core.fact_event_logs
    where 1=1
    and block_timestamp > '2022-11-01'
    and contract_address = '0x794a61358d6845594f94dc1db02a252b5b4814ad' -- Aave V3 pool
    and origin_from_address = '0xbb55068ed618a4d3b269850a4aadd65f7df2e575' -- Llama smart contract
    and topics[0] = '0xbfa21aa5d5f9a1f0120a95e7c0749f389863cbdbfff531aa7339077a5bc919de' -- MintedToTreasury(address,uint256)

    union all

    select
    block_timestamp
    , 'Optimism' as chain
    , topics[1] as encoded_reserve_address
    , ethereum.public.udf_hex_to_int(data) as raw_amount
    from optimism.core.fact_event_logs
    where 1=1
    and block_timestamp > '2022-11-01'
    and contract_address = '0x794a61358d6845594f94dc1db02a252b5b4814ad' -- Aave V3 pool
    and origin_from_address = '0xbb55068ed618a4d3b269850a4aadd65f7df2e575' -- Llama smart contract
    and topics[0] = '0xbfa21aa5d5f9a1f0120a95e7c0749f389863cbdbfff531aa7339077a5bc919de' -- MintedToTreasury(address,uint256)

    union all

    select
    block_timestamp
    , 'Avalanche' as chain
    , topics[1] as encoded_reserve_address
    , ethereum.public.udf_hex_to_int(data) as raw_amount
    from avalanche.core.fact_event_logs
    where 1=1
    and block_timestamp > '2022-11-01'
    Run a query to Download Data