MeirCurve Gauge Distribution
    Updated 2024-05-20
    -- forked from eUSD Curve LP Gauge Distribution @ https://flipsidecrypto.xyz/edit/queries/6d8c5be0-c5df-4158-b18d-1d9352e78caa

    with dates as (
    select
    date_day
    from ethereum.core.dim_dates
    where date_day between '{{start_date}}' and current_date()
    ),


    symbols as (
    select lower('{{curve_gauge_address}}') as gauge_list,
    'gauge' as gauge_name
    -- union all
    -- select '0x298bf7b80a6343214634af16eb41bb5b9fc6a1f1' as gauge_list,
    -- 'eth_plus_guage' as gauge_name
    -- union all
    -- select '0x27cace18f661161661683bba43933b2e6eb1741e' as gauge_list,
    -- 'hyusd_gauge' as gauge_name
    ),


    dates_x_symbols as (
    select
    date_day,
    gauge_list,
    gauge_name
    from dates
    cross join symbols
    ),

    reference_contracts as (
    select
    lower('0xF147b8125d2ef93FB6965Db97D6746952a133934') as contract_address,

    'CurveYCRVVoter' as contract_name,
    QueryRunArchived: QueryRun has been archived