-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[API]: Batch Governance Proposal APIs #10069
Comments
|
Suggested implementation: Extend the GevernanceData by
Extend Vote by
Every proposal that is part of batch will NOT be fetcheble on it's own. When a proposal ID or filter is used for proposal that is part of a batch the whole batch version of the governance data is returned. |
API Overview
In order to build support for Batch Governance Proposals in to the Governance site
We will extend the existing API to include batch governance proposals
So that the Governance site can show meaningful data (e.g. pass/fail likelihood) for a batch proposal
tl;dr a batch proposal is an object like any other proposal, except its
terms
field changes to be an array of terms fields.Specs
0028-GOVE-Governance#batch-proposals
API request details
batch
, which can contain any of the existing proposal typesProposalChange
union to include a batch typeProposalChange
contains an array ofProposalTerms
as itsterms
fieldterms
field of abatch
proposal is an array ofterms
proposalType
filterproposalType
filterproposalType
, if a batch proposal includes a proposal of that type, it must be included in the result.Sample API output (fetching a batch by ID)
This returns a batch that contains two proposals, a transfer and a freeform governance proposal. One person (the proposer) has voted
yes
.API test scenarios
Submitting a proposal
On the list API batches count as both their own type and the type of each of the proposals they contain
GIVEN there are two proposals
WHEN I use GraphQL to list all proposals, filtered by
TYPE_NEW_MARKET
proposalsTHEN the list of results will include two proposals: the batch, and the new market proposal
GIVEN there are two proposals
WHEN I use GraphQL to list all proposals, filtered by
TYPE_BATCH
proposalsTHEN the list of results will include one proposals: the batch,
Block explorer can decode a batch proposal transaction
GIVEN there is a batch proposal transaction in block 5
WHEN I use Block Explorer's REST API to fetch block 5
THEN I can see the full batch proposal including all of its contained proposals
Decision log
The text was updated successfully, but these errors were encountered: