Uh oh!
There was an error while loading. Please reload this page.
feat: add vote and propose redeemer purposes - #464
Open
slowbackspace wants to merge 1 commit into
Open
Conversation
db-sync stores the Conway governance purposes since 13.2, and the API
already returns them: a script DRep vote tx answers /txs/{hash}/redeemers
with purpose "vote" and a parameter-change proposal tx with "propose"
(both HTTP 200 on mainnet today). The purpose enums predate Conway, so
the schema rejected values the backends emit.
Widen the enum in the three response schemas that carry it:
tx_content_redeemers, script_redeemers, and mempool_tx_content.The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Adds the Conway governance purposes
voteandproposeto the redeemerpurposeenums in the three response schemas that carry them:tx_content_redeemers(/txs/{hash}/redeemers),script_redeemers(/scripts/{script_hash}/redeemers), andmempool_tx_content(/mempool/{hash}).Why
db-sync stores these purposes since Conway, and the API already returns them. Verified on mainnet: a script-DRep vote tx answers
/txs/{hash}/redeemerswithpurpose: "vote", and a parameter-change proposal tx (constitution guardrails execution) withpurpose: "propose"— both HTTP 200 in production today. The enums predate Conway, so the schema rejects values the backends emit. This change codifies existing behavior; it enables nothing new.Includes the CHANGELOG entry, regenerated artifacts (
yarn build), and the updated endpoint-schema snapshot. All tests pass.Downstream
r.purposeverbatim with no purpose filter, and the response types derive from this package — a dependency bump picks the widening up.redeemer.script_hashNULL for vote/propose rows, so/txs/{hash}/redeemersreturns an emptyscript_hashfor them and/scripts/{script_hash}/redeemersomits vote/propose executions entirely (the query matches onredeemer.script_hash).🤖 Generated with Claude Code