-
Notifications
You must be signed in to change notification settings - Fork 355
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
Cw3 spec #90
Conversation
@webmaster128 happy if you want to take an early look at the README and comment. I will be defining types for this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some initial thoughs. But looks good overall
Many implementations will want to restrict who can propose. | ||
Maybe only people in the voting set. Maybe there is some | ||
deposit to be made along with the proposal. This is not | ||
in the spec but left open to the implementation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Above in
- K of N immutible multisig. One key proposes a set of messages,
after K-1 others approve it, it can be executed with the
multisig address.
you assume that the Propose is the first approval. But I'd say it can be a valid case that the composer/proposer is not one of the signers but some type of moderator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I specify that Propose does not include a yes vote from the sender if applicable?
Specify that it does only if the proposer is in the valid voter set?
Or leave it unspecified?
I'd like to specify this, as then wallets know if they need to propose and vote, or just propose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is clean to make propose and vote two messages. It would be nice if they could be sent in one tranaction, but then we can't rely on execution data. However, this would work with client-side generated IDs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I defined it as the first in the README
export_schema(&schema_for!(ProposalResponse), &out_dir); | ||
export_schema(&schema_for!(ProposalListResponse), &out_dir); | ||
export_schema(&schema_for!(VoteResponse), &out_dir); | ||
export_schema(&schema_for!(VoteListResponse), &out_dir); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All those schemas are only generated for T = Empty
, so T
cannot be used together with the schema files. If we want to stick with the custom T
in CosmosMsg
, I think we should remove the schemas here. Then only the implementations generate schemas, which either set T
or actually use Empty
.
(the same is true for the schemas in cosmwasm-std (packages/std/schema), which are kind of pointless)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These work for generic queriers that don't support custom messages, and are actually the basis of most generic clients.
I would expect some custom contracts to add more and then we have custom clients that know that, but those would be chain-specific naturally, and this is the only set of schemas that would work over all contracts and all chains.
Closes #79
Defines a spec we can implement for various voting contracts. Happy for reviews on this interface.
There are at least 3 different cases we want to cover in this spec:
Maybe this can fit in as an extension of this interface: