bitsongofficial / delegation-program

The Delegation Campaign that will be carried out by BitSong
2 stars 20 forks source link

feat: add calculate votes script #63

Closed freak12techno closed 2 years ago

freak12techno commented 2 years ago

this one prints a JSON file with the output with the following format (containing an object per each proposal and its votes):

{
   "1": { // proposal ID
        "title": "Proposal title",
        "description": "Proposal description",
        "status": "PROPOSAL_STATUS_PASSED",
        "votes": [
          {
             "valoper": "bitvaloperxxxxx",
             "wallet": "bitsongxxxxx", // validator self delegate wallet
             "active": true, // if the validator was active when running this script
             "voted": true // if a validator voted on this proposal
          }
         ]
}

needs an archive node, otherwise pruning won't return all votes for a validator

freak12techno commented 2 years ago

example that I generated today at 16:00 UTC: https://pastebin.com/e69xP2Eq