scottincryptowstETH on Optimism Chainlink Prices
    Updated 2023-04-13
    with wsteth_steth as (
    select
    block_timestamp
    , time_slice(block_timestamp, 15, 'minute') as block_time
    , event_inputs:current::int / 1e18 as price
    from optimism.core.fact_event_logs
    where 1=1
    and contract_address = '0x6e7a3ceb4797d0fd7b9854b251929ad68849951a'
    and block_timestamp >= current_date - interval'30 days'
    and event_name = 'AnswerUpdated'
    order by block_timestamp desc
    )

    , steth_usd as (
    select
    block_timestamp
    , time_slice(block_timestamp, 15, 'minute') as block_time
    , event_inputs:current::int / 1e8 as price
    from optimism.core.fact_event_logs
    where 1=1
    and contract_address = '0x12922291d1fcd0d121b5c88f061047fe18732743'
    and block_timestamp >= current_date - interval'30 days'
    and event_name = 'AnswerUpdated'
    order by block_timestamp desc
    )

    , eth_usd as (
    select
    block_timestamp
    , time_slice(block_timestamp, 15, 'minute') as block_time
    , event_inputs:current::int / 1e8 as price
    from optimism.core.fact_event_logs
    where 1=1
    and contract_address = '0x02f5e9e9dcc66ba6392f6904d5fcf8625d9b19c9'
    and block_timestamp >= current_date - interval'30 days'
    and event_name = 'AnswerUpdated'
    Run a query to Download Data