maybeyonasyveCRV-claim-weekly
    Updated 2022-02-08
    -- 0x9d409a0A012CFbA9B15F6D4B36Ac57A46966Ab9a - yvboost
    -- 0xc5bDdf9843308380375a611c18B50Fb9341f502A - yveCRV

    -- 0xd66d75747525f71007d20c4e9f6ee3c580a8b1604293ffe126fb6e790ab95d40 yvboost start tx

    with time_start as(
    select block_timestamp from ethereum.transactions
    where tx_id = '0xd66d75747525f71007d20c4e9f6ee3c580a8b1604293ffe126fb6e790ab95d40'
    ),
    CRV_claim_tx as(
    select tx_id
    from ethereum.udm_events
    where origin_function_name = 'claim'
    and from_address = '0xc5bddf9843308380375a611c18b50fb9341f502a'
    and block_timestamp > (select block_timestamp from time_start)
    ),
    CRV_claim_fees as(
    select
    block_timestamp,
    tx_id,
    gas_price/pow(10,9) as gas_price,
    gas_used,
    tx_fee,
    fee_usd
    from ethereum.transactions
    where tx_id in (select * from CRV_claim_tx)
    ),
    CRV_claim_amount as(
    select
    block_timestamp,
    tx_id,
    event_inputs:value as amt --/pow(10,18)
    from ethereum.events_emitted
    where tx_id in (select * from CRV_claim_tx)
    ),
    final as(
    Run a query to Download Data