Query editor
------------------------------------------------------------------------------------------------------ Delegate Tracker Table-- ======================---- What?---- - Keeps Track of the Top 1,000 Delegates Voting on the Gitcoin Project---- Metrics---- - 17,175 Distinct Delegates SINCE 2021-05-24---- How?---- 1. Grabs delegate addresses---- 2. Tracks the most recent delegation action for each delegator-- a. Pulls from gitcoin_ethereum.GTC_evt_DelegateVotesChanged a decoded project-- - what is a decoded project?-- - Fields: contract_address, evt_tx_hash, evt_index, evt_block_time, delegate, newBalance, previousBalance---- 3. Computes the current voting power of delegates---------------------------------------------------------------------------------------------------------- 1. Maps delegate addresses to delegate namesWITH address_names AS (SELECT * FROM query_1802295),-- 2. Calculates most recent Voting Power and amount delegated per delegatecurrent_voting_power AS (SELECTdelegate,voting_power,amt_delegatedFROM (SELECTdelegate,evt_index,evt_block_time as time,evt_tx_hash as hash,newBalance / POWER(10,18) as voting_power,previousBalance / POWER(10,18) - newBalance / POWER(10,18) as amt_delegated,DENSE_RANK() OVER (PARTITION BY delegateORDER BYdc.evt_block_timeDESC) AS evt_rankFROMgitcoin_ethereum.GTC_evt_DelegateVotesChanged dc) cWHERE evt_rank = 1