This repository was archived by the owner on Jun 16, 2026. It is now read-only.
Add historical voting data from TzKT#11
Closed
cmehat wants to merge 2 commits into
Closed
Conversation
Fetch voting epoch data (ballot counts, result) for each protocol that passed through on-chain governance. Attach as a "voting" key in protocols.json and display in the map popup.
5 tasks
There was a problem hiding this comment.
Pull request overview
Adds historical Tezos governance voting data (from TzKT) into the generated protocols.json and surfaces it in the map UI, while also updating the GPX creator string branding.
Changes:
- Add
fetch_voting_epochs()toscripts/update_gpx.pyand enrichprotocols.jsonentries with avotingobject when hashes match. - Update
docs/index.htmlpopups to display voting epoch/result and ballot breakdown when present. - Update GPX
<gpx creator="...">string in bothtezos.gpxand the generator script.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tezos.gpx | Updates GPX metadata creator string. |
| scripts/update_gpx.py | Fetches TzKT voting epochs and attaches voting data to protocols.json. |
| docs/index.html | Renders voting info in Leaflet popups when available. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+335
to
+341
| epochs[prop_hash] = { | ||
| "epoch": epoch.get("index"), | ||
| "result": status, | ||
| "yayBallots": yay, | ||
| "nayBallots": nay, | ||
| "passBallots": pas, | ||
| } |
Comment on lines
+84
to
+88
| popupHtml += "<br>Voted: Epoch " + esc(String(d.voting.epoch)) + | ||
| " \u2014 " + esc(d.voting.result) + | ||
| "<br>Ballots: " + d.voting.yayBallots + " yay, " + | ||
| d.voting.nayBallots + " nay, " + d.voting.passBallots + " pass"; | ||
| } |
Contributor
Author
|
This project has moved to oyatrino/tezosprotocolmap, where this work has already been merged. Closing as part of deprecating this repository. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fetch_voting_epochs()toupdate_gpx.pyto fetch historical governance data from TzKTvotingkey (epoch, result, ballot counts) to each protocol inprotocols.jsonTest plan
python scripts/update_gpx.pyproduces protocols.json withvotingkeys on mainnet protocolsvotingfrom protocols.json — map loads without errors