dannyamahVoting Leaderboard : Excess ASR
    Updated 2024-10-26
    WITH vote AS (
    SELECT
    signers[0] AS voter,
    decoded_instruction:accounts[1]:pubkey AS proposal,
    decoded_instruction:args:side AS vote_choice,
    decoded_instruction:args:weight / pow(10, 6) AS vote_weight,
    block_timestamp
    FROM
    solana.core.ez_events_decoded
    WHERE
    block_timestamp::date >= '2024-09-26'
    AND program_id = 'GovaE4iu227srtG2s3tZzB4RmWBzw8sTwrCLZz7kN7rY'
    AND event_type = 'setVote'
    AND proposal = '5G3ut22wiUWAoSnHCNTHus8LJTcnUaJKzjH1j1vLvoKs'
    AND succeeded
    ),

    latest_vote AS (
    SELECT
    voter,
    MAX(block_timestamp) AS latest
    FROM
    vote
    GROUP BY voter
    )

    SELECT
    v.voter AS "Voter",
    TO_CHAR(v.vote_weight, '999,999,999,999') AS "Vote Weight",
    CASE
    WHEN v.vote_choice = '1' THEN 'Fund 1 more year of ASR with 50M per quarter'
    WHEN v.vote_choice = '2' THEN 'Burn the token'
    WHEN v.vote_choice = '3' THEN 'Return the tokens to the community multisig'
    END AS "Vote Choice"
    FROM
    vote v
    QueryRunArchived: QueryRun has been archived