You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The goal is to be able to parse the .proto files and be able to determine who to aggregate which messages are of type Content to properly serialize MsgSubmitProposal.content.
However, it looks like only TextProposal is using the (cosmos_proto.implements_interface) = "Content"
(Thanks @assafmo for researching these definitions)
questions about the protobuf definitions of
MsgSubmitProposal
In MsgSubmitProposal (https://github.com/scrtlabs/cosmos-sdk/blob/ac08f6c7e0/proto/cosmos/gov/v1beta1/tx.proto#L29-L44) content is
(cosmos_proto.accepts_interface) = "Content"
, but onlyTextProposal
(https://github.com/scrtlabs/cosmos-sdk/blob/ac08f6c7e0/proto/cosmos/gov/v1beta1/gov.proto#L44-L53) is(cosmos_proto.implements_interface) = "Content"
.In practice there are at least 7 proposal types that I managed to find by hand, so my question is how can client library effectively find them?
SoftwareUpgradeProposal
(https://github.com/scrtlabs/cosmos-sdk/blob/ac08f6c7e0/proto/cosmos/upgrade/v1beta1/upgrade.proto#L45-L54)CancelSoftwareUpgradeProposal
(https://github.com/scrtlabs/cosmos-sdk/blob/ac08f6c7e0/proto/cosmos/upgrade/v1beta1/upgrade.proto#L56-L64)TextProposal
(https://github.com/scrtlabs/cosmos-sdk/blob/ac08f6c7e0/proto/cosmos/gov/v1beta1/gov.proto#L44-L53)ParameterChangeProposal
(https://github.com/scrtlabs/cosmos-sdk/blob/ac08f6c7e0/proto/cosmos/params/v1beta1/params.proto#L9-L17)CommunityPoolSpendProposal
(https://github.com/scrtlabs/cosmos-sdk/blob/ac08f6c7e0/proto/cosmos/distribution/v1beta1/distribution.proto#L111-L124)And two more in ibc-go:
6.
ClientUpdateProposal
(https://github.com/cosmos/ibc-go/blob/46e02064/proto/ibc/core/client/v1/client.proto#L39-L54)7.
UpgradeProposal
(https://github.com/cosmos/ibc-go/blob/46e02064/proto/ibc/core/client/v1/client.proto#L56-L74)Seems to me that they're all manually implementing the
Content
(https://github.com/scrtlabs/cosmos-sdk/blob/ac08f6c7e0/x/gov/legacy/v036/types.go#L40-L47) interface in Go after being derived from protobuf, and that's what ultimately decides if it's a valid proposal type or not.Also seems like
CommunityPoolSpendProposalWithDeposit
(https://github.com/enigmampc/cosmos-sdk/blob/ac08f6c7e0/proto/cosmos/distribution/v1beta1/distribution.proto#L154-L165) is defined but doesn't implement theContent
interface.Would love to get some feedback and more info on this. 🙏
tagging this issue for tracking #118
The text was updated successfully, but these errors were encountered: