refactor: add title, summary and proposer to proposal struct of gov (#14390)
This commit is contained in:
parent
6dfa0c9806
commit
08361d5ff8
@ -107,6 +107,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
||||
* [#14019](https://github.com/cosmos/cosmos-sdk/issues/14019) Remove the interface casting to allow other implementations of a `CommitMultiStore`.
|
||||
* [#13881](https://github.com/cosmos/cosmos-sdk/pull/13881) Optimize iteration on nested cached KV stores and other operations in general.
|
||||
* (x/gov) [#14347](https://github.com/cosmos/cosmos-sdk/pull/14347) Support `v1.Proposal` message in `v1beta1.Proposal.Content`.
|
||||
* (x/gov) [#14390](https://github.com/cosmos/cosmos-sdk/pull/14390) Add title, proposer and summary to proposal struct
|
||||
|
||||
### State Machine Breaking
|
||||
|
||||
|
||||
@ -1207,6 +1207,9 @@ var (
|
||||
fd_Proposal_voting_start_time protoreflect.FieldDescriptor
|
||||
fd_Proposal_voting_end_time protoreflect.FieldDescriptor
|
||||
fd_Proposal_metadata protoreflect.FieldDescriptor
|
||||
fd_Proposal_title protoreflect.FieldDescriptor
|
||||
fd_Proposal_summary protoreflect.FieldDescriptor
|
||||
fd_Proposal_proposer protoreflect.FieldDescriptor
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -1222,6 +1225,9 @@ func init() {
|
||||
fd_Proposal_voting_start_time = md_Proposal.Fields().ByName("voting_start_time")
|
||||
fd_Proposal_voting_end_time = md_Proposal.Fields().ByName("voting_end_time")
|
||||
fd_Proposal_metadata = md_Proposal.Fields().ByName("metadata")
|
||||
fd_Proposal_title = md_Proposal.Fields().ByName("title")
|
||||
fd_Proposal_summary = md_Proposal.Fields().ByName("summary")
|
||||
fd_Proposal_proposer = md_Proposal.Fields().ByName("proposer")
|
||||
}
|
||||
|
||||
var _ protoreflect.Message = (*fastReflection_Proposal)(nil)
|
||||
@ -1349,6 +1355,24 @@ func (x *fastReflection_Proposal) Range(f func(protoreflect.FieldDescriptor, pro
|
||||
return
|
||||
}
|
||||
}
|
||||
if x.Title != "" {
|
||||
value := protoreflect.ValueOfString(x.Title)
|
||||
if !f(fd_Proposal_title, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
if x.Summary != "" {
|
||||
value := protoreflect.ValueOfString(x.Summary)
|
||||
if !f(fd_Proposal_summary, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
if x.Proposer != "" {
|
||||
value := protoreflect.ValueOfString(x.Proposer)
|
||||
if !f(fd_Proposal_proposer, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Has reports whether a field is populated.
|
||||
@ -1384,6 +1408,12 @@ func (x *fastReflection_Proposal) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
return x.VotingEndTime != nil
|
||||
case "cosmos.gov.v1.Proposal.metadata":
|
||||
return x.Metadata != ""
|
||||
case "cosmos.gov.v1.Proposal.title":
|
||||
return x.Title != ""
|
||||
case "cosmos.gov.v1.Proposal.summary":
|
||||
return x.Summary != ""
|
||||
case "cosmos.gov.v1.Proposal.proposer":
|
||||
return x.Proposer != ""
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Proposal"))
|
||||
@ -1420,6 +1450,12 @@ func (x *fastReflection_Proposal) Clear(fd protoreflect.FieldDescriptor) {
|
||||
x.VotingEndTime = nil
|
||||
case "cosmos.gov.v1.Proposal.metadata":
|
||||
x.Metadata = ""
|
||||
case "cosmos.gov.v1.Proposal.title":
|
||||
x.Title = ""
|
||||
case "cosmos.gov.v1.Proposal.summary":
|
||||
x.Summary = ""
|
||||
case "cosmos.gov.v1.Proposal.proposer":
|
||||
x.Proposer = ""
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Proposal"))
|
||||
@ -1472,6 +1508,15 @@ func (x *fastReflection_Proposal) Get(descriptor protoreflect.FieldDescriptor) p
|
||||
case "cosmos.gov.v1.Proposal.metadata":
|
||||
value := x.Metadata
|
||||
return protoreflect.ValueOfString(value)
|
||||
case "cosmos.gov.v1.Proposal.title":
|
||||
value := x.Title
|
||||
return protoreflect.ValueOfString(value)
|
||||
case "cosmos.gov.v1.Proposal.summary":
|
||||
value := x.Summary
|
||||
return protoreflect.ValueOfString(value)
|
||||
case "cosmos.gov.v1.Proposal.proposer":
|
||||
value := x.Proposer
|
||||
return protoreflect.ValueOfString(value)
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Proposal"))
|
||||
@ -1516,6 +1561,12 @@ func (x *fastReflection_Proposal) Set(fd protoreflect.FieldDescriptor, value pro
|
||||
x.VotingEndTime = value.Message().Interface().(*timestamppb.Timestamp)
|
||||
case "cosmos.gov.v1.Proposal.metadata":
|
||||
x.Metadata = value.Interface().(string)
|
||||
case "cosmos.gov.v1.Proposal.title":
|
||||
x.Title = value.Interface().(string)
|
||||
case "cosmos.gov.v1.Proposal.summary":
|
||||
x.Summary = value.Interface().(string)
|
||||
case "cosmos.gov.v1.Proposal.proposer":
|
||||
x.Proposer = value.Interface().(string)
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Proposal"))
|
||||
@ -1579,6 +1630,12 @@ func (x *fastReflection_Proposal) Mutable(fd protoreflect.FieldDescriptor) proto
|
||||
panic(fmt.Errorf("field status of message cosmos.gov.v1.Proposal is not mutable"))
|
||||
case "cosmos.gov.v1.Proposal.metadata":
|
||||
panic(fmt.Errorf("field metadata of message cosmos.gov.v1.Proposal is not mutable"))
|
||||
case "cosmos.gov.v1.Proposal.title":
|
||||
panic(fmt.Errorf("field title of message cosmos.gov.v1.Proposal is not mutable"))
|
||||
case "cosmos.gov.v1.Proposal.summary":
|
||||
panic(fmt.Errorf("field summary of message cosmos.gov.v1.Proposal is not mutable"))
|
||||
case "cosmos.gov.v1.Proposal.proposer":
|
||||
panic(fmt.Errorf("field proposer of message cosmos.gov.v1.Proposal is not mutable"))
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Proposal"))
|
||||
@ -1619,6 +1676,12 @@ func (x *fastReflection_Proposal) NewField(fd protoreflect.FieldDescriptor) prot
|
||||
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
||||
case "cosmos.gov.v1.Proposal.metadata":
|
||||
return protoreflect.ValueOfString("")
|
||||
case "cosmos.gov.v1.Proposal.title":
|
||||
return protoreflect.ValueOfString("")
|
||||
case "cosmos.gov.v1.Proposal.summary":
|
||||
return protoreflect.ValueOfString("")
|
||||
case "cosmos.gov.v1.Proposal.proposer":
|
||||
return protoreflect.ValueOfString("")
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Proposal"))
|
||||
@ -1730,6 +1793,18 @@ func (x *fastReflection_Proposal) ProtoMethods() *protoiface.Methods {
|
||||
if l > 0 {
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
l = len(x.Title)
|
||||
if l > 0 {
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
l = len(x.Summary)
|
||||
if l > 0 {
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
l = len(x.Proposer)
|
||||
if l > 0 {
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
if x.unknownFields != nil {
|
||||
n += len(x.unknownFields)
|
||||
}
|
||||
@ -1759,6 +1834,27 @@ func (x *fastReflection_Proposal) ProtoMethods() *protoiface.Methods {
|
||||
i -= len(x.unknownFields)
|
||||
copy(dAtA[i:], x.unknownFields)
|
||||
}
|
||||
if len(x.Proposer) > 0 {
|
||||
i -= len(x.Proposer)
|
||||
copy(dAtA[i:], x.Proposer)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Proposer)))
|
||||
i--
|
||||
dAtA[i] = 0x6a
|
||||
}
|
||||
if len(x.Summary) > 0 {
|
||||
i -= len(x.Summary)
|
||||
copy(dAtA[i:], x.Summary)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Summary)))
|
||||
i--
|
||||
dAtA[i] = 0x62
|
||||
}
|
||||
if len(x.Title) > 0 {
|
||||
i -= len(x.Title)
|
||||
copy(dAtA[i:], x.Title)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Title)))
|
||||
i--
|
||||
dAtA[i] = 0x5a
|
||||
}
|
||||
if len(x.Metadata) > 0 {
|
||||
i -= len(x.Metadata)
|
||||
copy(dAtA[i:], x.Metadata)
|
||||
@ -2245,6 +2341,102 @@ func (x *fastReflection_Proposal) ProtoMethods() *protoiface.Methods {
|
||||
}
|
||||
x.Metadata = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 11:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Title", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
x.Title = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 12:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Summary", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
x.Summary = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 13:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Proposer", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
x.Proposer = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
||||
@ -6302,6 +6494,11 @@ type Proposal struct {
|
||||
VotingEndTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=voting_end_time,json=votingEndTime,proto3" json:"voting_end_time,omitempty"`
|
||||
// metadata is any arbitrary metadata attached to the proposal.
|
||||
Metadata string `protobuf:"bytes,10,opt,name=metadata,proto3" json:"metadata,omitempty"`
|
||||
// title is the title of the proposal
|
||||
Title string `protobuf:"bytes,11,opt,name=title,proto3" json:"title,omitempty"`
|
||||
// summary is a short summary of the proposal
|
||||
Summary string `protobuf:"bytes,12,opt,name=summary,proto3" json:"summary,omitempty"`
|
||||
Proposer string `protobuf:"bytes,13,opt,name=proposer,proto3" json:"proposer,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Proposal) Reset() {
|
||||
@ -6394,6 +6591,27 @@ func (x *Proposal) GetMetadata() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Proposal) GetTitle() string {
|
||||
if x != nil {
|
||||
return x.Title
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Proposal) GetSummary() string {
|
||||
if x != nil {
|
||||
return x.Summary
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Proposal) GetProposer() string {
|
||||
if x != nil {
|
||||
return x.Proposer
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// TallyResult defines a standard tally for a governance proposal.
|
||||
type TallyResult struct {
|
||||
state protoimpl.MessageState
|
||||
@ -6794,7 +7012,7 @@ var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{
|
||||
0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19,
|
||||
0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62,
|
||||
0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8,
|
||||
0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xdb, 0x04, 0x0a,
|
||||
0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xc1, 0x05, 0x0a,
|
||||
0x08, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x08, 0x6d, 0x65, 0x73,
|
||||
0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f,
|
||||
@ -6832,121 +7050,128 @@ var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{
|
||||
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52,
|
||||
0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a,
|
||||
0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xd7, 0x01, 0x0a, 0x0b, 0x54,
|
||||
0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2b, 0x0a, 0x09, 0x79, 0x65,
|
||||
0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2,
|
||||
0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x08, 0x79,
|
||||
0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x0d, 0x61, 0x62, 0x73, 0x74, 0x61,
|
||||
0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e,
|
||||
0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0c,
|
||||
0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x08,
|
||||
0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e,
|
||||
0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x07,
|
||||
0x6e, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x12, 0x6e, 0x6f, 0x5f, 0x77, 0x69,
|
||||
0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20,
|
||||
0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69,
|
||||
0x74, 0x6c, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65,
|
||||
0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x34, 0x0a, 0x08, 0x70, 0x72,
|
||||
0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4,
|
||||
0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
|
||||
0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72,
|
||||
0x22, 0xd7, 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,
|
||||
0x12, 0x2b, 0x0a, 0x09, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x49, 0x6e, 0x74, 0x52, 0x0f, 0x6e, 0x6f, 0x57, 0x69, 0x74, 0x68, 0x56, 0x65, 0x74, 0x6f, 0x43,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x22, 0xb6, 0x01, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x1f, 0x0a,
|
||||
0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x2e,
|
||||
0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2,
|
||||
0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73,
|
||||
0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x3b,
|
||||
0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d,
|
||||
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d,
|
||||
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0xd9, 0x01,
|
||||
0x0a, 0x0d, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12,
|
||||
0x59, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61,
|
||||
0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42,
|
||||
0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x15, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70,
|
||||
0x6f, 0x73, 0x69, 0x74, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x0a,
|
||||
0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x6d, 0x0a, 0x12, 0x6d, 0x61,
|
||||
0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
||||
0x49, 0x6e, 0x74, 0x52, 0x08, 0x79, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x33, 0x0a,
|
||||
0x0d, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73,
|
||||
0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0c, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x12, 0x29, 0x0a, 0x08, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73,
|
||||
0x2e, 0x49, 0x6e, 0x74, 0x52, 0x07, 0x6e, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3b, 0x0a,
|
||||
0x12, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63,
|
||||
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0f, 0x6e, 0x6f, 0x57, 0x69, 0x74,
|
||||
0x68, 0x56, 0x65, 0x74, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xb6, 0x01, 0x0a, 0x04, 0x56,
|
||||
0x6f, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73,
|
||||
0x61, 0x6c, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x76,
|
||||
0x6f, 0x74, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
|
||||
0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67,
|
||||
0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x56, 0x6f,
|
||||
0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4a, 0x04, 0x08,
|
||||
0x03, 0x10, 0x04, 0x22, 0xd9, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50,
|
||||
0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x59, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70,
|
||||
0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73,
|
||||
0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
|
||||
0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x15, 0x6d,
|
||||
0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65,
|
||||
0x6d, 0x70, 0x74, 0x79, 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
|
||||
0x12, 0x6d, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f,
|
||||
0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
|
||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44,
|
||||
0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x24, 0xea, 0xde, 0x1f, 0x1c, 0x6d, 0x61, 0x78,
|
||||
0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x2c,
|
||||
0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x10, 0x6d,
|
||||
0x61, 0x78, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22,
|
||||
0x54, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12,
|
||||
0x44, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x42, 0x24, 0xea, 0xde, 0x1f, 0x1c, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73,
|
||||
0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d,
|
||||
0x70, 0x74, 0x79, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x44, 0x65, 0x70, 0x6f,
|
||||
0x73, 0x69, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x54, 0x0a, 0x0c, 0x56, 0x6f, 0x74,
|
||||
0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x44, 0x0a, 0x0d, 0x76, 0x6f, 0x74,
|
||||
0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50,
|
||||
0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x9a, 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x50,
|
||||
0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f,
|
||||
0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x2c, 0x0a,
|
||||
0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63,
|
||||
0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x35, 0x0a, 0x0e, 0x76,
|
||||
0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x44, 0x65, 0x63, 0x52, 0x0d, 0x76, 0x65, 0x74, 0x6f, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f,
|
||||
0x6c, 0x64, 0x22, 0xbc, 0x03, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x45, 0x0a,
|
||||
0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65,
|
||||
0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8,
|
||||
0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70,
|
||||
0x6f, 0x73, 0x69, 0x74, 0x12, 0x4d, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f,
|
||||
0x73, 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
||||
0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f,
|
||||
0x01, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22,
|
||||
0x9a, 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12,
|
||||
0x26, 0x0a, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
|
||||
0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52,
|
||||
0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x2c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73,
|
||||
0x68, 0x6f, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a,
|
||||
0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65,
|
||||
0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x35, 0x0a, 0x0e, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68,
|
||||
0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2,
|
||||
0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, 0x76,
|
||||
0x65, 0x74, 0x6f, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0xbc, 0x03, 0x0a,
|
||||
0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64,
|
||||
0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63,
|
||||
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,
|
||||
0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0,
|
||||
0x2a, 0x01, 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x4d,
|
||||
0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x65,
|
||||
0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f,
|
||||
0x01, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x65, 0x72,
|
||||
0x69, 0x6f, 0x64, 0x12, 0x44, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65,
|
||||
0x72, 0x69, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f,
|
||||
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x10, 0x6d, 0x61, 0x78,
|
||||
0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x44, 0x0a,
|
||||
0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42,
|
||||
0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72,
|
||||
0x69, 0x6f, 0x64, 0x12, 0x26, 0x0a, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x44, 0x65, 0x63, 0x52, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x2c, 0x0a, 0x09, 0x74,
|
||||
0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e,
|
||||
0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09,
|
||||
0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x35, 0x0a, 0x0e, 0x76, 0x65, 0x74,
|
||||
0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||
0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65,
|
||||
0x63, 0x52, 0x0d, 0x76, 0x65, 0x74, 0x6f, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64,
|
||||
0x12, 0x49, 0x0a, 0x19, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f,
|
||||
0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x07, 0x20,
|
||||
0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x44, 0x65, 0x63, 0x52, 0x16, 0x6d, 0x69, 0x6e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x44,
|
||||
0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x2a, 0x89, 0x01, 0x0a, 0x0a,
|
||||
0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x56, 0x4f,
|
||||
0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43,
|
||||
0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f,
|
||||
0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13,
|
||||
0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x53, 0x54,
|
||||
0x41, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50,
|
||||
0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x56, 0x4f, 0x54,
|
||||
0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, 0x57, 0x49, 0x54, 0x48,
|
||||
0x5f, 0x56, 0x45, 0x54, 0x4f, 0x10, 0x04, 0x2a, 0xce, 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x70,
|
||||
0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x52,
|
||||
0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e,
|
||||
0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x50,
|
||||
0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44,
|
||||
0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x01, 0x12,
|
||||
0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54,
|
||||
0x55, 0x53, 0x5f, 0x56, 0x4f, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44,
|
||||
0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53,
|
||||
0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x1c,
|
||||
0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55,
|
||||
0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16,
|
||||
0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f,
|
||||
0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x42, 0x99, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d,
|
||||
0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x08,
|
||||
0x47, 0x6f, 0x76, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d,
|
||||
0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73,
|
||||
0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31,
|
||||
0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c,
|
||||
0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c,
|
||||
0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
|
||||
0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76,
|
||||
0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0c, 0x76, 0x6f, 0x74,
|
||||
0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x26, 0x0a, 0x06, 0x71, 0x75, 0x6f,
|
||||
0x72, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63,
|
||||
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75,
|
||||
0x6d, 0x12, 0x2c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73,
|
||||
0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12,
|
||||
0x35, 0x0a, 0x0e, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c,
|
||||
0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73,
|
||||
0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, 0x76, 0x65, 0x74, 0x6f, 0x54, 0x68, 0x72,
|
||||
0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x49, 0x0a, 0x19, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x6e,
|
||||
0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x72, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63,
|
||||
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x16, 0x6d, 0x69, 0x6e, 0x49, 0x6e,
|
||||
0x69, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x2a, 0x89, 0x01, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x12, 0x1b, 0x0a, 0x17, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f,
|
||||
0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a,
|
||||
0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53,
|
||||
0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f,
|
||||
0x4e, 0x5f, 0x41, 0x42, 0x53, 0x54, 0x41, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x56,
|
||||
0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x10, 0x03, 0x12,
|
||||
0x1c, 0x0a, 0x18, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e,
|
||||
0x4f, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x56, 0x45, 0x54, 0x4f, 0x10, 0x04, 0x2a, 0xce, 0x01,
|
||||
0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41,
|
||||
0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,
|
||||
0x00, 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54,
|
||||
0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x5f, 0x50, 0x45, 0x52,
|
||||
0x49, 0x4f, 0x44, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41,
|
||||
0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x4f, 0x54, 0x49, 0x4e, 0x47, 0x5f,
|
||||
0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50,
|
||||
0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x41, 0x53, 0x53,
|
||||
0x45, 0x44, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c,
|
||||
0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44,
|
||||
0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53,
|
||||
0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x42, 0x99,
|
||||
0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f,
|
||||
0x76, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x47, 0x6f, 0x76, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
|
||||
0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61,
|
||||
0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31,
|
||||
0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43,
|
||||
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43,
|
||||
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43,
|
||||
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42,
|
||||
0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f,
|
||||
0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@ -126,6 +126,8 @@ var (
|
||||
fd_MsgSubmitProposal_initial_deposit protoreflect.FieldDescriptor
|
||||
fd_MsgSubmitProposal_proposer protoreflect.FieldDescriptor
|
||||
fd_MsgSubmitProposal_metadata protoreflect.FieldDescriptor
|
||||
fd_MsgSubmitProposal_title protoreflect.FieldDescriptor
|
||||
fd_MsgSubmitProposal_summary protoreflect.FieldDescriptor
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -135,6 +137,8 @@ func init() {
|
||||
fd_MsgSubmitProposal_initial_deposit = md_MsgSubmitProposal.Fields().ByName("initial_deposit")
|
||||
fd_MsgSubmitProposal_proposer = md_MsgSubmitProposal.Fields().ByName("proposer")
|
||||
fd_MsgSubmitProposal_metadata = md_MsgSubmitProposal.Fields().ByName("metadata")
|
||||
fd_MsgSubmitProposal_title = md_MsgSubmitProposal.Fields().ByName("title")
|
||||
fd_MsgSubmitProposal_summary = md_MsgSubmitProposal.Fields().ByName("summary")
|
||||
}
|
||||
|
||||
var _ protoreflect.Message = (*fastReflection_MsgSubmitProposal)(nil)
|
||||
@ -226,6 +230,18 @@ func (x *fastReflection_MsgSubmitProposal) Range(f func(protoreflect.FieldDescri
|
||||
return
|
||||
}
|
||||
}
|
||||
if x.Title != "" {
|
||||
value := protoreflect.ValueOfString(x.Title)
|
||||
if !f(fd_MsgSubmitProposal_title, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
if x.Summary != "" {
|
||||
value := protoreflect.ValueOfString(x.Summary)
|
||||
if !f(fd_MsgSubmitProposal_summary, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Has reports whether a field is populated.
|
||||
@ -249,6 +265,10 @@ func (x *fastReflection_MsgSubmitProposal) Has(fd protoreflect.FieldDescriptor)
|
||||
return x.Proposer != ""
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.metadata":
|
||||
return x.Metadata != ""
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.title":
|
||||
return x.Title != ""
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.summary":
|
||||
return x.Summary != ""
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitProposal"))
|
||||
@ -273,6 +293,10 @@ func (x *fastReflection_MsgSubmitProposal) Clear(fd protoreflect.FieldDescriptor
|
||||
x.Proposer = ""
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.metadata":
|
||||
x.Metadata = ""
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.title":
|
||||
x.Title = ""
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.summary":
|
||||
x.Summary = ""
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitProposal"))
|
||||
@ -307,6 +331,12 @@ func (x *fastReflection_MsgSubmitProposal) Get(descriptor protoreflect.FieldDesc
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.metadata":
|
||||
value := x.Metadata
|
||||
return protoreflect.ValueOfString(value)
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.title":
|
||||
value := x.Title
|
||||
return protoreflect.ValueOfString(value)
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.summary":
|
||||
value := x.Summary
|
||||
return protoreflect.ValueOfString(value)
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitProposal"))
|
||||
@ -339,6 +369,10 @@ func (x *fastReflection_MsgSubmitProposal) Set(fd protoreflect.FieldDescriptor,
|
||||
x.Proposer = value.Interface().(string)
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.metadata":
|
||||
x.Metadata = value.Interface().(string)
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.title":
|
||||
x.Title = value.Interface().(string)
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.summary":
|
||||
x.Summary = value.Interface().(string)
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitProposal"))
|
||||
@ -375,6 +409,10 @@ func (x *fastReflection_MsgSubmitProposal) Mutable(fd protoreflect.FieldDescript
|
||||
panic(fmt.Errorf("field proposer of message cosmos.gov.v1.MsgSubmitProposal is not mutable"))
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.metadata":
|
||||
panic(fmt.Errorf("field metadata of message cosmos.gov.v1.MsgSubmitProposal is not mutable"))
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.title":
|
||||
panic(fmt.Errorf("field title of message cosmos.gov.v1.MsgSubmitProposal is not mutable"))
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.summary":
|
||||
panic(fmt.Errorf("field summary of message cosmos.gov.v1.MsgSubmitProposal is not mutable"))
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitProposal"))
|
||||
@ -398,6 +436,10 @@ func (x *fastReflection_MsgSubmitProposal) NewField(fd protoreflect.FieldDescrip
|
||||
return protoreflect.ValueOfString("")
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.metadata":
|
||||
return protoreflect.ValueOfString("")
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.title":
|
||||
return protoreflect.ValueOfString("")
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.summary":
|
||||
return protoreflect.ValueOfString("")
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitProposal"))
|
||||
@ -487,6 +529,14 @@ func (x *fastReflection_MsgSubmitProposal) ProtoMethods() *protoiface.Methods {
|
||||
if l > 0 {
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
l = len(x.Title)
|
||||
if l > 0 {
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
l = len(x.Summary)
|
||||
if l > 0 {
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
if x.unknownFields != nil {
|
||||
n += len(x.unknownFields)
|
||||
}
|
||||
@ -516,6 +566,20 @@ func (x *fastReflection_MsgSubmitProposal) ProtoMethods() *protoiface.Methods {
|
||||
i -= len(x.unknownFields)
|
||||
copy(dAtA[i:], x.unknownFields)
|
||||
}
|
||||
if len(x.Summary) > 0 {
|
||||
i -= len(x.Summary)
|
||||
copy(dAtA[i:], x.Summary)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Summary)))
|
||||
i--
|
||||
dAtA[i] = 0x32
|
||||
}
|
||||
if len(x.Title) > 0 {
|
||||
i -= len(x.Title)
|
||||
copy(dAtA[i:], x.Title)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Title)))
|
||||
i--
|
||||
dAtA[i] = 0x2a
|
||||
}
|
||||
if len(x.Metadata) > 0 {
|
||||
i -= len(x.Metadata)
|
||||
copy(dAtA[i:], x.Metadata)
|
||||
@ -743,6 +807,70 @@ func (x *fastReflection_MsgSubmitProposal) ProtoMethods() *protoiface.Methods {
|
||||
}
|
||||
x.Metadata = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 5:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Title", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
x.Title = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 6:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Summary", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
x.Summary = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
||||
@ -5846,6 +5974,10 @@ type MsgSubmitProposal struct {
|
||||
Proposer string `protobuf:"bytes,3,opt,name=proposer,proto3" json:"proposer,omitempty"`
|
||||
// metadata is any arbitrary metadata attached to the proposal.
|
||||
Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
|
||||
// title is the title of the proposal.
|
||||
Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"`
|
||||
// summary is the summary of the proposal
|
||||
Summary string `protobuf:"bytes,6,opt,name=summary,proto3" json:"summary,omitempty"`
|
||||
}
|
||||
|
||||
func (x *MsgSubmitProposal) Reset() {
|
||||
@ -5896,6 +6028,20 @@ func (x *MsgSubmitProposal) GetMetadata() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MsgSubmitProposal) GetTitle() string {
|
||||
if x != nil {
|
||||
return x.Title
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MsgSubmitProposal) GetSummary() string {
|
||||
if x != nil {
|
||||
return x.Summary
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type.
|
||||
type MsgSubmitProposalResponse struct {
|
||||
state protoimpl.MessageState
|
||||
@ -6367,7 +6513,7 @@ var file_cosmos_gov_v1_tx_proto_rawDesc = []byte{
|
||||
0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f,
|
||||
0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69,
|
||||
0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x99, 0x02, 0x0a, 0x11, 0x4d, 0x73, 0x67,
|
||||
0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc9, 0x02, 0x0a, 0x11, 0x4d, 0x73, 0x67,
|
||||
0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x30,
|
||||
0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
||||
@ -6382,7 +6528,10 @@ var file_cosmos_gov_v1_tx_proto_rawDesc = []byte{
|
||||
0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x70, 0x72, 0x6f,
|
||||
0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
||||
0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
||||
0x61, 0x3a, 0x31, 0x82, 0xe7, 0xb0, 0x2a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72,
|
||||
0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61,
|
||||
0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72,
|
||||
0x79, 0x3a, 0x31, 0x82, 0xe7, 0xb0, 0x2a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72,
|
||||
0x8a, 0xe7, 0xb0, 0x2a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f,
|
||||
0x76, 0x31, 0x2f, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70,
|
||||
0x6f, 0x73, 0x61, 0x6c, 0x22, 0x3c, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69,
|
||||
|
||||
@ -81,6 +81,14 @@ message Proposal {
|
||||
|
||||
// metadata is any arbitrary metadata attached to the proposal.
|
||||
string metadata = 10;
|
||||
|
||||
// title is the title of the proposal
|
||||
string title = 11;
|
||||
|
||||
// summary is a short summary of the proposal
|
||||
string summary = 12;
|
||||
|
||||
string proposer = 13 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
}
|
||||
|
||||
// ProposalStatus enumerates the valid statuses of a proposal.
|
||||
|
||||
@ -56,6 +56,12 @@ message MsgSubmitProposal {
|
||||
|
||||
// metadata is any arbitrary metadata attached to the proposal.
|
||||
string metadata = 4;
|
||||
|
||||
// title is the title of the proposal.
|
||||
string title = 5;
|
||||
|
||||
// summary is the summary of the proposal
|
||||
string summary = 6;
|
||||
}
|
||||
|
||||
// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type.
|
||||
|
||||
@ -107,6 +107,8 @@ func (s *E2ETestSuite) TestNewCmdSubmitProposal() {
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "My awesome title",
|
||||
"summary": "My awesome description",
|
||||
"metadata": "%s",
|
||||
"deposit": "%s"
|
||||
}`, authtypes.NewModuleAddress(types.ModuleName), base64.StdEncoding.EncodeToString(propMetadata), sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(5431)))
|
||||
|
||||
@ -74,11 +74,11 @@ func TestImportExportQueues(t *testing.T) {
|
||||
|
||||
ctx = s1.app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
// Create two proposals, put the second into the voting period
|
||||
proposal1, err := s1.GovKeeper.SubmitProposal(ctx, []sdk.Msg{mkTestLegacyContent(t)}, "")
|
||||
proposal1, err := s1.GovKeeper.SubmitProposal(ctx, []sdk.Msg{mkTestLegacyContent(t)}, "", "test", "description", addrs[0])
|
||||
require.NoError(t, err)
|
||||
proposalID1 := proposal1.Id
|
||||
|
||||
proposal2, err := s1.GovKeeper.SubmitProposal(ctx, []sdk.Msg{mkTestLegacyContent(t)}, "")
|
||||
proposal2, err := s1.GovKeeper.SubmitProposal(ctx, []sdk.Msg{mkTestLegacyContent(t)}, "", "test", "description", addrs[0])
|
||||
require.NoError(t, err)
|
||||
proposalID2 := proposal2.Id
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryTally() {
|
||||
"create a proposal and get tally",
|
||||
func() {
|
||||
var err error
|
||||
proposal, err = app.GovKeeper.SubmitProposal(ctx, TestProposal, "")
|
||||
proposal, err = app.GovKeeper.SubmitProposal(ctx, TestProposal, "", "test", "description", addrs[0])
|
||||
suite.Require().NoError(err)
|
||||
suite.Require().NotNil(proposal)
|
||||
|
||||
@ -161,7 +161,7 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryTally() {
|
||||
"create a proposal and get tally",
|
||||
func() {
|
||||
var err error
|
||||
proposal, err = app.GovKeeper.SubmitProposal(ctx, TestProposal, "")
|
||||
proposal, err = app.GovKeeper.SubmitProposal(ctx, TestProposal, "", "test", "description", addrs[0])
|
||||
suite.Require().NoError(err)
|
||||
suite.Require().NotNil(proposal)
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ func TestTallyNoOneVotes(t *testing.T) {
|
||||
createValidators(t, ctx, app, []int64{5, 5, 5})
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "")
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
require.NoError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -44,7 +44,7 @@ func TestTallyNoQuorum(t *testing.T) {
|
||||
addrs := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.NewInt(10000000))
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "")
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", addrs[0])
|
||||
require.NoError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -67,7 +67,7 @@ func TestTallyOnlyValidatorsAllYes(t *testing.T) {
|
||||
addrs, _ := createValidators(t, ctx, app, []int64{5, 5, 5})
|
||||
tp := TestProposal
|
||||
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "")
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", addrs[0])
|
||||
require.NoError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -93,7 +93,7 @@ func TestTallyOnlyValidators51No(t *testing.T) {
|
||||
valAccAddrs, _ := createValidators(t, ctx, app, []int64{5, 6, 0})
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "")
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", valAccAddrs[0])
|
||||
require.NoError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -117,7 +117,7 @@ func TestTallyOnlyValidators51Yes(t *testing.T) {
|
||||
valAccAddrs, _ := createValidators(t, ctx, app, []int64{5, 6, 0})
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "")
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", valAccAddrs[0])
|
||||
require.NoError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -142,7 +142,7 @@ func TestTallyOnlyValidatorsVetoed(t *testing.T) {
|
||||
valAccAddrs, _ := createValidators(t, ctx, app, []int64{6, 6, 7})
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "")
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", valAccAddrs[0])
|
||||
require.NoError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -168,7 +168,7 @@ func TestTallyOnlyValidatorsAbstainPasses(t *testing.T) {
|
||||
valAccAddrs, _ := createValidators(t, ctx, app, []int64{6, 6, 7})
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "")
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", valAccAddrs[0])
|
||||
require.NoError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -194,7 +194,7 @@ func TestTallyOnlyValidatorsAbstainFails(t *testing.T) {
|
||||
valAccAddrs, _ := createValidators(t, ctx, app, []int64{6, 6, 7})
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "")
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", valAccAddrs[0])
|
||||
require.NoError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -221,7 +221,7 @@ func TestTallyOnlyValidatorsNonVoter(t *testing.T) {
|
||||
valAccAddr1, valAccAddr2 := valAccAddrs[0], valAccAddrs[1]
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "")
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", valAccAddrs[0])
|
||||
require.NoError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -255,7 +255,7 @@ func TestTallyDelgatorOverride(t *testing.T) {
|
||||
_ = staking.EndBlocker(ctx, app.StakingKeeper)
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "")
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", addrs[0])
|
||||
require.NoError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -291,7 +291,7 @@ func TestTallyDelgatorInherit(t *testing.T) {
|
||||
_ = staking.EndBlocker(ctx, app.StakingKeeper)
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "")
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", addrs[0])
|
||||
require.NoError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -330,7 +330,7 @@ func TestTallyDelgatorMultipleOverride(t *testing.T) {
|
||||
_ = staking.EndBlocker(ctx, app.StakingKeeper)
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "")
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", addrs[0])
|
||||
require.NoError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -372,7 +372,7 @@ func TestTallyDelgatorMultipleInherit(t *testing.T) {
|
||||
_ = staking.EndBlocker(ctx, app.StakingKeeper)
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "")
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", addrs[0])
|
||||
require.NoError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -415,7 +415,7 @@ func TestTallyJailedValidator(t *testing.T) {
|
||||
app.StakingKeeper.Jail(ctx, sdk.ConsAddress(consAddr.Bytes()))
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "")
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", addrs[0])
|
||||
require.NoError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -448,7 +448,7 @@ func TestTallyValidatorMultipleDelegations(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "")
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", addrs[0])
|
||||
require.NoError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
|
||||
@ -359,6 +359,8 @@ func TestMsgSetSendEnabled(t *testing.T) {
|
||||
sdk.Coins{{Denom: "foocoin", Amount: sdk.NewInt(5)}},
|
||||
addr1Str,
|
||||
"set default send enabled to true",
|
||||
"Change send enabled",
|
||||
"Modify send enabled and set to true",
|
||||
)
|
||||
require.NoError(t, err, "making goodGovProp")
|
||||
badGovProp, err := govv1.NewMsgSubmitProposal(
|
||||
@ -368,6 +370,8 @@ func TestMsgSetSendEnabled(t *testing.T) {
|
||||
sdk.Coins{{Denom: "foocoin", Amount: sdk.NewInt(5)}},
|
||||
addr1Str,
|
||||
"set default send enabled to true",
|
||||
"Change send enabled",
|
||||
"Modify send enabled and set to true",
|
||||
)
|
||||
require.NoError(t, err, "making badGovProp")
|
||||
|
||||
|
||||
@ -1149,10 +1149,16 @@ where `proposal.json` contains:
|
||||
}
|
||||
],
|
||||
"metadata": "AQ==",
|
||||
"deposit": "10stake"
|
||||
"deposit": "10stake",
|
||||
"title": "Proposal Title",
|
||||
"summary": "Proposal Summary"
|
||||
}
|
||||
```
|
||||
|
||||
:::note
|
||||
By default the metadata and the proposal are both limited by 255 characters, this can be overridden by the application developer.
|
||||
:::
|
||||
|
||||
##### submit-legacy-proposal
|
||||
|
||||
The `submit-legacy-proposal` command allows users to submit a governance legacy proposal along with an initial deposit.
|
||||
@ -1290,7 +1296,9 @@ Example Output:
|
||||
}
|
||||
],
|
||||
"votingStartTime": "2021-09-16T19:40:08.712440474Z",
|
||||
"votingEndTime": "2021-09-18T19:40:08.712440474Z"
|
||||
"votingEndTime": "2021-09-18T19:40:08.712440474Z",
|
||||
"title": "Test Proposal",
|
||||
"summary": "testing, testing, 1, 2, 3"
|
||||
}
|
||||
}
|
||||
```
|
||||
@ -1336,7 +1344,9 @@ Example Output:
|
||||
],
|
||||
"votingStartTime": "2022-03-28T14:25:26.644857113Z",
|
||||
"votingEndTime": "2022-03-30T14:25:26.644857113Z",
|
||||
"metadata": "AQ=="
|
||||
"metadata": "AQ==",
|
||||
"title": "Test Proposal",
|
||||
"summary": "testing, testing, 1, 2, 3"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@ -42,6 +42,8 @@ func TestTickExpiredDepositPeriod(t *testing.T) {
|
||||
sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 5)},
|
||||
addrs[0].String(),
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
@ -96,6 +98,8 @@ func TestTickMultipleExpiredDepositPeriod(t *testing.T) {
|
||||
sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 5)},
|
||||
addrs[0].String(),
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
@ -120,6 +124,8 @@ func TestTickMultipleExpiredDepositPeriod(t *testing.T) {
|
||||
sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 5)},
|
||||
addrs[0].String(),
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
@ -179,6 +185,8 @@ func TestTickPassedDepositPeriod(t *testing.T) {
|
||||
sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 5)},
|
||||
addrs[0].String(),
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
@ -232,7 +240,7 @@ func TestTickPassedVotingPeriod(t *testing.T) {
|
||||
activeQueue.Close()
|
||||
|
||||
proposalCoins := sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, suite.StakingKeeper.TokensFromConsensusPower(ctx, 5))}
|
||||
newProposalMsg, err := v1.NewMsgSubmitProposal([]sdk.Msg{mkTestLegacyContent(t)}, proposalCoins, addrs[0].String(), "")
|
||||
newProposalMsg, err := v1.NewMsgSubmitProposal([]sdk.Msg{mkTestLegacyContent(t)}, proposalCoins, addrs[0].String(), "", "Proposal", "description of proposal")
|
||||
require.NoError(t, err)
|
||||
|
||||
res, err := govMsgSvr.SubmitProposal(ctx, newProposalMsg)
|
||||
@ -299,7 +307,7 @@ func TestProposalPassedEndblocker(t *testing.T) {
|
||||
require.NotNil(t, macc)
|
||||
initialModuleAccCoins := suite.BankKeeper.GetAllBalances(ctx, macc.GetAddress())
|
||||
|
||||
proposal, err := suite.GovKeeper.SubmitProposal(ctx, []sdk.Msg{mkTestLegacyContent(t)}, "")
|
||||
proposal, err := suite.GovKeeper.SubmitProposal(ctx, []sdk.Msg{mkTestLegacyContent(t)}, "", "title", "summary", addrs[0])
|
||||
require.NoError(t, err)
|
||||
|
||||
proposalCoins := sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, suite.StakingKeeper.TokensFromConsensusPower(ctx, 10))}
|
||||
@ -348,7 +356,7 @@ func TestEndBlockerProposalHandlerFailed(t *testing.T) {
|
||||
staking.EndBlocker(ctx, suite.StakingKeeper)
|
||||
|
||||
msg := banktypes.NewMsgSend(authtypes.NewModuleAddress(types.ModuleName), addrs[0], sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100000))))
|
||||
proposal, err := suite.GovKeeper.SubmitProposal(ctx, []sdk.Msg{msg}, "")
|
||||
proposal, err := suite.GovKeeper.SubmitProposal(ctx, []sdk.Msg{msg}, "", "Bank Msg Send", "send message", addrs[0])
|
||||
require.NoError(t, err)
|
||||
|
||||
proposalCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, suite.StakingKeeper.TokensFromConsensusPower(ctx, 10)))
|
||||
|
||||
@ -135,15 +135,17 @@ type proposalType struct {
|
||||
|
||||
// Prompt the proposal type values and return the proposal and its metadata
|
||||
func (p *proposalType) Prompt(cdc codec.Codec) (*proposal, types.ProposalMetadata, error) {
|
||||
proposal := &proposal{}
|
||||
|
||||
// set metadata
|
||||
metadata, err := Prompt(types.ProposalMetadata{}, "proposal")
|
||||
if err != nil {
|
||||
return nil, metadata, fmt.Errorf("failed to set proposal metadata: %w", err)
|
||||
}
|
||||
// the metadata must be saved on IPFS, set placeholder
|
||||
proposal.Metadata = "ipfs://CID"
|
||||
|
||||
proposal := &proposal{
|
||||
Metadata: "ipfs://CID", // the metadata must be saved on IPFS, set placeholder
|
||||
Title: metadata.Title,
|
||||
Summary: metadata.Summary,
|
||||
}
|
||||
|
||||
// set deposit
|
||||
depositPrompt := promptui.Prompt{
|
||||
|
||||
@ -106,6 +106,8 @@ Where proposal.json contains:
|
||||
],
|
||||
"metadata: "4pIMOgIGx1vZGU=", // base64-encoded metadata
|
||||
"deposit": "10stake"
|
||||
"title: "My proposal"
|
||||
"summary": "A short summary of my proposal"
|
||||
}
|
||||
`,
|
||||
version.AppName,
|
||||
@ -117,12 +119,12 @@ Where proposal.json contains:
|
||||
return err
|
||||
}
|
||||
|
||||
msgs, metadata, deposit, err := parseSubmitProposal(clientCtx.Codec, args[0])
|
||||
msgs, metadata, title, summary, deposit, err := parseSubmitProposal(clientCtx.Codec, args[0])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
msg, err := v1.NewMsgSubmitProposal(msgs, deposit, clientCtx.GetFromAddress().String(), metadata)
|
||||
msg, err := v1.NewMsgSubmitProposal(msgs, deposit, clientCtx.GetFromAddress().String(), metadata, title, summary)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid message: %w", err)
|
||||
}
|
||||
|
||||
@ -120,6 +120,8 @@ func (s *CLITestSuite) TestNewCmdSubmitProposal() {
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "My awesome title",
|
||||
"summary": "My awesome description",
|
||||
"metadata": "%s",
|
||||
"deposit": "%s"
|
||||
}`, authtypes.NewModuleAddress(types.ModuleName), base64.StdEncoding.EncodeToString(propMetadata), sdk.NewCoin("stake", sdk.NewInt(5431)))
|
||||
|
||||
@ -82,20 +82,22 @@ type proposal struct {
|
||||
Messages []json.RawMessage `json:"messages,omitempty"`
|
||||
Metadata string `json:"metadata"`
|
||||
Deposit string `json:"deposit"`
|
||||
Title string `json:"title"`
|
||||
Summary string `json:"summary"`
|
||||
}
|
||||
|
||||
// parseSubmitProposal reads and parses the proposal.
|
||||
func parseSubmitProposal(cdc codec.Codec, path string) ([]sdk.Msg, string, sdk.Coins, error) {
|
||||
func parseSubmitProposal(cdc codec.Codec, path string) ([]sdk.Msg, string, string, string, sdk.Coins, error) {
|
||||
var proposal proposal
|
||||
|
||||
contents, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
return nil, "", nil, err
|
||||
return nil, "", "", "", nil, err
|
||||
}
|
||||
|
||||
err = json.Unmarshal(contents, &proposal)
|
||||
if err != nil {
|
||||
return nil, "", nil, err
|
||||
return nil, "", "", "", nil, err
|
||||
}
|
||||
|
||||
msgs := make([]sdk.Msg, len(proposal.Messages))
|
||||
@ -103,7 +105,7 @@ func parseSubmitProposal(cdc codec.Codec, path string) ([]sdk.Msg, string, sdk.C
|
||||
var msg sdk.Msg
|
||||
err := cdc.UnmarshalInterfaceJSON(anyJSON, &msg)
|
||||
if err != nil {
|
||||
return nil, "", nil, err
|
||||
return nil, "", "", "", nil, err
|
||||
}
|
||||
|
||||
msgs[i] = msg
|
||||
@ -111,8 +113,8 @@ func parseSubmitProposal(cdc codec.Codec, path string) ([]sdk.Msg, string, sdk.C
|
||||
|
||||
deposit, err := sdk.ParseCoinsNormalized(proposal.Deposit)
|
||||
if err != nil {
|
||||
return nil, "", nil, err
|
||||
return nil, "", "", "", nil, err
|
||||
}
|
||||
|
||||
return msgs, proposal.Metadata, deposit, nil
|
||||
return msgs, proposal.Metadata, proposal.Title, proposal.Summary, deposit, nil
|
||||
}
|
||||
|
||||
@ -154,6 +154,8 @@ func TestParseSubmitProposal(t *testing.T) {
|
||||
}
|
||||
],
|
||||
"metadata": "%s",
|
||||
"title": "My awesome title",
|
||||
"summary": "My awesome summary",
|
||||
"deposit": "1000test"
|
||||
}
|
||||
`, addr, addr, addr, addr, addr, base64.StdEncoding.EncodeToString(expectedMetadata)))
|
||||
@ -161,15 +163,15 @@ func TestParseSubmitProposal(t *testing.T) {
|
||||
badJSON := testutil.WriteToNewTempFile(t, "bad json")
|
||||
|
||||
// nonexistent json
|
||||
_, _, _, err := parseSubmitProposal(cdc, "fileDoesNotExist")
|
||||
_, _, _, _, _, err := parseSubmitProposal(cdc, "fileDoesNotExist") //nolint: dogsled
|
||||
require.Error(t, err)
|
||||
|
||||
// invalid json
|
||||
_, _, _, err = parseSubmitProposal(cdc, badJSON.Name())
|
||||
_, _, _, _, _, err = parseSubmitProposal(cdc, badJSON.Name()) //nolint: dogsled
|
||||
require.Error(t, err)
|
||||
|
||||
// ok json
|
||||
msgs, metadata, deposit, err := parseSubmitProposal(cdc, okJSON.Name())
|
||||
msgs, metadata, title, summary, deposit, err := parseSubmitProposal(cdc, okJSON.Name())
|
||||
require.NoError(t, err, "unexpected error")
|
||||
require.Equal(t, sdk.NewCoins(sdk.NewCoin("test", sdk.NewInt(1000))), deposit)
|
||||
require.Equal(t, base64.StdEncoding.EncodeToString(expectedMetadata), metadata)
|
||||
@ -191,6 +193,8 @@ func TestParseSubmitProposal(t *testing.T) {
|
||||
require.True(t, ok)
|
||||
require.Equal(t, "My awesome title", textProp.Title)
|
||||
require.Equal(t, "My awesome description", textProp.Description)
|
||||
require.Equal(t, "My awesome title", title)
|
||||
require.Equal(t, "My awesome summary", summary)
|
||||
|
||||
err = okJSON.Close()
|
||||
require.Nil(t, err, "unexpected error")
|
||||
|
||||
@ -21,7 +21,7 @@ func TestDeposits(t *testing.T) {
|
||||
TestAddrs := simtestutil.AddTestAddrsIncremental(bankKeeper, stakingKeeper, ctx, 2, sdk.NewInt(10000000))
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := govKeeper.SubmitProposal(ctx, tp, "")
|
||||
proposal, err := govKeeper.SubmitProposal(ctx, tp, "", "title", "description", TestAddrs[0])
|
||||
require.NoError(t, err)
|
||||
proposalID := proposal.Id
|
||||
|
||||
@ -105,7 +105,7 @@ func TestDeposits(t *testing.T) {
|
||||
require.Equal(t, addr1Initial, bankKeeper.GetAllBalances(ctx, TestAddrs[1]))
|
||||
|
||||
// Test delete and burn deposits
|
||||
proposal, err = govKeeper.SubmitProposal(ctx, tp, "")
|
||||
proposal, err = govKeeper.SubmitProposal(ctx, tp, "", "title", "description", TestAddrs[0])
|
||||
require.NoError(t, err)
|
||||
proposalID = proposal.Id
|
||||
_, err = govKeeper.AddDeposit(ctx, proposalID, TestAddrs[0], fourStake)
|
||||
|
||||
@ -57,7 +57,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryProposal() {
|
||||
testProposal := v1beta1.NewTextProposal("Proposal", "testing proposal")
|
||||
msgContent, err := v1.NewLegacyContent(testProposal, govAcct.String())
|
||||
suite.Require().NoError(err)
|
||||
submittedProposal, err := suite.govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "")
|
||||
submittedProposal, err := suite.govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
suite.Require().NoError(err)
|
||||
suite.Require().NotEmpty(submittedProposal)
|
||||
|
||||
@ -127,7 +127,7 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryProposal() {
|
||||
testProposal := v1beta1.NewTextProposal("Proposal", "testing proposal")
|
||||
msgContent, err := v1.NewLegacyContent(testProposal, govAcct.String())
|
||||
suite.Require().NoError(err)
|
||||
submittedProposal, err := suite.govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "")
|
||||
submittedProposal, err := suite.govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
suite.Require().NoError(err)
|
||||
suite.Require().NotEmpty(submittedProposal)
|
||||
|
||||
@ -188,7 +188,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryProposals() {
|
||||
testProposal := []sdk.Msg{
|
||||
v1.NewMsgVote(govAddress, uint64(i), v1.OptionYes, ""),
|
||||
}
|
||||
proposal, err := suite.govKeeper.SubmitProposal(ctx, testProposal, "")
|
||||
proposal, err := suite.govKeeper.SubmitProposal(ctx, testProposal, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
suite.Require().NotEmpty(proposal)
|
||||
suite.Require().NoError(err)
|
||||
testProposals = append(testProposals, &proposal)
|
||||
@ -321,7 +321,7 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryProposals() {
|
||||
testProposal := v1beta1.NewTextProposal("Proposal", "testing proposal")
|
||||
msgContent, err := v1.NewLegacyContent(testProposal, govAcct.String())
|
||||
suite.Require().NoError(err)
|
||||
submittedProposal, err := suite.govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "")
|
||||
submittedProposal, err := suite.govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
suite.Require().NoError(err)
|
||||
suite.Require().NotEmpty(submittedProposal)
|
||||
},
|
||||
@ -402,7 +402,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryVote() {
|
||||
"no votes present",
|
||||
func() {
|
||||
var err error
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "")
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "", "test", "summary", addrs[0])
|
||||
suite.Require().NoError(err)
|
||||
|
||||
req = &v1.QueryVoteRequest{
|
||||
@ -516,7 +516,7 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryVote() {
|
||||
"no votes present",
|
||||
func() {
|
||||
var err error
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "")
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "", "test", "summary", addrs[0])
|
||||
suite.Require().NoError(err)
|
||||
|
||||
req = &v1beta1.QueryVoteRequest{
|
||||
@ -622,7 +622,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryVotes() {
|
||||
"create a proposal and get votes",
|
||||
func() {
|
||||
var err error
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "")
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "", "test", "summary", addrs[0])
|
||||
suite.Require().NoError(err)
|
||||
|
||||
req = &v1.QueryVotesRequest{
|
||||
@ -724,7 +724,7 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryVotes() {
|
||||
"create a proposal and get votes",
|
||||
func() {
|
||||
var err error
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "")
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "", "test", "summary", addrs[0])
|
||||
suite.Require().NoError(err)
|
||||
|
||||
req = &v1beta1.QueryVotesRequest{
|
||||
@ -1009,7 +1009,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryDeposit() {
|
||||
"no deposits proposal",
|
||||
func() {
|
||||
var err error
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "")
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "", "test", "summary", addrs[0])
|
||||
suite.Require().NoError(err)
|
||||
suite.Require().NotNil(proposal)
|
||||
|
||||
@ -1110,7 +1110,7 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryDeposit() {
|
||||
"no deposits proposal",
|
||||
func() {
|
||||
var err error
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "")
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "", "test", "summary", addrs[0])
|
||||
suite.Require().NoError(err)
|
||||
suite.Require().NotNil(proposal)
|
||||
|
||||
@ -1200,7 +1200,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryDeposits() {
|
||||
"create a proposal and get deposits",
|
||||
func() {
|
||||
var err error
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "")
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "", "test", "summary", addrs[0])
|
||||
suite.Require().NoError(err)
|
||||
|
||||
req = &v1.QueryDepositsRequest{
|
||||
@ -1295,7 +1295,7 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryDeposits() {
|
||||
"create a proposal and get deposits",
|
||||
func() {
|
||||
var err error
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "")
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "", "test", "summary", addrs[0])
|
||||
suite.Require().NoError(err)
|
||||
|
||||
req = &v1beta1.QueryDepositsRequest{
|
||||
|
||||
@ -63,7 +63,7 @@ func TestHooks(t *testing.T) {
|
||||
require.False(t, govHooksReceiver.AfterProposalVotingPeriodEndedValid)
|
||||
|
||||
tp := TestProposal
|
||||
_, err := govKeeper.SubmitProposal(ctx, tp, "")
|
||||
_, err := govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
require.NoError(t, err)
|
||||
require.True(t, govHooksReceiver.AfterProposalSubmissionValid)
|
||||
|
||||
@ -74,7 +74,7 @@ func TestHooks(t *testing.T) {
|
||||
|
||||
require.True(t, govHooksReceiver.AfterProposalFailedMinDepositValid)
|
||||
|
||||
p2, err := govKeeper.SubmitProposal(ctx, tp, "")
|
||||
p2, err := govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
require.NoError(t, err)
|
||||
|
||||
activated, err := govKeeper.AddDeposit(ctx, p2.Id, addrs[0], minDeposit)
|
||||
|
||||
@ -74,17 +74,17 @@ func TestIncrementProposalNumber(t *testing.T) {
|
||||
govKeeper, _, _, _, _, ctx := setupGovKeeper(t) //nolint:dogsled
|
||||
|
||||
tp := TestProposal
|
||||
_, err := govKeeper.SubmitProposal(ctx, tp, "")
|
||||
_, err := govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
require.NoError(t, err)
|
||||
_, err = govKeeper.SubmitProposal(ctx, tp, "")
|
||||
_, err = govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
require.NoError(t, err)
|
||||
_, err = govKeeper.SubmitProposal(ctx, tp, "")
|
||||
_, err = govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
require.NoError(t, err)
|
||||
_, err = govKeeper.SubmitProposal(ctx, tp, "")
|
||||
_, err = govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
require.NoError(t, err)
|
||||
_, err = govKeeper.SubmitProposal(ctx, tp, "")
|
||||
_, err = govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
require.NoError(t, err)
|
||||
proposal6, err := govKeeper.SubmitProposal(ctx, tp, "")
|
||||
proposal6, err := govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
require.NoError(t, err)
|
||||
|
||||
require.Equal(t, uint64(6), proposal6.Id)
|
||||
@ -95,7 +95,7 @@ func TestProposalQueues(t *testing.T) {
|
||||
|
||||
// create test proposals
|
||||
tp := TestProposal
|
||||
proposal, err := govKeeper.SubmitProposal(ctx, tp, "")
|
||||
proposal, err := govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
require.NoError(t, err)
|
||||
|
||||
inactiveIterator := govKeeper.InactiveProposalQueueIterator(ctx, *proposal.DepositEndTime)
|
||||
|
||||
@ -41,7 +41,13 @@ func (k msgServer) SubmitProposal(goCtx context.Context, msg *v1.MsgSubmitPropos
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
proposal, err := k.Keeper.SubmitProposal(ctx, proposalMsgs, msg.Metadata)
|
||||
|
||||
proposer, err := sdk.AccAddressFromBech32(msg.GetProposer())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
proposal, err := k.Keeper.SubmitProposal(ctx, proposalMsgs, msg.Metadata, msg.Title, msg.Summary, proposer)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -59,7 +65,6 @@ func (k msgServer) SubmitProposal(goCtx context.Context, msg *v1.MsgSubmitPropos
|
||||
|
||||
defer telemetry.IncrCounter(1, govtypes.ModuleName, "proposal")
|
||||
|
||||
proposer, _ := sdk.AccAddressFromBech32(msg.GetProposer())
|
||||
votingStarted, err := k.Keeper.AddDeposit(ctx, proposal.Id, proposer, msg.GetInitialDeposit())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -221,6 +226,8 @@ func (k legacyMsgServer) SubmitProposal(goCtx context.Context, msg *v1beta1.MsgS
|
||||
msg.InitialDeposit,
|
||||
msg.Proposer,
|
||||
"",
|
||||
msg.GetContent().GetTitle(),
|
||||
msg.GetContent().GetDescription(),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@ -39,6 +39,8 @@ func (suite *KeeperTestSuite) TestSubmitProposalReq() {
|
||||
initialDeposit,
|
||||
proposer.String(),
|
||||
strings.Repeat("1", 300),
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
)
|
||||
},
|
||||
expErr: true,
|
||||
@ -51,6 +53,8 @@ func (suite *KeeperTestSuite) TestSubmitProposalReq() {
|
||||
initialDeposit,
|
||||
proposer.String(),
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
)
|
||||
},
|
||||
expErr: true,
|
||||
@ -63,6 +67,8 @@ func (suite *KeeperTestSuite) TestSubmitProposalReq() {
|
||||
initialDeposit,
|
||||
proposer.String(),
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
)
|
||||
},
|
||||
expErr: true,
|
||||
@ -75,6 +81,8 @@ func (suite *KeeperTestSuite) TestSubmitProposalReq() {
|
||||
initialDeposit,
|
||||
proposer.String(),
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
)
|
||||
},
|
||||
expErr: true,
|
||||
@ -87,6 +95,8 @@ func (suite *KeeperTestSuite) TestSubmitProposalReq() {
|
||||
initialDeposit,
|
||||
proposer.String(),
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
)
|
||||
},
|
||||
expErr: false,
|
||||
@ -98,6 +108,8 @@ func (suite *KeeperTestSuite) TestSubmitProposalReq() {
|
||||
minDeposit,
|
||||
proposer.String(),
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
)
|
||||
},
|
||||
expErr: false,
|
||||
@ -139,6 +151,8 @@ func (suite *KeeperTestSuite) TestVoteReq() {
|
||||
minDeposit,
|
||||
proposer.String(),
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -162,6 +176,8 @@ func (suite *KeeperTestSuite) TestVoteReq() {
|
||||
coins,
|
||||
proposer.String(),
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -203,6 +219,8 @@ func (suite *KeeperTestSuite) TestVoteReq() {
|
||||
minDeposit,
|
||||
proposer.String(),
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -252,6 +270,8 @@ func (suite *KeeperTestSuite) TestVoteWeightedReq() {
|
||||
minDeposit,
|
||||
proposer.String(),
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -276,6 +296,8 @@ func (suite *KeeperTestSuite) TestVoteWeightedReq() {
|
||||
coins,
|
||||
proposer.String(),
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -317,6 +339,8 @@ func (suite *KeeperTestSuite) TestVoteWeightedReq() {
|
||||
minDeposit,
|
||||
proposer.String(),
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -365,6 +389,8 @@ func (suite *KeeperTestSuite) TestDepositReq() {
|
||||
coins,
|
||||
proposer.String(),
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -483,6 +509,8 @@ func (suite *KeeperTestSuite) TestLegacyMsgVote() {
|
||||
minDeposit,
|
||||
proposer.String(),
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -506,6 +534,8 @@ func (suite *KeeperTestSuite) TestLegacyMsgVote() {
|
||||
coins,
|
||||
proposer.String(),
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -537,6 +567,8 @@ func (suite *KeeperTestSuite) TestLegacyMsgVote() {
|
||||
minDeposit,
|
||||
proposer.String(),
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -586,6 +618,8 @@ func (suite *KeeperTestSuite) TestLegacyVoteWeighted() {
|
||||
minDeposit,
|
||||
proposer.String(),
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -610,6 +644,8 @@ func (suite *KeeperTestSuite) TestLegacyVoteWeighted() {
|
||||
coins,
|
||||
proposer.String(),
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -641,6 +677,8 @@ func (suite *KeeperTestSuite) TestLegacyVoteWeighted() {
|
||||
minDeposit,
|
||||
proposer.String(),
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -689,6 +727,8 @@ func (suite *KeeperTestSuite) TestLegacyMsgDeposit() {
|
||||
coins,
|
||||
proposer.String(),
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -1067,7 +1107,7 @@ func (suite *KeeperTestSuite) TestSubmitProposal_InitialDeposit() {
|
||||
params.MinInitialDepositRatio = tc.minInitialDepositRatio.String()
|
||||
govKeeper.SetParams(ctx, params)
|
||||
|
||||
msg, err := v1.NewMsgSubmitProposal(TestProposal, tc.initialDeposit, address.String(), "test")
|
||||
msg, err := v1.NewMsgSubmitProposal(TestProposal, tc.initialDeposit, address.String(), "test", "Proposal", "description of proposal")
|
||||
suite.Require().NoError(err)
|
||||
|
||||
// System under test
|
||||
|
||||
@ -12,12 +12,18 @@ import (
|
||||
)
|
||||
|
||||
// SubmitProposal creates a new proposal given an array of messages
|
||||
func (keeper Keeper) SubmitProposal(ctx sdk.Context, messages []sdk.Msg, metadata string) (v1.Proposal, error) {
|
||||
func (keeper Keeper) SubmitProposal(ctx sdk.Context, messages []sdk.Msg, metadata, title, summary string, proposer sdk.AccAddress) (v1.Proposal, error) {
|
||||
err := keeper.assertMetadataLength(metadata)
|
||||
if err != nil {
|
||||
return v1.Proposal{}, err
|
||||
}
|
||||
|
||||
// assert summary is no longer than predefined max length of metadata
|
||||
err = keeper.assertMetadataLength(summary)
|
||||
if err != nil {
|
||||
return v1.Proposal{}, err
|
||||
}
|
||||
|
||||
// Will hold a comma-separated string of all Msg type URLs.
|
||||
msgsStr := ""
|
||||
|
||||
@ -72,7 +78,7 @@ func (keeper Keeper) SubmitProposal(ctx sdk.Context, messages []sdk.Msg, metadat
|
||||
submitTime := ctx.BlockHeader().Time
|
||||
depositPeriod := keeper.GetParams(ctx).MaxDepositPeriod
|
||||
|
||||
proposal, err := v1.NewProposal(messages, proposalID, metadata, submitTime, submitTime.Add(*depositPeriod))
|
||||
proposal, err := v1.NewProposal(messages, proposalID, metadata, submitTime, submitTime.Add(*depositPeriod), title, summary, proposer)
|
||||
if err != nil {
|
||||
return v1.Proposal{}, err
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@ import (
|
||||
|
||||
func (suite *KeeperTestSuite) TestGetSetProposal() {
|
||||
tp := TestProposal
|
||||
proposal, err := suite.govKeeper.SubmitProposal(suite.ctx, tp, "")
|
||||
proposal, err := suite.govKeeper.SubmitProposal(suite.ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
suite.Require().NoError(err)
|
||||
proposalID := proposal.Id
|
||||
suite.govKeeper.SetProposal(suite.ctx, proposal)
|
||||
@ -36,7 +36,7 @@ func (suite *KeeperTestSuite) TestDeleteProposal() {
|
||||
},
|
||||
)
|
||||
tp := TestProposal
|
||||
proposal, err := suite.govKeeper.SubmitProposal(suite.ctx, tp, "")
|
||||
proposal, err := suite.govKeeper.SubmitProposal(suite.ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
suite.Require().NoError(err)
|
||||
proposalID := proposal.Id
|
||||
suite.govKeeper.SetProposal(suite.ctx, proposal)
|
||||
@ -47,7 +47,7 @@ func (suite *KeeperTestSuite) TestDeleteProposal() {
|
||||
|
||||
func (suite *KeeperTestSuite) TestActivateVotingPeriod() {
|
||||
tp := TestProposal
|
||||
proposal, err := suite.govKeeper.SubmitProposal(suite.ctx, tp, "")
|
||||
proposal, err := suite.govKeeper.SubmitProposal(suite.ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
suite.Require().NoError(err)
|
||||
|
||||
suite.Require().Nil(proposal.VotingStartTime)
|
||||
@ -98,7 +98,7 @@ func (suite *KeeperTestSuite) TestSubmitProposal() {
|
||||
for i, tc := range testCases {
|
||||
prop, err := v1.NewLegacyContent(tc.content, tc.authority)
|
||||
suite.Require().NoError(err)
|
||||
_, err = suite.govKeeper.SubmitProposal(suite.ctx, []sdk.Msg{prop}, tc.metadata)
|
||||
_, err = suite.govKeeper.SubmitProposal(suite.ctx, []sdk.Msg{prop}, tc.metadata, "title", "", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
suite.Require().True(errors.Is(tc.expectedErr, err), "tc #%d; got: %v, expected: %v", i, err, tc.expectedErr)
|
||||
}
|
||||
}
|
||||
@ -111,7 +111,7 @@ func (suite *KeeperTestSuite) TestGetProposalsFiltered() {
|
||||
|
||||
for _, s := range status {
|
||||
for i := 0; i < 50; i++ {
|
||||
p, err := v1.NewProposal(TestProposal, proposalID, "", time.Now(), time.Now())
|
||||
p, err := v1.NewProposal(TestProposal, proposalID, "", time.Now(), time.Now(), "title", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
suite.Require().NoError(err)
|
||||
|
||||
p.Status = s
|
||||
|
||||
@ -15,7 +15,7 @@ func TestVotes(t *testing.T) {
|
||||
addrs := simtestutil.AddTestAddrsIncremental(bankKeeper, stakingKeeper, ctx, 2, sdk.NewInt(10000000))
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := govKeeper.SubmitProposal(ctx, tp, "")
|
||||
proposal, err := govKeeper.SubmitProposal(ctx, tp, "", "title", "description", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
require.NoError(t, err)
|
||||
proposalID := proposal.Id
|
||||
metadata := "metadata"
|
||||
|
||||
@ -222,6 +222,8 @@ func convertToNewProposal(oldProp v1beta1.Proposal) (v1.Proposal, error) {
|
||||
TotalDeposit: oldProp.TotalDeposit,
|
||||
VotingStartTime: &oldProp.VotingStartTime,
|
||||
VotingEndTime: &oldProp.VotingEndTime,
|
||||
Title: oldProp.GetContent().GetTitle(),
|
||||
Summary: oldProp.GetContent().GetDescription(),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
@ -106,8 +106,11 @@ func TestMigrateJSON(t *testing.T) {
|
||||
}
|
||||
],
|
||||
"metadata": "",
|
||||
"proposer": "",
|
||||
"status": "PROPOSAL_STATUS_DEPOSIT_PERIOD",
|
||||
"submit_time": "2001-09-09T01:46:40Z",
|
||||
"summary": "my desc",
|
||||
"title": "my title",
|
||||
"total_deposit": [
|
||||
{
|
||||
"amount": "123",
|
||||
|
||||
@ -75,13 +75,13 @@ func TestMigrateStore(t *testing.T) {
|
||||
// Create 2 proposals
|
||||
prop1Content, err := v1.NewLegacyContent(v1beta1.NewTextProposal("Test", "description"), authtypes.NewModuleAddress("gov").String())
|
||||
require.NoError(t, err)
|
||||
proposal1, err := v1.NewProposal([]sdk.Msg{prop1Content}, 1, "some metadata for the legacy content", propTime, propTime)
|
||||
proposal1, err := v1.NewProposal([]sdk.Msg{prop1Content}, 1, "some metadata for the legacy content", propTime, propTime, "Test", "description", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
require.NoError(t, err)
|
||||
prop1Bz, err := cdc.Marshal(&proposal1)
|
||||
require.NoError(t, err)
|
||||
store.Set(v1gov.ProposalKey(proposal1.Id), prop1Bz)
|
||||
|
||||
proposal2, err := v1.NewProposal(getTestProposal(), 2, "some metadata for the legacy content", propTime, propTime)
|
||||
proposal2, err := v1.NewProposal(getTestProposal(), 2, "some metadata for the legacy content", propTime, propTime, "Test", "description", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
proposal2.Status = v1.StatusVotingPeriod
|
||||
require.NoError(t, err)
|
||||
prop2Bz, err := cdc.Marshal(&proposal2)
|
||||
|
||||
@ -153,7 +153,7 @@ func SimulateMsgSubmitProposal(ak types.AccountKeeper, bk types.BankKeeper, k *k
|
||||
return simtypes.NoOpMsg(types.ModuleName, TypeMsgSubmitProposal, "error converting legacy content into proposal message"), nil, err
|
||||
}
|
||||
|
||||
msg, err := v1.NewMsgSubmitProposal([]sdk.Msg{contentMsg}, deposit, simAccount.Address.String(), "")
|
||||
msg, err := v1.NewMsgSubmitProposal([]sdk.Msg{contentMsg}, deposit, simAccount.Address.String(), "", "Title of proposal", "Short description of proposal")
|
||||
if err != nil {
|
||||
return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to generate a submit proposal msg"), nil, err
|
||||
}
|
||||
|
||||
@ -164,7 +164,7 @@ func TestSimulateMsgDeposit(t *testing.T) {
|
||||
submitTime := ctx.BlockHeader().Time
|
||||
depositPeriod := suite.GovKeeper.GetParams(ctx).MaxDepositPeriod
|
||||
|
||||
proposal, err := v1.NewProposal([]sdk.Msg{contentMsg}, 1, "", submitTime, submitTime.Add(*depositPeriod))
|
||||
proposal, err := v1.NewProposal([]sdk.Msg{contentMsg}, 1, "", submitTime, submitTime.Add(*depositPeriod), "text proposal", "description", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
require.NoError(t, err)
|
||||
|
||||
suite.GovKeeper.SetProposal(ctx, proposal)
|
||||
@ -211,7 +211,7 @@ func TestSimulateMsgVote(t *testing.T) {
|
||||
submitTime := ctx.BlockHeader().Time
|
||||
depositPeriod := suite.GovKeeper.GetParams(ctx).MaxDepositPeriod
|
||||
|
||||
proposal, err := v1.NewProposal([]sdk.Msg{contentMsg}, 1, "", submitTime, submitTime.Add(*depositPeriod))
|
||||
proposal, err := v1.NewProposal([]sdk.Msg{contentMsg}, 1, "", submitTime, submitTime.Add(*depositPeriod), "text proposal", "description", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
require.NoError(t, err)
|
||||
|
||||
suite.GovKeeper.ActivateVotingPeriod(ctx, proposal)
|
||||
@ -255,7 +255,7 @@ func TestSimulateMsgVoteWeighted(t *testing.T) {
|
||||
submitTime := ctx.BlockHeader().Time
|
||||
depositPeriod := suite.GovKeeper.GetParams(ctx).MaxDepositPeriod
|
||||
|
||||
proposal, err := v1.NewProposal([]sdk.Msg{contentMsg}, 1, "", submitTime, submitTime.Add(*depositPeriod))
|
||||
proposal, err := v1.NewProposal([]sdk.Msg{contentMsg}, 1, "", submitTime, submitTime.Add(*depositPeriod), "text proposal", "test", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
require.NoError(t, err)
|
||||
|
||||
suite.GovKeeper.ActivateVotingPeriod(ctx, proposal)
|
||||
|
||||
@ -265,6 +265,11 @@ type Proposal struct {
|
||||
VotingEndTime *time.Time `protobuf:"bytes,9,opt,name=voting_end_time,json=votingEndTime,proto3,stdtime" json:"voting_end_time,omitempty"`
|
||||
// metadata is any arbitrary metadata attached to the proposal.
|
||||
Metadata string `protobuf:"bytes,10,opt,name=metadata,proto3" json:"metadata,omitempty"`
|
||||
// title is the title of the proposal
|
||||
Title string `protobuf:"bytes,11,opt,name=title,proto3" json:"title,omitempty"`
|
||||
// summary is a short summary of the proposal
|
||||
Summary string `protobuf:"bytes,12,opt,name=summary,proto3" json:"summary,omitempty"`
|
||||
Proposer string `protobuf:"bytes,13,opt,name=proposer,proto3" json:"proposer,omitempty"`
|
||||
}
|
||||
|
||||
func (m *Proposal) Reset() { *m = Proposal{} }
|
||||
@ -370,6 +375,27 @@ func (m *Proposal) GetMetadata() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Proposal) GetTitle() string {
|
||||
if m != nil {
|
||||
return m.Title
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Proposal) GetSummary() string {
|
||||
if m != nil {
|
||||
return m.Summary
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Proposal) GetProposer() string {
|
||||
if m != nil {
|
||||
return m.Proposer
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// TallyResult defines a standard tally for a governance proposal.
|
||||
type TallyResult struct {
|
||||
// yes_count is the number of yes votes on a proposal.
|
||||
@ -807,81 +833,83 @@ func init() {
|
||||
func init() { proto.RegisterFile("cosmos/gov/v1/gov.proto", fileDescriptor_e05cb1c0d030febb) }
|
||||
|
||||
var fileDescriptor_e05cb1c0d030febb = []byte{
|
||||
// 1173 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x8f, 0xd3, 0xc6,
|
||||
0x17, 0x5f, 0x27, 0xde, 0x6c, 0xf2, 0xb2, 0x09, 0x66, 0xe0, 0x0b, 0xde, 0x05, 0x92, 0x25, 0xfa,
|
||||
0x0a, 0x6d, 0xf9, 0x91, 0x74, 0x41, 0xf4, 0x42, 0x2f, 0xc9, 0xc6, 0x14, 0x23, 0xba, 0x89, 0x6c,
|
||||
0x13, 0x44, 0x2f, 0x96, 0xb3, 0x36, 0xc9, 0xa8, 0xb1, 0x27, 0xf5, 0x4c, 0x02, 0xf9, 0x13, 0x7a,
|
||||
0xe3, 0x58, 0xf5, 0xd4, 0x63, 0x8f, 0x3d, 0xa0, 0x9e, 0xfa, 0x07, 0x70, 0xaa, 0x10, 0x97, 0xb6,
|
||||
0xaa, 0x44, 0x2b, 0x38, 0x54, 0xe2, 0xaf, 0xa8, 0x3c, 0x1e, 0x6f, 0xb2, 0xde, 0x54, 0xbb, 0x70,
|
||||
0x49, 0xec, 0xf7, 0x3e, 0x9f, 0xf7, 0xde, 0xbc, 0xf7, 0x99, 0xf1, 0xc0, 0xf9, 0x7d, 0x42, 0x7d,
|
||||
0x42, 0x1b, 0x03, 0x32, 0x6d, 0x4c, 0x77, 0xa2, 0xbf, 0xfa, 0x38, 0x24, 0x8c, 0xa0, 0x52, 0xec,
|
||||
0xa8, 0x47, 0x96, 0xe9, 0xce, 0x66, 0x45, 0xe0, 0xfa, 0x0e, 0xf5, 0x1a, 0xd3, 0x9d, 0xbe, 0xc7,
|
||||
0x9c, 0x9d, 0xc6, 0x3e, 0xc1, 0x41, 0x0c, 0xdf, 0x3c, 0x3b, 0x20, 0x03, 0xc2, 0x1f, 0x1b, 0xd1,
|
||||
0x93, 0xb0, 0x56, 0x07, 0x84, 0x0c, 0x46, 0x5e, 0x83, 0xbf, 0xf5, 0x27, 0x4f, 0x1a, 0x0c, 0xfb,
|
||||
0x1e, 0x65, 0x8e, 0x3f, 0x16, 0x80, 0x8d, 0x34, 0xc0, 0x09, 0x66, 0xc2, 0x55, 0x49, 0xbb, 0xdc,
|
||||
0x49, 0xe8, 0x30, 0x4c, 0x92, 0x8c, 0x1b, 0x71, 0x45, 0x76, 0x9c, 0x54, 0x54, 0x1b, 0xbb, 0x4e,
|
||||
0x3b, 0x3e, 0x0e, 0x48, 0x83, 0xff, 0xc6, 0xa6, 0x1a, 0x01, 0xf4, 0xc8, 0xc3, 0x83, 0x21, 0xf3,
|
||||
0xdc, 0x1e, 0x61, 0x5e, 0x67, 0x1c, 0x45, 0x42, 0x3b, 0x90, 0x23, 0xfc, 0x49, 0x95, 0xb6, 0xa4,
|
||||
0xed, 0xf2, 0xcd, 0x8d, 0xfa, 0xa1, 0x55, 0xd7, 0xe7, 0x50, 0x43, 0x00, 0xd1, 0x15, 0xc8, 0x3d,
|
||||
0xe5, 0x81, 0xd4, 0xcc, 0x96, 0xb4, 0x5d, 0x68, 0x95, 0x5f, 0xbf, 0xb8, 0x01, 0x82, 0xd5, 0xf6,
|
||||
0xf6, 0x0d, 0xe1, 0xad, 0xfd, 0x20, 0xc1, 0x5a, 0xdb, 0x1b, 0x13, 0x8a, 0x19, 0xaa, 0x42, 0x71,
|
||||
0x1c, 0x92, 0x31, 0xa1, 0xce, 0xc8, 0xc6, 0x2e, 0xcf, 0x25, 0x1b, 0x90, 0x98, 0x74, 0x17, 0x7d,
|
||||
0x06, 0x05, 0x37, 0xc6, 0x92, 0x50, 0xc4, 0x55, 0x5f, 0xbf, 0xb8, 0x71, 0x56, 0xc4, 0x6d, 0xba,
|
||||
0x6e, 0xe8, 0x51, 0x6a, 0xb2, 0x10, 0x07, 0x03, 0x63, 0x0e, 0x45, 0x9f, 0x43, 0xce, 0xf1, 0xc9,
|
||||
0x24, 0x60, 0x6a, 0x76, 0x2b, 0xbb, 0x5d, 0x9c, 0xd7, 0x1f, 0x8d, 0xa9, 0x2e, 0xc6, 0x54, 0xdf,
|
||||
0x25, 0x38, 0x68, 0x15, 0x5e, 0xbe, 0xa9, 0xae, 0xfc, 0xf8, 0xcf, 0x4f, 0x57, 0x25, 0x43, 0x70,
|
||||
0x6a, 0x7f, 0xca, 0x90, 0xef, 0x8a, 0x22, 0x50, 0x19, 0x32, 0x07, 0xa5, 0x65, 0xb0, 0x8b, 0x3e,
|
||||
0x85, 0xbc, 0xef, 0x51, 0xea, 0x0c, 0x3c, 0xaa, 0x66, 0x78, 0xf0, 0xb3, 0xf5, 0x78, 0x22, 0xf5,
|
||||
0x64, 0x22, 0xf5, 0x66, 0x30, 0x33, 0x0e, 0x50, 0xe8, 0x36, 0xe4, 0x28, 0x73, 0xd8, 0x84, 0xaa,
|
||||
0x59, 0xde, 0xcc, 0x4b, 0xa9, 0x66, 0x26, 0xa9, 0x4c, 0x0e, 0x32, 0x04, 0x18, 0xdd, 0x03, 0xf4,
|
||||
0x04, 0x07, 0xce, 0xc8, 0x66, 0xce, 0x68, 0x34, 0xb3, 0x43, 0x8f, 0x4e, 0x46, 0x4c, 0x95, 0xb7,
|
||||
0xa4, 0xed, 0xe2, 0xcd, 0xcd, 0x54, 0x08, 0x2b, 0x82, 0x18, 0x1c, 0x61, 0x28, 0x9c, 0xb5, 0x60,
|
||||
0x41, 0x4d, 0x28, 0xd2, 0x49, 0xdf, 0xc7, 0xcc, 0x8e, 0x64, 0xa6, 0xae, 0x8a, 0x10, 0xe9, 0xaa,
|
||||
0xad, 0x44, 0x83, 0x2d, 0xf9, 0xf9, 0x5f, 0x55, 0xc9, 0x80, 0x98, 0x14, 0x99, 0xd1, 0x7d, 0x50,
|
||||
0x44, 0x77, 0x6d, 0x2f, 0x70, 0xe3, 0x38, 0xb9, 0x13, 0xc6, 0x29, 0x0b, 0xa6, 0x16, 0xb8, 0x3c,
|
||||
0x96, 0x0e, 0x25, 0x46, 0x98, 0x33, 0xb2, 0x85, 0x5d, 0x5d, 0xfb, 0x80, 0x19, 0xad, 0x73, 0x6a,
|
||||
0x22, 0xa0, 0x07, 0x70, 0x7a, 0x4a, 0x18, 0x0e, 0x06, 0x36, 0x65, 0x4e, 0x28, 0xd6, 0x97, 0x3f,
|
||||
0x61, 0x5d, 0xa7, 0x62, 0xaa, 0x19, 0x31, 0x79, 0x61, 0xf7, 0x40, 0x98, 0xe6, 0x6b, 0x2c, 0x9c,
|
||||
0x30, 0x56, 0x29, 0x26, 0x26, 0x4b, 0xdc, 0x8c, 0x44, 0xc2, 0x1c, 0xd7, 0x61, 0x8e, 0x0a, 0x91,
|
||||
0x6c, 0x8d, 0x83, 0xf7, 0xda, 0x6f, 0x12, 0x14, 0x17, 0xa7, 0x73, 0x0d, 0x0a, 0x33, 0x8f, 0xda,
|
||||
0xfb, 0x5c, 0xae, 0xd2, 0x91, 0xbd, 0xa3, 0x07, 0xcc, 0xc8, 0xcf, 0x3c, 0xba, 0x1b, 0xf9, 0xd1,
|
||||
0x2d, 0x28, 0x39, 0x7d, 0xca, 0x1c, 0x1c, 0x08, 0x42, 0x66, 0x29, 0x61, 0x5d, 0x80, 0x62, 0xd2,
|
||||
0x27, 0x90, 0x0f, 0x88, 0xc0, 0x67, 0x97, 0xe2, 0xd7, 0x02, 0x12, 0x43, 0xef, 0x00, 0x0a, 0x88,
|
||||
0xfd, 0x14, 0xb3, 0xa1, 0x3d, 0xf5, 0x58, 0x42, 0x92, 0x97, 0x92, 0x4e, 0x05, 0xe4, 0x11, 0x66,
|
||||
0xc3, 0x9e, 0xc7, 0x62, 0x72, 0xed, 0x67, 0x09, 0xe4, 0xe8, 0x64, 0x38, 0x7e, 0x5f, 0xd7, 0x61,
|
||||
0x75, 0x4a, 0x98, 0x77, 0xfc, 0x9e, 0x8e, 0x61, 0xe8, 0x0e, 0xac, 0xc5, 0xc7, 0x0c, 0x55, 0x65,
|
||||
0x2e, 0x96, 0xcb, 0xa9, 0x0d, 0x70, 0xf4, 0x0c, 0x33, 0x12, 0xc6, 0xa1, 0x61, 0xac, 0x1e, 0x1e,
|
||||
0xc6, 0x7d, 0x39, 0x9f, 0x55, 0xe4, 0xda, 0x1f, 0x12, 0x94, 0x84, 0xa4, 0xba, 0x4e, 0xe8, 0xf8,
|
||||
0x14, 0x3d, 0x86, 0xa2, 0x8f, 0x83, 0x03, 0x85, 0x4a, 0xc7, 0x29, 0xf4, 0x52, 0xa4, 0xd0, 0xf7,
|
||||
0x6f, 0xaa, 0xff, 0x5b, 0x60, 0x5d, 0x27, 0x3e, 0x66, 0x9e, 0x3f, 0x66, 0x33, 0x03, 0x7c, 0x1c,
|
||||
0x24, 0x9a, 0xf5, 0x01, 0xf9, 0xce, 0xb3, 0x04, 0x64, 0x8f, 0xbd, 0x10, 0x13, 0x97, 0x37, 0x22,
|
||||
0xca, 0x90, 0x16, 0x5a, 0x5b, 0x1c, 0xee, 0xad, 0xff, 0xbf, 0x7f, 0x53, 0xbd, 0x78, 0x94, 0x38,
|
||||
0x4f, 0xf2, 0x5d, 0xa4, 0x43, 0xc5, 0x77, 0x9e, 0x25, 0x2b, 0xe1, 0xfe, 0x9a, 0x05, 0xeb, 0x3d,
|
||||
0xae, 0x4d, 0xb1, 0xb2, 0x36, 0x08, 0xad, 0x26, 0x99, 0xa5, 0xe3, 0x32, 0xcb, 0x3c, 0xf2, 0x7a,
|
||||
0xcc, 0x12, 0x51, 0xbf, 0x4f, 0x44, 0x2c, 0xa2, 0x5e, 0x81, 0xdc, 0x37, 0x13, 0x12, 0x4e, 0xfc,
|
||||
0x25, 0x0a, 0xe6, 0xa7, 0x7f, 0xec, 0x45, 0xd7, 0xa1, 0xc0, 0x86, 0xa1, 0x47, 0x87, 0x64, 0xe4,
|
||||
0xfe, 0xc7, 0x87, 0x62, 0x0e, 0x40, 0xb7, 0xa1, 0xcc, 0x55, 0x38, 0xa7, 0x64, 0x97, 0x52, 0x4a,
|
||||
0x11, 0xca, 0x4a, 0x40, 0xb5, 0x5f, 0xb2, 0x90, 0x13, 0x75, 0x69, 0x1f, 0x38, 0xc7, 0x85, 0x93,
|
||||
0x66, 0x71, 0x66, 0x5f, 0x7e, 0xdc, 0xcc, 0xe4, 0xe5, 0x33, 0x39, 0x3a, 0x83, 0xec, 0x47, 0xcc,
|
||||
0x60, 0xa1, 0xe7, 0xf2, 0xc9, 0x7b, 0xbe, 0xfa, 0xe1, 0x3d, 0xcf, 0x9d, 0xa0, 0xe7, 0x48, 0x87,
|
||||
0x8d, 0xa8, 0xd1, 0x38, 0xc0, 0x0c, 0xcf, 0x8f, 0x76, 0x9b, 0x97, 0xaf, 0xae, 0x2d, 0x8d, 0x70,
|
||||
0xce, 0xc7, 0x81, 0x1e, 0xe3, 0x45, 0x7b, 0x8c, 0x08, 0x7d, 0xf5, 0x5b, 0x09, 0x60, 0xe1, 0x2e,
|
||||
0x72, 0x01, 0xce, 0xf7, 0x3a, 0x96, 0x66, 0x77, 0xba, 0x96, 0xde, 0xd9, 0xb3, 0x1f, 0xee, 0x99,
|
||||
0x5d, 0x6d, 0x57, 0xbf, 0xab, 0x6b, 0x6d, 0x65, 0x05, 0x9d, 0x81, 0x53, 0x8b, 0xce, 0xc7, 0x9a,
|
||||
0xa9, 0x48, 0xe8, 0x3c, 0x9c, 0x59, 0x34, 0x36, 0x5b, 0xa6, 0xd5, 0xd4, 0xf7, 0x94, 0x0c, 0x42,
|
||||
0x50, 0x5e, 0x74, 0xec, 0x75, 0x94, 0x2c, 0xba, 0x08, 0xea, 0x61, 0x9b, 0xfd, 0x48, 0xb7, 0xee,
|
||||
0xd9, 0x3d, 0xcd, 0xea, 0x28, 0xf2, 0xd5, 0x5f, 0x25, 0x28, 0x1f, 0xfe, 0x3e, 0xa3, 0x2a, 0x5c,
|
||||
0xe8, 0x1a, 0x9d, 0x6e, 0xc7, 0x6c, 0x3e, 0xb0, 0x4d, 0xab, 0x69, 0x3d, 0x34, 0x53, 0x35, 0xd5,
|
||||
0xa0, 0x92, 0x06, 0xb4, 0xb5, 0x6e, 0xc7, 0xd4, 0x2d, 0xbb, 0xab, 0x19, 0x7a, 0xa7, 0xad, 0x48,
|
||||
0xe8, 0x32, 0x5c, 0x4a, 0x63, 0x7a, 0x1d, 0x4b, 0xdf, 0xfb, 0x22, 0x81, 0x64, 0xd0, 0x26, 0x9c,
|
||||
0x4b, 0x43, 0xba, 0x4d, 0xd3, 0xd4, 0xda, 0x71, 0xd1, 0x69, 0x9f, 0xa1, 0xdd, 0xd7, 0x76, 0x2d,
|
||||
0xad, 0xad, 0xc8, 0xcb, 0x98, 0x77, 0x9b, 0xfa, 0x03, 0xad, 0xad, 0xac, 0xb6, 0xb4, 0x97, 0x6f,
|
||||
0x2b, 0xd2, 0xab, 0xb7, 0x15, 0xe9, 0xef, 0xb7, 0x15, 0xe9, 0xf9, 0xbb, 0xca, 0xca, 0xab, 0x77,
|
||||
0x95, 0x95, 0xdf, 0xdf, 0x55, 0x56, 0xbe, 0xba, 0x36, 0xc0, 0x6c, 0x38, 0xe9, 0xd7, 0xf7, 0x89,
|
||||
0x2f, 0x6e, 0x8d, 0xe2, 0xef, 0x06, 0x75, 0xbf, 0x6e, 0x3c, 0xe3, 0x37, 0x61, 0x36, 0x1b, 0x7b,
|
||||
0x34, 0xba, 0xe6, 0xe6, 0xb8, 0x44, 0x6f, 0xfd, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x2e, 0xe3, 0xbc,
|
||||
0x91, 0x27, 0x0b, 0x00, 0x00,
|
||||
// 1212 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x3f, 0x73, 0x13, 0x47,
|
||||
0x14, 0xf7, 0x49, 0x27, 0x59, 0x7e, 0xb2, 0x84, 0x58, 0x1c, 0x38, 0x1b, 0x90, 0x8c, 0x26, 0xc3,
|
||||
0x38, 0xfc, 0x91, 0x62, 0x08, 0x69, 0x48, 0x23, 0x5b, 0x47, 0x38, 0x86, 0x58, 0x9a, 0xd3, 0x61,
|
||||
0x86, 0x34, 0x37, 0x6b, 0xdf, 0x22, 0xed, 0x44, 0x77, 0xab, 0xdc, 0xae, 0x04, 0xfa, 0x08, 0xe9,
|
||||
0x28, 0x33, 0xa9, 0x52, 0xa6, 0x4c, 0xc1, 0xa4, 0x4a, 0x93, 0x8e, 0x2a, 0xc3, 0xd0, 0x24, 0x69,
|
||||
0x48, 0x06, 0x8a, 0xcc, 0xf0, 0x29, 0x32, 0xb7, 0xb7, 0x67, 0xc9, 0xb2, 0x32, 0x36, 0x34, 0xd2,
|
||||
0xed, 0x7b, 0xbf, 0xdf, 0x7b, 0x6f, 0xdf, 0x9f, 0xdd, 0x85, 0x73, 0xfb, 0x8c, 0xfb, 0x8c, 0xd7,
|
||||
0xbb, 0x6c, 0x54, 0x1f, 0x6d, 0x46, 0x7f, 0xb5, 0x41, 0xc8, 0x04, 0x43, 0x85, 0x58, 0x51, 0x8b,
|
||||
0x24, 0xa3, 0xcd, 0xb5, 0xb2, 0xc2, 0xed, 0x61, 0x4e, 0xea, 0xa3, 0xcd, 0x3d, 0x22, 0xf0, 0x66,
|
||||
0x7d, 0x9f, 0xd1, 0x20, 0x86, 0xaf, 0xad, 0x74, 0x59, 0x97, 0xc9, 0xcf, 0x7a, 0xf4, 0xa5, 0xa4,
|
||||
0x95, 0x2e, 0x63, 0xdd, 0x3e, 0xa9, 0xcb, 0xd5, 0xde, 0xf0, 0x71, 0x5d, 0x50, 0x9f, 0x70, 0x81,
|
||||
0xfd, 0x81, 0x02, 0xac, 0xce, 0x02, 0x70, 0x30, 0x56, 0xaa, 0xf2, 0xac, 0xca, 0x1b, 0x86, 0x58,
|
||||
0x50, 0x96, 0x78, 0x5c, 0x8d, 0x23, 0x72, 0x63, 0xa7, 0x2a, 0xda, 0x58, 0x75, 0x1a, 0xfb, 0x34,
|
||||
0x60, 0x75, 0xf9, 0x1b, 0x8b, 0xaa, 0x0c, 0xd0, 0x43, 0x42, 0xbb, 0x3d, 0x41, 0xbc, 0x5d, 0x26,
|
||||
0x48, 0x6b, 0x10, 0x59, 0x42, 0x9b, 0x90, 0x65, 0xf2, 0xcb, 0xd0, 0xd6, 0xb5, 0x8d, 0xe2, 0x8d,
|
||||
0xd5, 0xda, 0xa1, 0x5d, 0xd7, 0x26, 0x50, 0x5b, 0x01, 0xd1, 0x65, 0xc8, 0x3e, 0x91, 0x86, 0x8c,
|
||||
0xd4, 0xba, 0xb6, 0xb1, 0xb4, 0x55, 0x7c, 0xf5, 0xfc, 0x3a, 0x28, 0x56, 0x93, 0xec, 0xdb, 0x4a,
|
||||
0x5b, 0xfd, 0x51, 0x83, 0xc5, 0x26, 0x19, 0x30, 0x4e, 0x05, 0xaa, 0x40, 0x7e, 0x10, 0xb2, 0x01,
|
||||
0xe3, 0xb8, 0xef, 0x52, 0x4f, 0xfa, 0xd2, 0x6d, 0x48, 0x44, 0x96, 0x87, 0x3e, 0x87, 0x25, 0x2f,
|
||||
0xc6, 0xb2, 0x50, 0xd9, 0x35, 0x5e, 0x3d, 0xbf, 0xbe, 0xa2, 0xec, 0x36, 0x3c, 0x2f, 0x24, 0x9c,
|
||||
0x77, 0x44, 0x48, 0x83, 0xae, 0x3d, 0x81, 0xa2, 0x2f, 0x20, 0x8b, 0x7d, 0x36, 0x0c, 0x84, 0x91,
|
||||
0x5e, 0x4f, 0x6f, 0xe4, 0x27, 0xf1, 0x47, 0x65, 0xaa, 0xa9, 0x32, 0xd5, 0xb6, 0x19, 0x0d, 0xb6,
|
||||
0x96, 0x5e, 0xbc, 0xae, 0x2c, 0xfc, 0xf4, 0xef, 0xcf, 0x57, 0x34, 0x5b, 0x71, 0xaa, 0xbf, 0x65,
|
||||
0x20, 0xd7, 0x56, 0x41, 0xa0, 0x22, 0xa4, 0x0e, 0x42, 0x4b, 0x51, 0x0f, 0x7d, 0x0a, 0x39, 0x9f,
|
||||
0x70, 0x8e, 0xbb, 0x84, 0x1b, 0x29, 0x69, 0x7c, 0xa5, 0x16, 0x57, 0xa4, 0x96, 0x54, 0xa4, 0xd6,
|
||||
0x08, 0xc6, 0xf6, 0x01, 0x0a, 0xdd, 0x82, 0x2c, 0x17, 0x58, 0x0c, 0xb9, 0x91, 0x96, 0xc9, 0xbc,
|
||||
0x38, 0x93, 0xcc, 0xc4, 0x55, 0x47, 0x82, 0x6c, 0x05, 0x46, 0x77, 0x01, 0x3d, 0xa6, 0x01, 0xee,
|
||||
0xbb, 0x02, 0xf7, 0xfb, 0x63, 0x37, 0x24, 0x7c, 0xd8, 0x17, 0x86, 0xbe, 0xae, 0x6d, 0xe4, 0x6f,
|
||||
0xac, 0xcd, 0x98, 0x70, 0x22, 0x88, 0x2d, 0x11, 0x76, 0x49, 0xb2, 0xa6, 0x24, 0xa8, 0x01, 0x79,
|
||||
0x3e, 0xdc, 0xf3, 0xa9, 0x70, 0xa3, 0x36, 0x33, 0x32, 0xca, 0xc4, 0x6c, 0xd4, 0x4e, 0xd2, 0x83,
|
||||
0x5b, 0xfa, 0xb3, 0xbf, 0x2b, 0x9a, 0x0d, 0x31, 0x29, 0x12, 0xa3, 0x7b, 0x50, 0x52, 0xd9, 0x75,
|
||||
0x49, 0xe0, 0xc5, 0x76, 0xb2, 0x27, 0xb4, 0x53, 0x54, 0x4c, 0x33, 0xf0, 0xa4, 0x2d, 0x0b, 0x0a,
|
||||
0x82, 0x09, 0xdc, 0x77, 0x95, 0xdc, 0x58, 0x7c, 0x8f, 0x1a, 0x2d, 0x4b, 0x6a, 0xd2, 0x40, 0xf7,
|
||||
0xe1, 0xf4, 0x88, 0x09, 0x1a, 0x74, 0x5d, 0x2e, 0x70, 0xa8, 0xf6, 0x97, 0x3b, 0x61, 0x5c, 0xa7,
|
||||
0x62, 0x6a, 0x27, 0x62, 0xca, 0xc0, 0xee, 0x82, 0x12, 0x4d, 0xf6, 0xb8, 0x74, 0x42, 0x5b, 0x85,
|
||||
0x98, 0x98, 0x6c, 0x71, 0x2d, 0x6a, 0x12, 0x81, 0x3d, 0x2c, 0xb0, 0x01, 0x51, 0xdb, 0xda, 0x07,
|
||||
0x6b, 0xb4, 0x02, 0x19, 0x41, 0x45, 0x9f, 0x18, 0x79, 0xa9, 0x88, 0x17, 0xc8, 0x80, 0x45, 0x3e,
|
||||
0xf4, 0x7d, 0x1c, 0x8e, 0x8d, 0x65, 0x29, 0x4f, 0x96, 0xe8, 0x33, 0xc8, 0xc5, 0x13, 0x41, 0x42,
|
||||
0xa3, 0x70, 0xcc, 0x08, 0x1c, 0x20, 0xab, 0x7f, 0x68, 0x90, 0x9f, 0xee, 0x81, 0xab, 0xb0, 0x34,
|
||||
0x26, 0xdc, 0xdd, 0x97, 0x43, 0xa1, 0x1d, 0x99, 0x50, 0x2b, 0x10, 0x76, 0x6e, 0x4c, 0xf8, 0x76,
|
||||
0xa4, 0x47, 0x37, 0xa1, 0x80, 0xf7, 0xb8, 0xc0, 0x34, 0x50, 0x84, 0xd4, 0x5c, 0xc2, 0xb2, 0x02,
|
||||
0xc5, 0xa4, 0x4f, 0x20, 0x17, 0x30, 0x85, 0x4f, 0xcf, 0xc5, 0x2f, 0x06, 0x2c, 0x86, 0xde, 0x06,
|
||||
0x14, 0x30, 0xf7, 0x09, 0x15, 0x3d, 0x77, 0x44, 0x44, 0x42, 0xd2, 0xe7, 0x92, 0x4e, 0x05, 0xec,
|
||||
0x21, 0x15, 0xbd, 0x5d, 0x22, 0x62, 0x72, 0xf5, 0x17, 0x0d, 0xf4, 0xe8, 0xfc, 0x39, 0xfe, 0xf4,
|
||||
0xa8, 0x41, 0x66, 0xc4, 0x04, 0x39, 0xfe, 0xe4, 0x88, 0x61, 0xe8, 0x36, 0x2c, 0xc6, 0x87, 0x19,
|
||||
0x37, 0x74, 0xd9, 0x92, 0x97, 0x66, 0xc6, 0xec, 0xe8, 0x49, 0x69, 0x27, 0x8c, 0x43, 0x25, 0xcf,
|
||||
0x1c, 0x2e, 0xf9, 0x3d, 0x3d, 0x97, 0x2e, 0xe9, 0xd5, 0xbf, 0x34, 0x28, 0xa8, 0xc6, 0x6d, 0xe3,
|
||||
0x10, 0xfb, 0x1c, 0x3d, 0x82, 0xbc, 0x4f, 0x83, 0x83, 0x39, 0xd0, 0x8e, 0x9b, 0x83, 0x8b, 0xd1,
|
||||
0x1c, 0xbc, 0x7b, 0x5d, 0xf9, 0x68, 0x8a, 0x75, 0x8d, 0xf9, 0x54, 0x10, 0x7f, 0x20, 0xc6, 0x36,
|
||||
0xf8, 0x34, 0x48, 0x26, 0xc3, 0x07, 0xe4, 0xe3, 0xa7, 0x09, 0xc8, 0x1d, 0x90, 0x90, 0x32, 0x4f,
|
||||
0x26, 0x22, 0xf2, 0x30, 0xdb, 0xce, 0x4d, 0x75, 0x85, 0x6c, 0x7d, 0xfc, 0xee, 0x75, 0xe5, 0xc2,
|
||||
0x51, 0xe2, 0xc4, 0xc9, 0xf7, 0x51, 0xb7, 0x97, 0x7c, 0xfc, 0x34, 0xd9, 0x89, 0xd4, 0x57, 0x1d,
|
||||
0x58, 0xde, 0x95, 0x13, 0xa0, 0x76, 0xd6, 0x04, 0x35, 0x11, 0x89, 0x67, 0xed, 0x38, 0xcf, 0xba,
|
||||
0xb4, 0xbc, 0x1c, 0xb3, 0x94, 0xd5, 0x1f, 0x92, 0x26, 0x56, 0x56, 0x2f, 0x43, 0xf6, 0xdb, 0x21,
|
||||
0x0b, 0x87, 0xfe, 0x9c, 0x0e, 0x96, 0x77, 0x4c, 0xac, 0x45, 0xd7, 0x60, 0x49, 0xf4, 0x42, 0xc2,
|
||||
0x7b, 0xac, 0xef, 0xfd, 0xcf, 0x75, 0x34, 0x01, 0xa0, 0x5b, 0x50, 0x94, 0x5d, 0x38, 0xa1, 0xa4,
|
||||
0xe7, 0x52, 0x0a, 0x11, 0xca, 0x49, 0x40, 0xd5, 0x5f, 0xd3, 0x90, 0x55, 0x71, 0x99, 0xef, 0x59,
|
||||
0xc7, 0xa9, 0xf3, 0x6c, 0xba, 0x66, 0x5f, 0x7d, 0x58, 0xcd, 0xf4, 0xf9, 0x35, 0x39, 0x5a, 0x83,
|
||||
0xf4, 0x07, 0xd4, 0x60, 0x2a, 0xe7, 0xfa, 0xc9, 0x73, 0x9e, 0x79, 0xff, 0x9c, 0x67, 0x4f, 0x90,
|
||||
0x73, 0x64, 0xc1, 0x6a, 0x94, 0x68, 0x1a, 0x50, 0x41, 0x27, 0x17, 0x88, 0x2b, 0xc3, 0x37, 0x16,
|
||||
0xe7, 0x5a, 0x38, 0xeb, 0xd3, 0xc0, 0x8a, 0xf1, 0x2a, 0x3d, 0x76, 0x84, 0xbe, 0xf2, 0x9d, 0x06,
|
||||
0x30, 0xf5, 0xe2, 0x39, 0x0f, 0xe7, 0x76, 0x5b, 0x8e, 0xe9, 0xb6, 0xda, 0x8e, 0xd5, 0xda, 0x71,
|
||||
0x1f, 0xec, 0x74, 0xda, 0xe6, 0xb6, 0x75, 0xc7, 0x32, 0x9b, 0xa5, 0x05, 0x74, 0x06, 0x4e, 0x4d,
|
||||
0x2b, 0x1f, 0x99, 0x9d, 0x92, 0x86, 0xce, 0xc1, 0x99, 0x69, 0x61, 0x63, 0xab, 0xe3, 0x34, 0xac,
|
||||
0x9d, 0x52, 0x0a, 0x21, 0x28, 0x4e, 0x2b, 0x76, 0x5a, 0xa5, 0x34, 0xba, 0x00, 0xc6, 0x61, 0x99,
|
||||
0xfb, 0xd0, 0x72, 0xee, 0xba, 0xbb, 0xa6, 0xd3, 0x2a, 0xe9, 0x57, 0x7e, 0xd7, 0xa0, 0x78, 0xf8,
|
||||
0x15, 0x80, 0x2a, 0x70, 0xbe, 0x6d, 0xb7, 0xda, 0xad, 0x4e, 0xe3, 0xbe, 0xdb, 0x71, 0x1a, 0xce,
|
||||
0x83, 0xce, 0x4c, 0x4c, 0x55, 0x28, 0xcf, 0x02, 0x9a, 0x66, 0xbb, 0xd5, 0xb1, 0x1c, 0xb7, 0x6d,
|
||||
0xda, 0x56, 0xab, 0x59, 0xd2, 0xd0, 0x25, 0xb8, 0x38, 0x8b, 0xd9, 0x6d, 0x39, 0xd6, 0xce, 0x97,
|
||||
0x09, 0x24, 0x85, 0xd6, 0xe0, 0xec, 0x2c, 0xa4, 0xdd, 0xe8, 0x74, 0xcc, 0x66, 0x1c, 0xf4, 0xac,
|
||||
0xce, 0x36, 0xef, 0x99, 0xdb, 0x8e, 0xd9, 0x2c, 0xe9, 0xf3, 0x98, 0x77, 0x1a, 0xd6, 0x7d, 0xb3,
|
||||
0x59, 0xca, 0x6c, 0x99, 0x2f, 0xde, 0x94, 0xb5, 0x97, 0x6f, 0xca, 0xda, 0x3f, 0x6f, 0xca, 0xda,
|
||||
0xb3, 0xb7, 0xe5, 0x85, 0x97, 0x6f, 0xcb, 0x0b, 0x7f, 0xbe, 0x2d, 0x2f, 0x7c, 0x7d, 0xb5, 0x4b,
|
||||
0x45, 0x6f, 0xb8, 0x57, 0xdb, 0x67, 0xbe, 0x7a, 0x9b, 0xaa, 0xbf, 0xeb, 0xdc, 0xfb, 0xa6, 0xfe,
|
||||
0x54, 0xbe, 0xb7, 0xc5, 0x78, 0x40, 0x78, 0xf4, 0x98, 0xce, 0xca, 0x16, 0xbd, 0xf9, 0x5f, 0x00,
|
||||
0x00, 0x00, 0xff, 0xff, 0x31, 0x0a, 0x72, 0x23, 0x8d, 0x0b, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *WeightedVoteOption) Marshal() (dAtA []byte, err error) {
|
||||
@ -988,6 +1016,27 @@ func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Proposer) > 0 {
|
||||
i -= len(m.Proposer)
|
||||
copy(dAtA[i:], m.Proposer)
|
||||
i = encodeVarintGov(dAtA, i, uint64(len(m.Proposer)))
|
||||
i--
|
||||
dAtA[i] = 0x6a
|
||||
}
|
||||
if len(m.Summary) > 0 {
|
||||
i -= len(m.Summary)
|
||||
copy(dAtA[i:], m.Summary)
|
||||
i = encodeVarintGov(dAtA, i, uint64(len(m.Summary)))
|
||||
i--
|
||||
dAtA[i] = 0x62
|
||||
}
|
||||
if len(m.Title) > 0 {
|
||||
i -= len(m.Title)
|
||||
copy(dAtA[i:], m.Title)
|
||||
i = encodeVarintGov(dAtA, i, uint64(len(m.Title)))
|
||||
i--
|
||||
dAtA[i] = 0x5a
|
||||
}
|
||||
if len(m.Metadata) > 0 {
|
||||
i -= len(m.Metadata)
|
||||
copy(dAtA[i:], m.Metadata)
|
||||
@ -1501,6 +1550,18 @@ func (m *Proposal) Size() (n int) {
|
||||
if l > 0 {
|
||||
n += 1 + l + sovGov(uint64(l))
|
||||
}
|
||||
l = len(m.Title)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovGov(uint64(l))
|
||||
}
|
||||
l = len(m.Summary)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovGov(uint64(l))
|
||||
}
|
||||
l = len(m.Proposer)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovGov(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
@ -2236,6 +2297,102 @@ func (m *Proposal) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
m.Metadata = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 11:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGov
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthGov
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthGov
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Title = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 12:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Summary", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGov
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthGov
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthGov
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Summary = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 13:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Proposer", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGov
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthGov
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthGov
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Proposer = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipGov(dAtA[iNdEx:])
|
||||
|
||||
@ -22,11 +22,13 @@ var (
|
||||
// NewMsgSubmitProposal creates a new MsgSubmitProposal.
|
||||
//
|
||||
//nolint:interfacer
|
||||
func NewMsgSubmitProposal(messages []sdk.Msg, initialDeposit sdk.Coins, proposer string, metadata string) (*MsgSubmitProposal, error) {
|
||||
func NewMsgSubmitProposal(messages []sdk.Msg, initialDeposit sdk.Coins, proposer, metadata, title, summary string) (*MsgSubmitProposal, error) {
|
||||
m := &MsgSubmitProposal{
|
||||
InitialDeposit: initialDeposit,
|
||||
Proposer: proposer,
|
||||
Metadata: metadata,
|
||||
Title: title,
|
||||
Summary: summary,
|
||||
}
|
||||
|
||||
anys, err := sdktx.SetMsgs(messages)
|
||||
@ -52,6 +54,13 @@ func (m MsgSubmitProposal) Type() string { return sdk.MsgTypeURL(&m) }
|
||||
|
||||
// ValidateBasic implements the sdk.Msg interface.
|
||||
func (m MsgSubmitProposal) ValidateBasic() error {
|
||||
if m.Title == "" {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "proposal title cannot be empty")
|
||||
}
|
||||
if m.Summary == "" {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "proposal summary cannot be empty")
|
||||
}
|
||||
|
||||
if _, err := sdk.AccAddressFromBech32(m.Proposer); err != nil {
|
||||
return sdkerrors.ErrInvalidAddress.Wrapf("invalid proposer address: %s", err)
|
||||
}
|
||||
|
||||
@ -149,18 +149,21 @@ func TestMsgSubmitProposal_ValidateBasic(t *testing.T) {
|
||||
initialDeposit sdk.Coins
|
||||
messages []sdk.Msg
|
||||
metadata string
|
||||
title string
|
||||
summary string
|
||||
expErr bool
|
||||
}{
|
||||
{"invalid addr", "", coinsPos, []sdk.Msg{msg1}, metadata, true},
|
||||
{"empty msgs and metadata", addrs[0].String(), coinsPos, nil, "", true},
|
||||
{"invalid msg", addrs[0].String(), coinsPos, []sdk.Msg{msg1, msg2}, metadata, true},
|
||||
{"valid with no Msg", addrs[0].String(), coinsPos, nil, metadata, false},
|
||||
{"valid with no metadata", addrs[0].String(), coinsPos, []sdk.Msg{msg1}, "", false},
|
||||
{"valid with everything", addrs[0].String(), coinsPos, []sdk.Msg{msg1}, metadata, false},
|
||||
{"invalid addr", "", coinsPos, []sdk.Msg{msg1}, metadata, "Title", "Summary", true},
|
||||
{"empty msgs and metadata", addrs[0].String(), coinsPos, nil, "", "Title", "Summary", true},
|
||||
{"empty title and summary", addrs[0].String(), coinsPos, nil, "", "", "", true},
|
||||
{"invalid msg", addrs[0].String(), coinsPos, []sdk.Msg{msg1, msg2}, metadata, "Title", "Summary", true},
|
||||
{"valid with no Msg", addrs[0].String(), coinsPos, nil, metadata, "Title", "Summary", false},
|
||||
{"valid with no metadata", addrs[0].String(), coinsPos, []sdk.Msg{msg1}, "", "Title", "Summary", false},
|
||||
{"valid with everything", addrs[0].String(), coinsPos, []sdk.Msg{msg1}, metadata, "Title", "Summary", false},
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
msg, err := v1.NewMsgSubmitProposal(tc.messages, tc.initialDeposit, tc.proposer, tc.metadata)
|
||||
msg, err := v1.NewMsgSubmitProposal(tc.messages, tc.initialDeposit, tc.proposer, tc.metadata, tc.title, tc.summary)
|
||||
require.NoError(t, err)
|
||||
if tc.expErr {
|
||||
require.Error(t, msg.ValidateBasic(), "test: %s", tc.name)
|
||||
@ -175,23 +178,29 @@ func TestMsgSubmitProposal_GetSignBytes(t *testing.T) {
|
||||
testcases := []struct {
|
||||
name string
|
||||
proposal []sdk.Msg
|
||||
title string
|
||||
summary string
|
||||
expSignBz string
|
||||
}{
|
||||
{
|
||||
"MsgVote",
|
||||
[]sdk.Msg{v1.NewMsgVote(addrs[0], 1, v1.OptionYes, "")},
|
||||
`{"type":"cosmos-sdk/v1/MsgSubmitProposal","value":{"initial_deposit":[],"messages":[{"type":"cosmos-sdk/v1/MsgVote","value":{"option":1,"proposal_id":"1","voter":"cosmos1w3jhxap3gempvr"}}]}}`,
|
||||
"gov/MsgVote",
|
||||
"Proposal for a governance vote msg",
|
||||
`{"type":"cosmos-sdk/v1/MsgSubmitProposal","value":{"initial_deposit":[],"messages":[{"type":"cosmos-sdk/v1/MsgVote","value":{"option":1,"proposal_id":"1","voter":"cosmos1w3jhxap3gempvr"}}],"summary":"Proposal for a governance vote msg","title":"gov/MsgVote"}}`,
|
||||
},
|
||||
{
|
||||
"MsgSend",
|
||||
[]sdk.Msg{banktypes.NewMsgSend(addrs[0], addrs[0], sdk.NewCoins())},
|
||||
fmt.Sprintf(`{"type":"cosmos-sdk/v1/MsgSubmitProposal","value":{"initial_deposit":[],"messages":[{"type":"cosmos-sdk/MsgSend","value":{"amount":[],"from_address":"%s","to_address":"%s"}}]}}`, addrs[0], addrs[0]),
|
||||
"bank/MsgSend",
|
||||
"Proposal for a bank msg send",
|
||||
fmt.Sprintf(`{"type":"cosmos-sdk/v1/MsgSubmitProposal","value":{"initial_deposit":[],"messages":[{"type":"cosmos-sdk/MsgSend","value":{"amount":[],"from_address":"%s","to_address":"%s"}}],"summary":"Proposal for a bank msg send","title":"bank/MsgSend"}}`, addrs[0], addrs[0]),
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testcases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
msg, err := v1.NewMsgSubmitProposal(tc.proposal, sdk.NewCoins(), sdk.AccAddress{}.String(), "")
|
||||
msg, err := v1.NewMsgSubmitProposal(tc.proposal, sdk.NewCoins(), sdk.AccAddress{}.String(), "", tc.title, tc.summary)
|
||||
require.NoError(t, err)
|
||||
var bz []byte
|
||||
require.NotPanics(t, func() {
|
||||
|
||||
@ -23,7 +23,7 @@ const (
|
||||
)
|
||||
|
||||
// NewProposal creates a new Proposal instance
|
||||
func NewProposal(messages []sdk.Msg, id uint64, metadata string, submitTime, depositEndTime time.Time) (Proposal, error) {
|
||||
func NewProposal(messages []sdk.Msg, id uint64, metadata string, submitTime, depositEndTime time.Time, title, summary string, proposer sdk.AccAddress) (Proposal, error) {
|
||||
msgs, err := sdktx.SetMsgs(messages)
|
||||
if err != nil {
|
||||
return Proposal{}, err
|
||||
@ -39,6 +39,9 @@ func NewProposal(messages []sdk.Msg, id uint64, metadata string, submitTime, dep
|
||||
FinalTallyResult: &tally,
|
||||
SubmitTime: &submitTime,
|
||||
DepositEndTime: &depositEndTime,
|
||||
Title: title,
|
||||
Summary: summary,
|
||||
Proposer: proposer.String(),
|
||||
}
|
||||
|
||||
return p, nil
|
||||
|
||||
@ -35,7 +35,7 @@ func TestNestedAnys(t *testing.T) {
|
||||
testProposal := v1beta1.NewTextProposal("Proposal", "testing proposal")
|
||||
msgContent, err := v1.NewLegacyContent(testProposal, "cosmos1govacct")
|
||||
require.NoError(t, err)
|
||||
proposal, err := v1.NewProposal([]sdk.Msg{msgContent}, 1, "", time.Now(), time.Now())
|
||||
proposal, err := v1.NewProposal([]sdk.Msg{msgContent}, 1, "", time.Now(), time.Now(), "title", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
require.NoError(t, err)
|
||||
|
||||
require.NotPanics(t, func() { _ = proposal.String() })
|
||||
|
||||
@ -44,6 +44,10 @@ type MsgSubmitProposal struct {
|
||||
Proposer string `protobuf:"bytes,3,opt,name=proposer,proto3" json:"proposer,omitempty"`
|
||||
// metadata is any arbitrary metadata attached to the proposal.
|
||||
Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
|
||||
// title is the title of the proposal.
|
||||
Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"`
|
||||
// summary is the summary of the proposal
|
||||
Summary string `protobuf:"bytes,6,opt,name=summary,proto3" json:"summary,omitempty"`
|
||||
}
|
||||
|
||||
func (m *MsgSubmitProposal) Reset() { *m = MsgSubmitProposal{} }
|
||||
@ -107,6 +111,20 @@ func (m *MsgSubmitProposal) GetMetadata() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *MsgSubmitProposal) GetTitle() string {
|
||||
if m != nil {
|
||||
return m.Title
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *MsgSubmitProposal) GetSummary() string {
|
||||
if m != nil {
|
||||
return m.Summary
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type.
|
||||
type MsgSubmitProposalResponse struct {
|
||||
// proposal_id defines the unique id of the proposal.
|
||||
@ -684,62 +702,64 @@ func init() {
|
||||
func init() { proto.RegisterFile("cosmos/gov/v1/tx.proto", fileDescriptor_9ff8f4a63b6fc9a9) }
|
||||
|
||||
var fileDescriptor_9ff8f4a63b6fc9a9 = []byte{
|
||||
// 878 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x6f, 0xe3, 0x44,
|
||||
0x14, 0x8e, 0x9b, 0x6c, 0xb2, 0x99, 0x40, 0x57, 0xb1, 0xb2, 0xbb, 0x8e, 0xb5, 0x38, 0x59, 0x2f,
|
||||
0x42, 0x51, 0x4b, 0x6d, 0x52, 0xd8, 0x15, 0xca, 0xae, 0x90, 0x36, 0x4b, 0x85, 0x90, 0x88, 0xa8,
|
||||
0x5c, 0x51, 0x24, 0x84, 0x54, 0x4d, 0xe2, 0x61, 0x6a, 0x51, 0x7b, 0x2c, 0xcf, 0x24, 0x6a, 0x6e,
|
||||
0x88, 0x63, 0x4f, 0x5c, 0xf9, 0x0f, 0x7a, 0xec, 0xa1, 0x37, 0xfe, 0x81, 0x8a, 0x53, 0xc5, 0x89,
|
||||
0x53, 0x85, 0x5a, 0x41, 0x25, 0xfe, 0x09, 0xd0, 0x78, 0xc6, 0xce, 0x0f, 0xa7, 0x69, 0xc5, 0x81,
|
||||
0x4b, 0x64, 0xbf, 0xf7, 0x7d, 0x6f, 0xde, 0xf7, 0xcd, 0xbc, 0x71, 0xc0, 0xa3, 0x01, 0xa1, 0x3e,
|
||||
0xa1, 0x36, 0x26, 0x23, 0x7b, 0xd4, 0xb6, 0xd9, 0xa1, 0x15, 0x46, 0x84, 0x11, 0xf5, 0x6d, 0x11,
|
||||
0xb7, 0x30, 0x19, 0x59, 0xa3, 0xb6, 0x6e, 0x48, 0x58, 0x1f, 0x52, 0x64, 0x8f, 0xda, 0x7d, 0xc4,
|
||||
0x60, 0xdb, 0x1e, 0x10, 0x2f, 0x10, 0x70, 0xfd, 0xf1, 0x6c, 0x19, 0xce, 0x12, 0x89, 0x1a, 0x26,
|
||||
0x98, 0xc4, 0x8f, 0x36, 0x7f, 0x92, 0xd1, 0xba, 0x80, 0xef, 0x89, 0x84, 0x5c, 0x4a, 0xa6, 0x30,
|
||||
0x21, 0xf8, 0x00, 0xd9, 0xf1, 0x5b, 0x7f, 0xf8, 0x9d, 0x0d, 0x83, 0xf1, 0xdc, 0x22, 0x3e, 0xc5,
|
||||
0x7c, 0x11, 0x9f, 0x62, 0x99, 0xa8, 0x42, 0xdf, 0x0b, 0x88, 0x1d, 0xff, 0x8a, 0x90, 0xf9, 0xf3,
|
||||
0x0a, 0xa8, 0xf6, 0x28, 0xde, 0x19, 0xf6, 0x7d, 0x8f, 0x6d, 0x47, 0x24, 0x24, 0x14, 0x1e, 0xa8,
|
||||
0x1f, 0x80, 0xfb, 0x3e, 0xa2, 0x14, 0x62, 0x44, 0x35, 0xa5, 0x99, 0x6f, 0x55, 0x36, 0x6b, 0x96,
|
||||
0x58, 0xcf, 0x4a, 0xd6, 0xb3, 0x5e, 0x07, 0x63, 0x27, 0x45, 0xa9, 0x3d, 0xf0, 0xc0, 0x0b, 0x3c,
|
||||
0xe6, 0xc1, 0x83, 0x3d, 0x17, 0x85, 0x84, 0x7a, 0x4c, 0x5b, 0x89, 0x89, 0x75, 0x4b, 0xb6, 0xcd,
|
||||
0x2d, 0xb1, 0xa4, 0x25, 0xd6, 0x1b, 0xe2, 0x05, 0xdd, 0xf2, 0xd9, 0x45, 0x23, 0x77, 0x7c, 0x7d,
|
||||
0xb2, 0xa6, 0x38, 0xab, 0x92, 0xfc, 0xa9, 0xe0, 0xaa, 0x1f, 0x81, 0xfb, 0x61, 0xdc, 0x0c, 0x8a,
|
||||
0xb4, 0x7c, 0x53, 0x69, 0x95, 0xbb, 0xda, 0x6f, 0xa7, 0x1b, 0x35, 0x59, 0xea, 0xb5, 0xeb, 0x46,
|
||||
0x88, 0xd2, 0x1d, 0x16, 0x79, 0x01, 0x76, 0x52, 0xa4, 0xaa, 0xf3, 0xb6, 0x19, 0x74, 0x21, 0x83,
|
||||
0x5a, 0x81, 0xb3, 0x9c, 0xf4, 0xbd, 0xd3, 0xfe, 0xf1, 0xfa, 0x64, 0x2d, 0x85, 0x1e, 0x5d, 0x9f,
|
||||
0xac, 0x35, 0x44, 0xb5, 0x0d, 0xea, 0x7e, 0xcf, 0x6d, 0xca, 0xb8, 0x60, 0xbe, 0x02, 0xf5, 0x4c,
|
||||
0xd0, 0x41, 0x34, 0x24, 0x01, 0x45, 0x6a, 0x03, 0x54, 0x42, 0x19, 0xdb, 0xf3, 0x5c, 0x4d, 0x69,
|
||||
0x2a, 0xad, 0x82, 0x03, 0x92, 0xd0, 0xe7, 0xae, 0x79, 0xac, 0x80, 0x5a, 0x8f, 0xe2, 0xad, 0x43,
|
||||
0x34, 0xf8, 0x02, 0x61, 0x38, 0x18, 0xbf, 0x21, 0x01, 0x43, 0x01, 0x53, 0x5f, 0x82, 0xd2, 0x40,
|
||||
0x3c, 0xc6, 0xac, 0x1b, 0xbc, 0xed, 0x56, 0x7e, 0x3d, 0xdd, 0x28, 0x49, 0x8e, 0x93, 0x30, 0xd4,
|
||||
0x27, 0xa0, 0x0c, 0x87, 0x6c, 0x9f, 0x44, 0x1e, 0x1b, 0x6b, 0x2b, 0xb1, 0xc6, 0x49, 0xa0, 0xf3,
|
||||
0x9c, 0x8b, 0x9c, 0xbc, 0x73, 0x95, 0x66, 0x46, 0x65, 0xa6, 0x23, 0xd3, 0x00, 0x4f, 0x16, 0xc5,
|
||||
0x13, 0xad, 0xe6, 0x9f, 0x0a, 0x28, 0xf5, 0x28, 0xde, 0x25, 0x0c, 0xa9, 0xcf, 0x17, 0xe8, 0xee,
|
||||
0xd6, 0xfe, 0xbe, 0x68, 0x4c, 0x87, 0xc5, 0xa6, 0x4e, 0xb9, 0xa1, 0x5a, 0xe0, 0xde, 0x88, 0x30,
|
||||
0x14, 0x89, 0x9e, 0x97, 0xec, 0xa6, 0x80, 0xa9, 0x6d, 0x50, 0x24, 0x21, 0xf3, 0x48, 0x10, 0x6f,
|
||||
0xff, 0xea, 0xe4, 0x18, 0x89, 0x41, 0xb3, 0x78, 0x2f, 0x5f, 0xc6, 0x00, 0x47, 0x02, 0x97, 0xee,
|
||||
0xfe, 0xbb, 0xdc, 0x18, 0x51, 0x9a, 0x9b, 0xf2, 0x30, 0x63, 0x0a, 0xaf, 0x67, 0x56, 0xc1, 0x03,
|
||||
0xf9, 0x98, 0x4a, 0xff, 0x47, 0x49, 0x63, 0x5f, 0x23, 0x0f, 0xef, 0x33, 0xe4, 0xfe, 0x5f, 0x16,
|
||||
0xbc, 0x04, 0x25, 0xa1, 0x8c, 0x6a, 0xf9, 0x78, 0x94, 0x9e, 0xce, 0x79, 0x90, 0x34, 0x34, 0xe5,
|
||||
0x45, 0xc2, 0x58, 0x6a, 0xc6, 0xfb, 0xb3, 0x66, 0xbc, 0xb3, 0xd0, 0x8c, 0xa4, 0xb8, 0x59, 0x07,
|
||||
0x8f, 0xe7, 0x42, 0xa9, 0x39, 0x7f, 0x29, 0x00, 0xf4, 0x28, 0x4e, 0x86, 0xf6, 0x3f, 0xfa, 0xf2,
|
||||
0x02, 0x94, 0xe5, 0x95, 0x41, 0x6e, 0xf7, 0x66, 0x02, 0x55, 0x5f, 0x81, 0x22, 0xf4, 0xc9, 0x30,
|
||||
0x60, 0xd2, 0x9e, 0xbb, 0xdd, 0x34, 0x92, 0xd3, 0x59, 0x8f, 0x47, 0x25, 0xad, 0xc6, 0x8d, 0xd0,
|
||||
0x32, 0x46, 0x48, 0x65, 0x66, 0x0d, 0xa8, 0x93, 0xb7, 0x54, 0xfe, 0x2f, 0xe2, 0x6c, 0x7c, 0x15,
|
||||
0xba, 0x90, 0xa1, 0x6d, 0x18, 0x41, 0x9f, 0x72, 0x31, 0x93, 0xf9, 0x54, 0x6e, 0x13, 0x93, 0x42,
|
||||
0xd5, 0x8f, 0x41, 0x31, 0x8c, 0x2b, 0xc4, 0x0e, 0x54, 0x36, 0x1f, 0xce, 0xed, 0xb5, 0x28, 0x3f,
|
||||
0x23, 0x44, 0xe0, 0x3b, 0x2f, 0xb2, 0x33, 0xff, 0x6c, 0x4a, 0xc8, 0x61, 0xf2, 0xad, 0x99, 0xeb,
|
||||
0x54, 0xee, 0xeb, 0x74, 0x28, 0x11, 0xb6, 0x79, 0x54, 0x00, 0xf9, 0x1e, 0xc5, 0xea, 0xb7, 0x60,
|
||||
0x75, 0xee, 0xc3, 0xd0, 0x9c, 0x6b, 0x2b, 0x73, 0x3f, 0xea, 0xad, 0xdb, 0x10, 0xe9, 0x0d, 0x8a,
|
||||
0x40, 0x35, 0x7b, 0x39, 0x3e, 0xcb, 0xd2, 0x33, 0x20, 0x7d, 0xfd, 0x0e, 0xa0, 0x74, 0x99, 0x4f,
|
||||
0x40, 0x21, 0xbe, 0xb8, 0x1e, 0x65, 0x49, 0x3c, 0xae, 0x1b, 0x8b, 0xe3, 0x29, 0x7f, 0x17, 0xbc,
|
||||
0x35, 0x33, 0xfd, 0x37, 0xe0, 0x93, 0xbc, 0xfe, 0xde, 0xf2, 0x7c, 0x5a, 0xf7, 0x33, 0x50, 0x4a,
|
||||
0x06, 0xa7, 0x9e, 0xa5, 0xc8, 0x94, 0xfe, 0xf4, 0xc6, 0xd4, 0x74, 0x83, 0x33, 0x47, 0x70, 0x41,
|
||||
0x83, 0xd3, 0xf9, 0x45, 0x0d, 0x2e, 0x3a, 0x05, 0xfa, 0xbd, 0x1f, 0xf8, 0x39, 0xeb, 0x6e, 0x9d,
|
||||
0x5d, 0x1a, 0xca, 0xf9, 0xa5, 0xa1, 0xfc, 0x71, 0x69, 0x28, 0x3f, 0x5d, 0x19, 0xb9, 0xf3, 0x2b,
|
||||
0x23, 0xf7, 0xfb, 0x95, 0x91, 0xfb, 0x66, 0x1d, 0x7b, 0x6c, 0x7f, 0xd8, 0xb7, 0x06, 0xc4, 0x97,
|
||||
0xff, 0x4d, 0xec, 0xcc, 0xc1, 0x63, 0xe3, 0x10, 0x51, 0xfe, 0x4f, 0xa8, 0x18, 0x7f, 0xdc, 0x3e,
|
||||
0xfc, 0x37, 0x00, 0x00, 0xff, 0xff, 0x2c, 0x45, 0xda, 0x06, 0x49, 0x09, 0x00, 0x00,
|
||||
// 904 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0x1b, 0x45,
|
||||
0x14, 0xcf, 0xe6, 0x8f, 0xdd, 0xbc, 0x40, 0xaa, 0x8c, 0xdc, 0x76, 0xbd, 0x2a, 0x9b, 0x74, 0x8b,
|
||||
0x50, 0x94, 0x90, 0x5d, 0x1c, 0x68, 0x85, 0xdc, 0x0a, 0xa9, 0x2e, 0x15, 0x42, 0xc2, 0xa2, 0x72,
|
||||
0x45, 0x91, 0x10, 0x52, 0x34, 0xf6, 0x0e, 0x93, 0x15, 0xd9, 0x9d, 0xd5, 0xce, 0xd8, 0x8a, 0x6f,
|
||||
0x88, 0x63, 0x4f, 0x7c, 0x8c, 0x1e, 0x73, 0xe8, 0x8d, 0x2f, 0x50, 0x38, 0x55, 0x9c, 0x38, 0x55,
|
||||
0x28, 0x11, 0x44, 0xe2, 0x4b, 0x80, 0xe6, 0xcf, 0xae, 0xff, 0xac, 0xe3, 0x54, 0x1c, 0xb8, 0x58,
|
||||
0x33, 0xef, 0xfd, 0xde, 0x9b, 0xf7, 0xfb, 0xcd, 0x7b, 0xb3, 0x86, 0xeb, 0x3d, 0xc6, 0x63, 0xc6,
|
||||
0x03, 0xca, 0x06, 0xc1, 0xa0, 0x11, 0x88, 0x63, 0x3f, 0xcd, 0x98, 0x60, 0xe8, 0x6d, 0x6d, 0xf7,
|
||||
0x29, 0x1b, 0xf8, 0x83, 0x86, 0xe3, 0x1a, 0x58, 0x17, 0x73, 0x12, 0x0c, 0x1a, 0x5d, 0x22, 0x70,
|
||||
0x23, 0xe8, 0xb1, 0x28, 0xd1, 0x70, 0xe7, 0xc6, 0x64, 0x1a, 0x19, 0xa5, 0x1d, 0x35, 0xca, 0x28,
|
||||
0x53, 0xcb, 0x40, 0xae, 0x8c, 0xb5, 0xae, 0xe1, 0x07, 0xda, 0x61, 0x8e, 0x32, 0x2e, 0xca, 0x18,
|
||||
0x3d, 0x22, 0x81, 0xda, 0x75, 0xfb, 0xdf, 0x05, 0x38, 0x19, 0x4e, 0x1d, 0x12, 0x73, 0x2a, 0x0f,
|
||||
0x89, 0x39, 0x35, 0x8e, 0x0d, 0x1c, 0x47, 0x09, 0x0b, 0xd4, 0xaf, 0x36, 0x79, 0xbf, 0x2c, 0xc2,
|
||||
0x46, 0x9b, 0xd3, 0x27, 0xfd, 0x6e, 0x1c, 0x89, 0xc7, 0x19, 0x4b, 0x19, 0xc7, 0x47, 0xe8, 0x03,
|
||||
0xb8, 0x12, 0x13, 0xce, 0x31, 0x25, 0xdc, 0xb6, 0xb6, 0x96, 0xb6, 0xd7, 0xf6, 0x6b, 0xbe, 0x3e,
|
||||
0xcf, 0xcf, 0xcf, 0xf3, 0x1f, 0x24, 0xc3, 0x4e, 0x81, 0x42, 0x6d, 0xb8, 0x1a, 0x25, 0x91, 0x88,
|
||||
0xf0, 0xd1, 0x41, 0x48, 0x52, 0xc6, 0x23, 0x61, 0x2f, 0xaa, 0xc0, 0xba, 0x6f, 0xca, 0x96, 0x92,
|
||||
0xf8, 0x46, 0x12, 0xff, 0x21, 0x8b, 0x92, 0xd6, 0xea, 0xcb, 0xd7, 0x9b, 0x0b, 0xcf, 0xcf, 0x4f,
|
||||
0x76, 0xac, 0xce, 0xba, 0x09, 0xfe, 0x54, 0xc7, 0xa2, 0x8f, 0xe0, 0x4a, 0xaa, 0x8a, 0x21, 0x99,
|
||||
0xbd, 0xb4, 0x65, 0x6d, 0xaf, 0xb6, 0xec, 0xdf, 0x5e, 0xec, 0xd5, 0x4c, 0xaa, 0x07, 0x61, 0x98,
|
||||
0x11, 0xce, 0x9f, 0x88, 0x2c, 0x4a, 0x68, 0xa7, 0x40, 0x22, 0x47, 0x96, 0x2d, 0x70, 0x88, 0x05,
|
||||
0xb6, 0x97, 0x65, 0x54, 0xa7, 0xd8, 0xa3, 0x1a, 0xac, 0x88, 0x48, 0x1c, 0x11, 0x7b, 0x45, 0x39,
|
||||
0xf4, 0x06, 0xd9, 0x50, 0xe5, 0xfd, 0x38, 0xc6, 0xd9, 0xd0, 0xae, 0x28, 0x7b, 0xbe, 0x6d, 0x36,
|
||||
0x7e, 0x3c, 0x3f, 0xd9, 0x29, 0x52, 0x3f, 0x3b, 0x3f, 0xd9, 0xd9, 0xd4, 0xa7, 0xef, 0xf1, 0xf0,
|
||||
0x7b, 0x29, 0x6b, 0x49, 0x35, 0xef, 0x3e, 0xd4, 0x4b, 0xc6, 0x0e, 0xe1, 0x29, 0x4b, 0x38, 0x41,
|
||||
0x9b, 0xb0, 0x96, 0x1a, 0xdb, 0x41, 0x14, 0xda, 0xd6, 0x96, 0xb5, 0xbd, 0xdc, 0x81, 0xdc, 0xf4,
|
||||
0x79, 0xe8, 0x3d, 0xb7, 0xa0, 0xd6, 0xe6, 0xf4, 0xd1, 0x31, 0xe9, 0x7d, 0x41, 0x28, 0xee, 0x0d,
|
||||
0x1f, 0xb2, 0x44, 0x90, 0x44, 0xa0, 0x7b, 0x50, 0xed, 0xe9, 0xa5, 0x8a, 0xba, 0xe0, 0x2e, 0x5a,
|
||||
0x6b, 0xbf, 0xbe, 0xd8, 0xab, 0x9a, 0x98, 0x4e, 0x1e, 0x81, 0x6e, 0xc2, 0x2a, 0xee, 0x8b, 0x43,
|
||||
0x96, 0x45, 0x62, 0x68, 0x2f, 0x2a, 0x8a, 0x23, 0x43, 0xf3, 0x8e, 0x24, 0x39, 0xda, 0x4b, 0x96,
|
||||
0x5e, 0x89, 0x65, 0xa9, 0x22, 0xcf, 0x85, 0x9b, 0xb3, 0xec, 0x39, 0x57, 0xef, 0x4f, 0x0b, 0xaa,
|
||||
0x6d, 0x4e, 0x9f, 0x32, 0x41, 0xd0, 0x9d, 0x19, 0xbc, 0x5b, 0xb5, 0xbf, 0x5f, 0x6f, 0x8e, 0x9b,
|
||||
0x75, 0x13, 0x8c, 0xa9, 0x81, 0x7c, 0x58, 0x19, 0x30, 0x41, 0x32, 0x5d, 0xf3, 0x9c, 0xdb, 0xd7,
|
||||
0x30, 0xd4, 0x80, 0x0a, 0x4b, 0x45, 0xc4, 0x12, 0xd5, 0x2e, 0xeb, 0xa3, 0xb6, 0xd3, 0x83, 0xe9,
|
||||
0xcb, 0x5a, 0xbe, 0x54, 0x80, 0x8e, 0x01, 0xce, 0xeb, 0x96, 0xe6, 0xbb, 0x52, 0x18, 0x9d, 0x5a,
|
||||
0x8a, 0x72, 0xad, 0x24, 0x8a, 0xcc, 0xe7, 0x6d, 0xc0, 0x55, 0xb3, 0x2c, 0xa8, 0xff, 0x63, 0x15,
|
||||
0xb6, 0xaf, 0x49, 0x44, 0x0f, 0x05, 0x09, 0xff, 0x2f, 0x09, 0xee, 0x41, 0x55, 0x33, 0xe3, 0xf6,
|
||||
0x92, 0x1a, 0xbd, 0x5b, 0x53, 0x1a, 0xe4, 0x05, 0x8d, 0x69, 0x91, 0x47, 0xcc, 0x15, 0xe3, 0xfd,
|
||||
0x49, 0x31, 0xde, 0x99, 0x29, 0x46, 0x9e, 0xdc, 0xab, 0xc3, 0x8d, 0x29, 0x53, 0x21, 0xce, 0x5f,
|
||||
0x16, 0x40, 0x9b, 0xd3, 0x7c, 0xc8, 0xff, 0xa3, 0x2e, 0x77, 0x61, 0xd5, 0x3c, 0x31, 0xec, 0x72,
|
||||
0x6d, 0x46, 0x50, 0x74, 0x1f, 0x2a, 0x38, 0x66, 0xfd, 0x44, 0x18, 0x79, 0xde, 0xec, 0x65, 0x32,
|
||||
0x31, 0xcd, 0x5d, 0x35, 0x2a, 0x45, 0x36, 0x29, 0x84, 0x5d, 0x12, 0xc2, 0x30, 0xf3, 0x6a, 0x80,
|
||||
0x46, 0xbb, 0x82, 0xfe, 0xcf, 0xba, 0x37, 0xbe, 0x4a, 0x43, 0x2c, 0xc8, 0x63, 0x9c, 0xe1, 0x98,
|
||||
0x4b, 0x32, 0xa3, 0xf9, 0xb4, 0x2e, 0x23, 0x53, 0x40, 0xd1, 0xc7, 0x50, 0x49, 0x55, 0x06, 0xa5,
|
||||
0xc0, 0xda, 0xfe, 0xb5, 0xa9, 0xbb, 0xd6, 0xe9, 0x27, 0x88, 0x68, 0x7c, 0xf3, 0x6e, 0x79, 0xe6,
|
||||
0x6f, 0x8f, 0x11, 0x39, 0xce, 0xbf, 0x4d, 0x53, 0x95, 0x9a, 0x7b, 0x1d, 0x37, 0xe5, 0xc4, 0xf6,
|
||||
0x9f, 0x2d, 0xc3, 0x52, 0x9b, 0x53, 0xf4, 0x2d, 0xac, 0x4f, 0x7d, 0x48, 0xb6, 0xa6, 0xca, 0x2a,
|
||||
0xbd, 0x8f, 0xce, 0xf6, 0x65, 0x88, 0xe2, 0x05, 0x25, 0xb0, 0x51, 0x7e, 0x1c, 0x6f, 0x97, 0xc3,
|
||||
0x4b, 0x20, 0x67, 0xf7, 0x0d, 0x40, 0xc5, 0x31, 0x9f, 0xc0, 0xb2, 0x7a, 0xb8, 0xae, 0x97, 0x83,
|
||||
0xa4, 0xdd, 0x71, 0x67, 0xdb, 0x8b, 0xf8, 0xa7, 0xf0, 0xd6, 0xc4, 0xf4, 0x5f, 0x80, 0xcf, 0xfd,
|
||||
0xce, 0x7b, 0xf3, 0xfd, 0x45, 0xde, 0xcf, 0xa0, 0x9a, 0x0f, 0x4e, 0xbd, 0x1c, 0x62, 0x5c, 0xce,
|
||||
0xad, 0x0b, 0x5d, 0xe3, 0x05, 0x4e, 0xb4, 0xe0, 0x8c, 0x02, 0xc7, 0xfd, 0xb3, 0x0a, 0x9c, 0xd5,
|
||||
0x05, 0xce, 0xca, 0x0f, 0xb2, 0xcf, 0x5a, 0x8f, 0x5e, 0x9e, 0xba, 0xd6, 0xab, 0x53, 0xd7, 0xfa,
|
||||
0xe3, 0xd4, 0xb5, 0x7e, 0x3a, 0x73, 0x17, 0x5e, 0x9d, 0xb9, 0x0b, 0xbf, 0x9f, 0xb9, 0x0b, 0xdf,
|
||||
0xec, 0xd2, 0x48, 0x1c, 0xf6, 0xbb, 0x7e, 0x8f, 0xc5, 0xe6, 0xbf, 0x4c, 0x50, 0x6a, 0x3c, 0x31,
|
||||
0x4c, 0x09, 0x97, 0xff, 0x9c, 0x2a, 0xea, 0xe3, 0xf6, 0xe1, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff,
|
||||
0xa1, 0xb4, 0x35, 0x16, 0x79, 0x09, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@ -1042,6 +1062,20 @@ func (m *MsgSubmitProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Summary) > 0 {
|
||||
i -= len(m.Summary)
|
||||
copy(dAtA[i:], m.Summary)
|
||||
i = encodeVarintTx(dAtA, i, uint64(len(m.Summary)))
|
||||
i--
|
||||
dAtA[i] = 0x32
|
||||
}
|
||||
if len(m.Title) > 0 {
|
||||
i -= len(m.Title)
|
||||
copy(dAtA[i:], m.Title)
|
||||
i = encodeVarintTx(dAtA, i, uint64(len(m.Title)))
|
||||
i--
|
||||
dAtA[i] = 0x2a
|
||||
}
|
||||
if len(m.Metadata) > 0 {
|
||||
i -= len(m.Metadata)
|
||||
copy(dAtA[i:], m.Metadata)
|
||||
@ -1501,6 +1535,14 @@ func (m *MsgSubmitProposal) Size() (n int) {
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
l = len(m.Title)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
l = len(m.Summary)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
@ -1831,6 +1873,70 @@ func (m *MsgSubmitProposal) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
m.Metadata = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 5:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Title = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 6:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Summary", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Summary = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipTx(dAtA[iNdEx:])
|
||||
|
||||
Loading…
Reference in New Issue
Block a user