Skip to content
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
mainfrom
feat/voting-data
Closed

Add historical voting data from TzKT#11
cmehat wants to merge 2 commits into
mainfrom
feat/voting-data

Conversation

@cmehat

@cmehat cmehat commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add fetch_voting_epochs() to update_gpx.py to fetch historical governance data from TzKT
  • Attach voting key (epoch, result, ballot counts) to each protocol in protocols.json
  • Display voting data in map popup when available; graceful degradation when absent
  • Remove Copolycube attribution from GPX creator string

Test plan

  • python scripts/update_gpx.py produces protocols.json with voting keys on mainnet protocols
  • Open map, click a mainnet protocol — popup shows voting epoch and ballot breakdown
  • Remove voting from protocols.json — map loads without errors

cmehat added 2 commits June 9, 2026 13:51
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.
Copilot AI review requested due to automatic review settings June 9, 2026 19:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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() to scripts/update_gpx.py and enrich protocols.json entries with a voting object when hashes match.
  • Update docs/index.html popups to display voting epoch/result and ballot breakdown when present.
  • Update GPX <gpx creator="..."> string in both tezos.gpx and 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 thread scripts/update_gpx.py
Comment on lines +335 to +341
epochs[prop_hash] = {
"epoch": epoch.get("index"),
"result": status,
"yayBallots": yay,
"nayBallots": nay,
"passBallots": pas,
}
Comment thread docs/index.html
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";
}
@cmehat

cmehat commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

This project has moved to oyatrino/tezosprotocolmap, where this work has already been merged. Closing as part of deprecating this repository.

@cmehat cmehat closed this Jun 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants