-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Change governance REST endpoints to a more REST-ful structure #1284
Comments
I currently don't keep track of the proposer of a proposal. Is this something desired? |
Situation: The great dictator sunny wants to track all his proposals like "give 66% of atoms to sunny" or "let us make everyday a taco Tuesday" but he doesn't want to scroll through all the unimportant proposals. Then we would need this. |
@faboweb Given that the vote/deposit msg being POSTed contains the Also, why are addresses params while proposalIDs are REST paths? |
Regarding storing the proposer, I feel like we don't want to create a model in which we associate proposals with their proposer. How about we have one for all the deposits done by a specific address? Deposits feel like more of a "anyone can become a partial owner of the proposal", not just a single person. |
The arguments posted to the endpoint should not equal the constructed msg I think. Therefore the body in the POST does not contain the proposalID. The ID is taken from the URL. For query vs path params: Is that understandable? This is all to create a consistent API structure. |
For proposerid: |
On 2nd thought: Maybe let's change the votes endpoint to
/gov/proposals/proposalID/voters/voterID
What do you think?
Sunny Aggarwal <[email protected]> schrieb am Fr., 22. Juni 2018,
16:05:
… Regarding storing the proposer, I feel like we don't want to create a
model in which we associate proposals with their proposer. How about we
have one for all the deposits done by a specific address? Deposits feel
like more of a "anyone can become a partial owner of the proposer", not
just a single person.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1284 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFmO2bU1FwKtarkTUJ_zCPksrZ2sBNhDks5t_U4GgaJpZM4UqVeb>
.
|
voterID == address? |
Yes! :)
Sunny Aggarwal <[email protected]> schrieb am So., 24. Juni 2018,
03:32:
… And voterID is the address?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1284 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFmO2e8f522YAHU0srrBqWlkf3nSqERLks5t_uwUgaJpZM4UqVeb>
.
|
@faboweb @adrianbrink |
A huge benefit of doing parameters in POSTs is, that you can track what is going on in the network history. |
Proposal for rest-ful structure:
submit: POST /gov/proposals
deposit: POST /gov/proposals/{proposalID}/deposits
vote: POST /gov/proposals/{proposalID}/votes
get votes for address: GET /gov/proposals/{proposalID}/votes?address={voterAddress}
read proposal: GET /gov/proposals/{proposalID}
get proposals an address voted for: GET /gov/proposals/?voted={voterAddress}
get proposals by creator: GET /gov/proposals/?proposer={proposerAddress}
build endpoints returning tx that are signed client side (for later):GET /gov/proposals/build
GET /gov/proposals/{proposalID}/deposits/build
GET /gov/proposals/{proposalID}/votes/build
The text was updated successfully, but these errors were encountered: