feat(x/gov): message based proposal params (#19101)

This commit is contained in:
Julien Robert 2024-01-30 10:21:37 +01:00 committed by GitHub
parent cbc75c7c89
commit 7e4d12209b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
33 changed files with 5373 additions and 1414 deletions

View File

@ -8021,6 +8021,633 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods {
}
}
var (
md_MessageBasedParams protoreflect.MessageDescriptor
fd_MessageBasedParams_voting_period protoreflect.FieldDescriptor
fd_MessageBasedParams_quorum protoreflect.FieldDescriptor
fd_MessageBasedParams_threshold protoreflect.FieldDescriptor
fd_MessageBasedParams_veto_threshold protoreflect.FieldDescriptor
)
func init() {
file_cosmos_gov_v1_gov_proto_init()
md_MessageBasedParams = File_cosmos_gov_v1_gov_proto.Messages().ByName("MessageBasedParams")
fd_MessageBasedParams_voting_period = md_MessageBasedParams.Fields().ByName("voting_period")
fd_MessageBasedParams_quorum = md_MessageBasedParams.Fields().ByName("quorum")
fd_MessageBasedParams_threshold = md_MessageBasedParams.Fields().ByName("threshold")
fd_MessageBasedParams_veto_threshold = md_MessageBasedParams.Fields().ByName("veto_threshold")
}
var _ protoreflect.Message = (*fastReflection_MessageBasedParams)(nil)
type fastReflection_MessageBasedParams MessageBasedParams
func (x *MessageBasedParams) ProtoReflect() protoreflect.Message {
return (*fastReflection_MessageBasedParams)(x)
}
func (x *MessageBasedParams) slowProtoReflect() protoreflect.Message {
mi := &file_cosmos_gov_v1_gov_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
var _fastReflection_MessageBasedParams_messageType fastReflection_MessageBasedParams_messageType
var _ protoreflect.MessageType = fastReflection_MessageBasedParams_messageType{}
type fastReflection_MessageBasedParams_messageType struct{}
func (x fastReflection_MessageBasedParams_messageType) Zero() protoreflect.Message {
return (*fastReflection_MessageBasedParams)(nil)
}
func (x fastReflection_MessageBasedParams_messageType) New() protoreflect.Message {
return new(fastReflection_MessageBasedParams)
}
func (x fastReflection_MessageBasedParams_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_MessageBasedParams
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_MessageBasedParams) Descriptor() protoreflect.MessageDescriptor {
return md_MessageBasedParams
}
// Type returns the message type, which encapsulates both Go and protobuf
// type information. If the Go type information is not needed,
// it is recommended that the message descriptor be used instead.
func (x *fastReflection_MessageBasedParams) Type() protoreflect.MessageType {
return _fastReflection_MessageBasedParams_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_MessageBasedParams) New() protoreflect.Message {
return new(fastReflection_MessageBasedParams)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_MessageBasedParams) Interface() protoreflect.ProtoMessage {
return (*MessageBasedParams)(x)
}
// Range iterates over every populated field in an undefined order,
// calling f for each field descriptor and value encountered.
// Range returns immediately if f returns false.
// While iterating, mutating operations may only be performed
// on the current field descriptor.
func (x *fastReflection_MessageBasedParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.VotingPeriod != nil {
value := protoreflect.ValueOfMessage(x.VotingPeriod.ProtoReflect())
if !f(fd_MessageBasedParams_voting_period, value) {
return
}
}
if x.Quorum != "" {
value := protoreflect.ValueOfString(x.Quorum)
if !f(fd_MessageBasedParams_quorum, value) {
return
}
}
if x.Threshold != "" {
value := protoreflect.ValueOfString(x.Threshold)
if !f(fd_MessageBasedParams_threshold, value) {
return
}
}
if x.VetoThreshold != "" {
value := protoreflect.ValueOfString(x.VetoThreshold)
if !f(fd_MessageBasedParams_veto_threshold, value) {
return
}
}
}
// Has reports whether a field is populated.
//
// Some fields have the property of nullability where it is possible to
// distinguish between the default value of a field and whether the field
// was explicitly populated with the default value. Singular message fields,
// member fields of a oneof, and proto2 scalar fields are nullable. Such
// fields are populated only if explicitly set.
//
// In other cases (aside from the nullable cases above),
// a proto3 scalar field is populated if it contains a non-zero value, and
// a repeated field is populated if it is non-empty.
func (x *fastReflection_MessageBasedParams) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "cosmos.gov.v1.MessageBasedParams.voting_period":
return x.VotingPeriod != nil
case "cosmos.gov.v1.MessageBasedParams.quorum":
return x.Quorum != ""
case "cosmos.gov.v1.MessageBasedParams.threshold":
return x.Threshold != ""
case "cosmos.gov.v1.MessageBasedParams.veto_threshold":
return x.VetoThreshold != ""
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MessageBasedParams"))
}
panic(fmt.Errorf("message cosmos.gov.v1.MessageBasedParams does not contain field %s", fd.FullName()))
}
}
// Clear clears the field such that a subsequent Has call reports false.
//
// Clearing an extension field clears both the extension type and value
// associated with the given field number.
//
// Clear is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_MessageBasedParams) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "cosmos.gov.v1.MessageBasedParams.voting_period":
x.VotingPeriod = nil
case "cosmos.gov.v1.MessageBasedParams.quorum":
x.Quorum = ""
case "cosmos.gov.v1.MessageBasedParams.threshold":
x.Threshold = ""
case "cosmos.gov.v1.MessageBasedParams.veto_threshold":
x.VetoThreshold = ""
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MessageBasedParams"))
}
panic(fmt.Errorf("message cosmos.gov.v1.MessageBasedParams does not contain field %s", fd.FullName()))
}
}
// Get retrieves the value for a field.
//
// For unpopulated scalars, it returns the default value, where
// the default value of a bytes scalar is guaranteed to be a copy.
// For unpopulated composite types, it returns an empty, read-only view
// of the value; to obtain a mutable reference, use Mutable.
func (x *fastReflection_MessageBasedParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "cosmos.gov.v1.MessageBasedParams.voting_period":
value := x.VotingPeriod
return protoreflect.ValueOfMessage(value.ProtoReflect())
case "cosmos.gov.v1.MessageBasedParams.quorum":
value := x.Quorum
return protoreflect.ValueOfString(value)
case "cosmos.gov.v1.MessageBasedParams.threshold":
value := x.Threshold
return protoreflect.ValueOfString(value)
case "cosmos.gov.v1.MessageBasedParams.veto_threshold":
value := x.VetoThreshold
return protoreflect.ValueOfString(value)
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MessageBasedParams"))
}
panic(fmt.Errorf("message cosmos.gov.v1.MessageBasedParams does not contain field %s", descriptor.FullName()))
}
}
// Set stores the value for a field.
//
// For a field belonging to a oneof, it implicitly clears any other field
// that may be currently set within the same oneof.
// For extension fields, it implicitly stores the provided ExtensionType.
// When setting a composite type, it is unspecified whether the stored value
// aliases the source's memory in any way. If the composite value is an
// empty, read-only value, then it panics.
//
// Set is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_MessageBasedParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "cosmos.gov.v1.MessageBasedParams.voting_period":
x.VotingPeriod = value.Message().Interface().(*durationpb.Duration)
case "cosmos.gov.v1.MessageBasedParams.quorum":
x.Quorum = value.Interface().(string)
case "cosmos.gov.v1.MessageBasedParams.threshold":
x.Threshold = value.Interface().(string)
case "cosmos.gov.v1.MessageBasedParams.veto_threshold":
x.VetoThreshold = value.Interface().(string)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MessageBasedParams"))
}
panic(fmt.Errorf("message cosmos.gov.v1.MessageBasedParams does not contain field %s", fd.FullName()))
}
}
// Mutable returns a mutable reference to a composite type.
//
// If the field is unpopulated, it may allocate a composite value.
// For a field belonging to a oneof, it implicitly clears any other field
// that may be currently set within the same oneof.
// For extension fields, it implicitly stores the provided ExtensionType
// if not already stored.
// It panics if the field does not contain a composite type.
//
// Mutable is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_MessageBasedParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "cosmos.gov.v1.MessageBasedParams.voting_period":
if x.VotingPeriod == nil {
x.VotingPeriod = new(durationpb.Duration)
}
return protoreflect.ValueOfMessage(x.VotingPeriod.ProtoReflect())
case "cosmos.gov.v1.MessageBasedParams.quorum":
panic(fmt.Errorf("field quorum of message cosmos.gov.v1.MessageBasedParams is not mutable"))
case "cosmos.gov.v1.MessageBasedParams.threshold":
panic(fmt.Errorf("field threshold of message cosmos.gov.v1.MessageBasedParams is not mutable"))
case "cosmos.gov.v1.MessageBasedParams.veto_threshold":
panic(fmt.Errorf("field veto_threshold of message cosmos.gov.v1.MessageBasedParams is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MessageBasedParams"))
}
panic(fmt.Errorf("message cosmos.gov.v1.MessageBasedParams does not contain field %s", fd.FullName()))
}
}
// NewField returns a new value that is assignable to the field
// for the given descriptor. For scalars, this returns the default value.
// For lists, maps, and messages, this returns a new, empty, mutable value.
func (x *fastReflection_MessageBasedParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "cosmos.gov.v1.MessageBasedParams.voting_period":
m := new(durationpb.Duration)
return protoreflect.ValueOfMessage(m.ProtoReflect())
case "cosmos.gov.v1.MessageBasedParams.quorum":
return protoreflect.ValueOfString("")
case "cosmos.gov.v1.MessageBasedParams.threshold":
return protoreflect.ValueOfString("")
case "cosmos.gov.v1.MessageBasedParams.veto_threshold":
return protoreflect.ValueOfString("")
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MessageBasedParams"))
}
panic(fmt.Errorf("message cosmos.gov.v1.MessageBasedParams does not contain field %s", fd.FullName()))
}
}
// WhichOneof reports which field within the oneof is populated,
// returning nil if none are populated.
// It panics if the oneof descriptor does not belong to this message.
func (x *fastReflection_MessageBasedParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.MessageBasedParams", d.FullName()))
}
panic("unreachable")
}
// GetUnknown retrieves the entire list of unknown fields.
// The caller may only mutate the contents of the RawFields
// if the mutated bytes are stored back into the message with SetUnknown.
func (x *fastReflection_MessageBasedParams) GetUnknown() protoreflect.RawFields {
return x.unknownFields
}
// SetUnknown stores an entire list of unknown fields.
// The raw fields must be syntactically valid according to the wire format.
// An implementation may panic if this is not the case.
// Once stored, the caller must not mutate the content of the RawFields.
// An empty RawFields may be passed to clear the fields.
//
// SetUnknown is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_MessageBasedParams) SetUnknown(fields protoreflect.RawFields) {
x.unknownFields = fields
}
// IsValid reports whether the message is valid.
//
// An invalid message is an empty, read-only value.
//
// An invalid message often corresponds to a nil pointer of the concrete
// message type, but the details are implementation dependent.
// Validity is not part of the protobuf data model, and may not
// be preserved in marshaling or other operations.
func (x *fastReflection_MessageBasedParams) IsValid() bool {
return x != nil
}
// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations.
// This method may return nil.
//
// The returned methods type is identical to
// "google.golang.org/protobuf/runtime/protoiface".Methods.
// Consult the protoiface package documentation for details.
func (x *fastReflection_MessageBasedParams) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*MessageBasedParams)
if x == nil {
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: 0,
}
}
options := runtime.SizeInputToOptions(input)
_ = options
var n int
var l int
_ = l
if x.VotingPeriod != nil {
l = options.Size(x.VotingPeriod)
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Quorum)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Threshold)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.VetoThreshold)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if x.unknownFields != nil {
n += len(x.unknownFields)
}
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: n,
}
}
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
x := input.Message.Interface().(*MessageBasedParams)
if x == nil {
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
options := runtime.MarshalInputToOptions(input)
_ = options
size := options.Size(x)
dAtA := make([]byte, size)
i := len(dAtA)
_ = i
var l int
_ = l
if x.unknownFields != nil {
i -= len(x.unknownFields)
copy(dAtA[i:], x.unknownFields)
}
if len(x.VetoThreshold) > 0 {
i -= len(x.VetoThreshold)
copy(dAtA[i:], x.VetoThreshold)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.VetoThreshold)))
i--
dAtA[i] = 0x22
}
if len(x.Threshold) > 0 {
i -= len(x.Threshold)
copy(dAtA[i:], x.Threshold)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Threshold)))
i--
dAtA[i] = 0x1a
}
if len(x.Quorum) > 0 {
i -= len(x.Quorum)
copy(dAtA[i:], x.Quorum)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Quorum)))
i--
dAtA[i] = 0x12
}
if x.VotingPeriod != nil {
encoded, err := options.Marshal(x.VotingPeriod)
if err != nil {
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, err
}
i -= len(encoded)
copy(dAtA[i:], encoded)
i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded)))
i--
dAtA[i] = 0xa
}
if input.Buf != nil {
input.Buf = append(input.Buf, dAtA...)
} else {
input.Buf = dAtA
}
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
x := input.Message.Interface().(*MessageBasedParams)
if x == nil {
return protoiface.UnmarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Flags: input.Flags,
}, nil
}
options := runtime.UnmarshalInputToOptions(input)
_ = options
dAtA := input.Buf
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire 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++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MessageBasedParams: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MessageBasedParams: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VotingPeriod", wireType)
}
var msglen int
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++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + msglen
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
}
if x.VotingPeriod == nil {
x.VotingPeriod = &durationpb.Duration{}
}
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VotingPeriod); err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Quorum", 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.Quorum = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Threshold", 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.Threshold = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VetoThreshold", 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.VetoThreshold = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if !options.DiscardUnknown {
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
}
iNdEx += skippy
}
}
if iNdEx > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
}
return &protoiface.Methods{
NoUnkeyedLiterals: struct{}{},
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
Size: size,
Marshal: marshal,
Unmarshal: unmarshal,
Merge: nil,
CheckInitialized: nil,
}
}
// Since: cosmos-sdk 0.46
// Code generated by protoc-gen-go. DO NOT EDIT.
@ -8915,7 +9542,7 @@ type Params struct {
// Minimum deposit for a proposal to enter voting period.
MinDeposit []*v1beta1.Coin `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3" json:"min_deposit,omitempty"`
// Maximum period for Atom holders to deposit on a proposal. Initial value: 2
// Maximum period for stake holders to deposit on a proposal. Initial value: 2
// months.
MaxDepositPeriod *durationpb.Duration `protobuf:"bytes,2,opt,name=max_deposit_period,json=maxDepositPeriod,proto3" json:"max_deposit_period,omitempty"`
// Duration of the voting period.
@ -9139,6 +9766,76 @@ func (x *Params) GetOptimisticRejectedThreshold() string {
return ""
}
// MessageBasedParams defines the parameters of specific messages in a proposal.
// It is used to define the parameters of a proposal that is based on a specific message.
// Once a message has message based params, it only supports a standard proposal type.
//
// Since: x/gov v1.0.0
type MessageBasedParams struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Duration of the voting period.
VotingPeriod *durationpb.Duration `protobuf:"bytes,1,opt,name=voting_period,json=votingPeriod,proto3" json:"voting_period,omitempty"`
// Minimum percentage of total stake needed to vote for a result to be
// considered valid.
Quorum string `protobuf:"bytes,2,opt,name=quorum,proto3" json:"quorum,omitempty"`
// Minimum proportion of Yes votes for proposal to pass.
Threshold string `protobuf:"bytes,3,opt,name=threshold,proto3" json:"threshold,omitempty"`
// Minimum value of Veto votes to Total votes ratio for proposal to be
// vetoed.
VetoThreshold string `protobuf:"bytes,4,opt,name=veto_threshold,json=vetoThreshold,proto3" json:"veto_threshold,omitempty"`
}
func (x *MessageBasedParams) Reset() {
*x = MessageBasedParams{}
if protoimpl.UnsafeEnabled {
mi := &file_cosmos_gov_v1_gov_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageBasedParams) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageBasedParams) ProtoMessage() {}
// Deprecated: Use MessageBasedParams.ProtoReflect.Descriptor instead.
func (*MessageBasedParams) Descriptor() ([]byte, []int) {
return file_cosmos_gov_v1_gov_proto_rawDescGZIP(), []int{10}
}
func (x *MessageBasedParams) GetVotingPeriod() *durationpb.Duration {
if x != nil {
return x.VotingPeriod
}
return nil
}
func (x *MessageBasedParams) GetQuorum() string {
if x != nil {
return x.Quorum
}
return ""
}
func (x *MessageBasedParams) GetThreshold() string {
if x != nil {
return x.Threshold
}
return ""
}
func (x *MessageBasedParams) GetVetoThreshold() string {
if x != nil {
return x.VetoThreshold
}
return ""
}
var File_cosmos_gov_v1_gov_proto protoreflect.FileDescriptor
var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{
@ -9377,57 +10074,71 @@ var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{
0x6f, 0x6c, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63,
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x1b, 0x6f, 0x70, 0x74, 0x69, 0x6d,
0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x54, 0x68, 0x72,
0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x2a, 0xa7, 0x01, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x70, 0x6f,
0x73, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x52, 0x4f, 0x50, 0x4f,
0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,
0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53,
0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44,
0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54,
0x59, 0x50, 0x45, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x50, 0x4c, 0x45, 0x5f, 0x43, 0x48, 0x4f,
0x49, 0x43, 0x45, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41,
0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4d, 0x49, 0x53, 0x54, 0x49,
0x43, 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f,
0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x50, 0x45, 0x44, 0x49, 0x54, 0x45, 0x44, 0x10, 0x04,
0x2a, 0xfa, 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, 0x4f, 0x4e, 0x45, 0x10,
0x01, 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e,
0x5f, 0x59, 0x45, 0x53, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f,
0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x57, 0x4f, 0x10, 0x02, 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, 0x15, 0x0a, 0x11, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54,
0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x48, 0x52, 0x45, 0x45, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x56,
0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x10, 0x03, 0x12,
0x14, 0x0a, 0x10, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46,
0x4f, 0x55, 0x52, 0x10, 0x04, 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, 0x12, 0x14, 0x0a, 0x10, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49,
0x4f, 0x4e, 0x5f, 0x53, 0x50, 0x41, 0x4d, 0x10, 0x05, 0x1a, 0x02, 0x10, 0x01, 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,
0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0xe7, 0x01, 0x0a, 0x12, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x42, 0x61, 0x73, 0x65, 0x64, 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,
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, 0x02, 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, 0x03, 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, 0x04, 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,
0x2a, 0xa7, 0x01, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54, 0x79, 0x70,
0x65, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59,
0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00,
0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50,
0x45, 0x5f, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d,
0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x55,
0x4c, 0x54, 0x49, 0x50, 0x4c, 0x45, 0x5f, 0x43, 0x48, 0x4f, 0x49, 0x43, 0x45, 0x10, 0x02, 0x12,
0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45,
0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4d, 0x49, 0x53, 0x54, 0x49, 0x43, 0x10, 0x03, 0x12, 0x1b, 0x0a,
0x17, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45,
0x58, 0x50, 0x45, 0x44, 0x49, 0x54, 0x45, 0x44, 0x10, 0x04, 0x2a, 0xfa, 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, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x56,
0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x10, 0x01,
0x12, 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f,
0x54, 0x57, 0x4f, 0x10, 0x02, 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, 0x15,
0x0a, 0x11, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x48,
0x52, 0x45, 0x45, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50,
0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x56, 0x4f, 0x54,
0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x55, 0x52, 0x10, 0x04, 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, 0x12, 0x14, 0x0a,
0x10, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x50, 0x41,
0x4d, 0x10, 0x05, 0x1a, 0x02, 0x10, 0x01, 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 (
@ -9443,7 +10154,7 @@ func file_cosmos_gov_v1_gov_proto_rawDescGZIP() []byte {
}
var file_cosmos_gov_v1_gov_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
var file_cosmos_gov_v1_gov_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
var file_cosmos_gov_v1_gov_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_cosmos_gov_v1_gov_proto_goTypes = []interface{}{
(ProposalType)(0), // 0: cosmos.gov.v1.ProposalType
(VoteOption)(0), // 1: cosmos.gov.v1.VoteOption
@ -9458,37 +10169,39 @@ var file_cosmos_gov_v1_gov_proto_goTypes = []interface{}{
(*VotingParams)(nil), // 10: cosmos.gov.v1.VotingParams
(*TallyParams)(nil), // 11: cosmos.gov.v1.TallyParams
(*Params)(nil), // 12: cosmos.gov.v1.Params
(*v1beta1.Coin)(nil), // 13: cosmos.base.v1beta1.Coin
(*anypb.Any)(nil), // 14: google.protobuf.Any
(*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp
(*durationpb.Duration)(nil), // 16: google.protobuf.Duration
(*MessageBasedParams)(nil), // 13: cosmos.gov.v1.MessageBasedParams
(*v1beta1.Coin)(nil), // 14: cosmos.base.v1beta1.Coin
(*anypb.Any)(nil), // 15: google.protobuf.Any
(*timestamppb.Timestamp)(nil), // 16: google.protobuf.Timestamp
(*durationpb.Duration)(nil), // 17: google.protobuf.Duration
}
var file_cosmos_gov_v1_gov_proto_depIdxs = []int32{
1, // 0: cosmos.gov.v1.WeightedVoteOption.option:type_name -> cosmos.gov.v1.VoteOption
13, // 1: cosmos.gov.v1.Deposit.amount:type_name -> cosmos.base.v1beta1.Coin
14, // 2: cosmos.gov.v1.Proposal.messages:type_name -> google.protobuf.Any
14, // 1: cosmos.gov.v1.Deposit.amount:type_name -> cosmos.base.v1beta1.Coin
15, // 2: cosmos.gov.v1.Proposal.messages:type_name -> google.protobuf.Any
2, // 3: cosmos.gov.v1.Proposal.status:type_name -> cosmos.gov.v1.ProposalStatus
7, // 4: cosmos.gov.v1.Proposal.final_tally_result:type_name -> cosmos.gov.v1.TallyResult
15, // 5: cosmos.gov.v1.Proposal.submit_time:type_name -> google.protobuf.Timestamp
15, // 6: cosmos.gov.v1.Proposal.deposit_end_time:type_name -> google.protobuf.Timestamp
13, // 7: cosmos.gov.v1.Proposal.total_deposit:type_name -> cosmos.base.v1beta1.Coin
15, // 8: cosmos.gov.v1.Proposal.voting_start_time:type_name -> google.protobuf.Timestamp
15, // 9: cosmos.gov.v1.Proposal.voting_end_time:type_name -> google.protobuf.Timestamp
16, // 5: cosmos.gov.v1.Proposal.submit_time:type_name -> google.protobuf.Timestamp
16, // 6: cosmos.gov.v1.Proposal.deposit_end_time:type_name -> google.protobuf.Timestamp
14, // 7: cosmos.gov.v1.Proposal.total_deposit:type_name -> cosmos.base.v1beta1.Coin
16, // 8: cosmos.gov.v1.Proposal.voting_start_time:type_name -> google.protobuf.Timestamp
16, // 9: cosmos.gov.v1.Proposal.voting_end_time:type_name -> google.protobuf.Timestamp
0, // 10: cosmos.gov.v1.Proposal.proposal_type:type_name -> cosmos.gov.v1.ProposalType
3, // 11: cosmos.gov.v1.Vote.options:type_name -> cosmos.gov.v1.WeightedVoteOption
13, // 12: cosmos.gov.v1.DepositParams.min_deposit:type_name -> cosmos.base.v1beta1.Coin
16, // 13: cosmos.gov.v1.DepositParams.max_deposit_period:type_name -> google.protobuf.Duration
16, // 14: cosmos.gov.v1.VotingParams.voting_period:type_name -> google.protobuf.Duration
13, // 15: cosmos.gov.v1.Params.min_deposit:type_name -> cosmos.base.v1beta1.Coin
16, // 16: cosmos.gov.v1.Params.max_deposit_period:type_name -> google.protobuf.Duration
16, // 17: cosmos.gov.v1.Params.voting_period:type_name -> google.protobuf.Duration
16, // 18: cosmos.gov.v1.Params.expedited_voting_period:type_name -> google.protobuf.Duration
13, // 19: cosmos.gov.v1.Params.expedited_min_deposit:type_name -> cosmos.base.v1beta1.Coin
20, // [20:20] is the sub-list for method output_type
20, // [20:20] is the sub-list for method input_type
20, // [20:20] is the sub-list for extension type_name
20, // [20:20] is the sub-list for extension extendee
0, // [0:20] is the sub-list for field type_name
14, // 12: cosmos.gov.v1.DepositParams.min_deposit:type_name -> cosmos.base.v1beta1.Coin
17, // 13: cosmos.gov.v1.DepositParams.max_deposit_period:type_name -> google.protobuf.Duration
17, // 14: cosmos.gov.v1.VotingParams.voting_period:type_name -> google.protobuf.Duration
14, // 15: cosmos.gov.v1.Params.min_deposit:type_name -> cosmos.base.v1beta1.Coin
17, // 16: cosmos.gov.v1.Params.max_deposit_period:type_name -> google.protobuf.Duration
17, // 17: cosmos.gov.v1.Params.voting_period:type_name -> google.protobuf.Duration
17, // 18: cosmos.gov.v1.Params.expedited_voting_period:type_name -> google.protobuf.Duration
14, // 19: cosmos.gov.v1.Params.expedited_min_deposit:type_name -> cosmos.base.v1beta1.Coin
17, // 20: cosmos.gov.v1.MessageBasedParams.voting_period:type_name -> google.protobuf.Duration
21, // [21:21] is the sub-list for method output_type
21, // [21:21] is the sub-list for method input_type
21, // [21:21] is the sub-list for extension type_name
21, // [21:21] is the sub-list for extension extendee
0, // [0:21] is the sub-list for field type_name
}
func init() { file_cosmos_gov_v1_gov_proto_init() }
@ -9617,6 +10330,18 @@ func file_cosmos_gov_v1_gov_proto_init() {
return nil
}
}
file_cosmos_gov_v1_gov_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MessageBasedParams); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@ -9624,7 +10349,7 @@ func file_cosmos_gov_v1_gov_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_cosmos_gov_v1_gov_proto_rawDesc,
NumEnums: 3,
NumMessages: 10,
NumMessages: 11,
NumExtensions: 0,
NumServices: 0,
},

File diff suppressed because it is too large Load Diff

View File

@ -31,6 +31,7 @@ const (
Query_Deposits_FullMethodName = "/cosmos.gov.v1.Query/Deposits"
Query_TallyResult_FullMethodName = "/cosmos.gov.v1.Query/TallyResult"
Query_ProposalVoteOptions_FullMethodName = "/cosmos.gov.v1.Query/ProposalVoteOptions"
Query_MessageBasedParams_FullMethodName = "/cosmos.gov.v1.Query/MessageBasedParams"
)
// QueryClient is the client API for Query service.
@ -56,7 +57,11 @@ type QueryClient interface {
// TallyResult queries the tally of a proposal vote.
TallyResult(ctx context.Context, in *QueryTallyResultRequest, opts ...grpc.CallOption) (*QueryTallyResultResponse, error)
// ProposalVoteOptions queries the valid voting options for a proposal.
// Since: cosmos-sdk x/gov v1.0.0
ProposalVoteOptions(ctx context.Context, in *QueryProposalVoteOptionsRequest, opts ...grpc.CallOption) (*QueryProposalVoteOptionsResponse, error)
// MessageBasedParams queries the message specific governance params based on a msg url.
// Since: cosmos-sdk x/gov v1.0.0
MessageBasedParams(ctx context.Context, in *QueryMessageBasedParamsRequest, opts ...grpc.CallOption) (*QueryMessageBasedParamsResponse, error)
}
type queryClient struct {
@ -157,6 +162,15 @@ func (c *queryClient) ProposalVoteOptions(ctx context.Context, in *QueryProposal
return out, nil
}
func (c *queryClient) MessageBasedParams(ctx context.Context, in *QueryMessageBasedParamsRequest, opts ...grpc.CallOption) (*QueryMessageBasedParamsResponse, error) {
out := new(QueryMessageBasedParamsResponse)
err := c.cc.Invoke(ctx, Query_MessageBasedParams_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// QueryServer is the server API for Query service.
// All implementations must embed UnimplementedQueryServer
// for forward compatibility
@ -180,7 +194,11 @@ type QueryServer interface {
// TallyResult queries the tally of a proposal vote.
TallyResult(context.Context, *QueryTallyResultRequest) (*QueryTallyResultResponse, error)
// ProposalVoteOptions queries the valid voting options for a proposal.
// Since: cosmos-sdk x/gov v1.0.0
ProposalVoteOptions(context.Context, *QueryProposalVoteOptionsRequest) (*QueryProposalVoteOptionsResponse, error)
// MessageBasedParams queries the message specific governance params based on a msg url.
// Since: cosmos-sdk x/gov v1.0.0
MessageBasedParams(context.Context, *QueryMessageBasedParamsRequest) (*QueryMessageBasedParamsResponse, error)
mustEmbedUnimplementedQueryServer()
}
@ -218,6 +236,9 @@ func (UnimplementedQueryServer) TallyResult(context.Context, *QueryTallyResultRe
func (UnimplementedQueryServer) ProposalVoteOptions(context.Context, *QueryProposalVoteOptionsRequest) (*QueryProposalVoteOptionsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ProposalVoteOptions not implemented")
}
func (UnimplementedQueryServer) MessageBasedParams(context.Context, *QueryMessageBasedParamsRequest) (*QueryMessageBasedParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method MessageBasedParams not implemented")
}
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
@ -411,6 +432,24 @@ func _Query_ProposalVoteOptions_Handler(srv interface{}, ctx context.Context, de
return interceptor(ctx, in, info, handler)
}
func _Query_MessageBasedParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryMessageBasedParamsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).MessageBasedParams(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_MessageBasedParams_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).MessageBasedParams(ctx, req.(*QueryMessageBasedParamsRequest))
}
return interceptor(ctx, in, info, handler)
}
// Query_ServiceDesc is the grpc.ServiceDesc for Query service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@ -458,6 +497,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{
MethodName: "ProposalVoteOptions",
Handler: _Query_ProposalVoteOptions_Handler,
},
{
MethodName: "MessageBasedParams",
Handler: _Query_MessageBasedParams_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "cosmos/gov/v1/query.proto",

File diff suppressed because it is too large Load Diff

View File

@ -29,6 +29,7 @@ const (
Msg_UpdateParams_FullMethodName = "/cosmos.gov.v1.Msg/UpdateParams"
Msg_CancelProposal_FullMethodName = "/cosmos.gov.v1.Msg/CancelProposal"
Msg_SubmitMultipleChoiceProposal_FullMethodName = "/cosmos.gov.v1.Msg/SubmitMultipleChoiceProposal"
Msg_UpdateMessageParams_FullMethodName = "/cosmos.gov.v1.Msg/UpdateMessageParams"
)
// MsgClient is the client API for Msg service.
@ -59,6 +60,10 @@ type MsgClient interface {
//
// Since: x/gov 1.0.0
SubmitMultipleChoiceProposal(ctx context.Context, in *MsgSubmitMultipleChoiceProposal, opts ...grpc.CallOption) (*MsgSubmitMultipleChoiceProposalResponse, error)
// UpdateMessageParams defines a method to create or update message params when used in a governance proposal.
//
// Since: x/gov 1.0.0
UpdateMessageParams(ctx context.Context, in *MsgUpdateMessageParams, opts ...grpc.CallOption) (*MsgUpdateMessageParamsResponse, error)
}
type msgClient struct {
@ -141,6 +146,15 @@ func (c *msgClient) SubmitMultipleChoiceProposal(ctx context.Context, in *MsgSub
return out, nil
}
func (c *msgClient) UpdateMessageParams(ctx context.Context, in *MsgUpdateMessageParams, opts ...grpc.CallOption) (*MsgUpdateMessageParamsResponse, error) {
out := new(MsgUpdateMessageParamsResponse)
err := c.cc.Invoke(ctx, Msg_UpdateMessageParams_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// MsgServer is the server API for Msg service.
// All implementations must embed UnimplementedMsgServer
// for forward compatibility
@ -169,6 +183,10 @@ type MsgServer interface {
//
// Since: x/gov 1.0.0
SubmitMultipleChoiceProposal(context.Context, *MsgSubmitMultipleChoiceProposal) (*MsgSubmitMultipleChoiceProposalResponse, error)
// UpdateMessageParams defines a method to create or update message params when used in a governance proposal.
//
// Since: x/gov 1.0.0
UpdateMessageParams(context.Context, *MsgUpdateMessageParams) (*MsgUpdateMessageParamsResponse, error)
mustEmbedUnimplementedMsgServer()
}
@ -200,6 +218,9 @@ func (UnimplementedMsgServer) CancelProposal(context.Context, *MsgCancelProposal
func (UnimplementedMsgServer) SubmitMultipleChoiceProposal(context.Context, *MsgSubmitMultipleChoiceProposal) (*MsgSubmitMultipleChoiceProposalResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SubmitMultipleChoiceProposal not implemented")
}
func (UnimplementedMsgServer) UpdateMessageParams(context.Context, *MsgUpdateMessageParams) (*MsgUpdateMessageParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateMessageParams not implemented")
}
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
@ -357,6 +378,24 @@ func _Msg_SubmitMultipleChoiceProposal_Handler(srv interface{}, ctx context.Cont
return interceptor(ctx, in, info, handler)
}
func _Msg_UpdateMessageParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgUpdateMessageParams)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).UpdateMessageParams(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_UpdateMessageParams_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).UpdateMessageParams(ctx, req.(*MsgUpdateMessageParams))
}
return interceptor(ctx, in, info, handler)
}
// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@ -396,6 +435,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{
MethodName: "SubmitMultipleChoiceProposal",
Handler: _Msg_SubmitMultipleChoiceProposal_Handler,
},
{
MethodName: "UpdateMessageParams",
Handler: _Msg_UpdateMessageParams_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "cosmos/gov/v1/tx.proto",

View File

@ -263,7 +263,7 @@ message Params {
// Minimum deposit for a proposal to enter voting period.
repeated cosmos.base.v1beta1.Coin min_deposit = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
// Maximum period for Atom holders to deposit on a proposal. Initial value: 2
// Maximum period for stake holders to deposit on a proposal. Initial value: 2
// months.
google.protobuf.Duration max_deposit_period = 2 [(gogoproto.stdduration) = true];
@ -351,3 +351,24 @@ message Params {
// Since: x/gov v1.0.0
string optimistic_rejected_threshold = 19 [(cosmos_proto.scalar) = "cosmos.Dec"];
}
// MessageBasedParams defines the parameters of specific messages in a proposal.
// It is used to define the parameters of a proposal that is based on a specific message.
// Once a message has message based params, it only supports a standard proposal type.
//
// Since: x/gov v1.0.0
message MessageBasedParams {
// Duration of the voting period.
google.protobuf.Duration voting_period = 1 [(gogoproto.stdduration) = true];
// Minimum percentage of total stake needed to vote for a result to be
// considered valid.
string quorum = 2 [(cosmos_proto.scalar) = "cosmos.Dec"];
// Minimum proportion of Yes votes for proposal to pass.
string threshold = 3 [(cosmos_proto.scalar) = "cosmos.Dec"];
// Minimum value of Veto votes to Total votes ratio for proposal to be
// vetoed.
string veto_threshold = 4 [(cosmos_proto.scalar) = "cosmos.Dec"];
}

View File

@ -38,7 +38,7 @@ service Query {
// Params queries all parameters of the gov module.
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/cosmos/gov/v1/params/{params_type}";
option (google.api.http).get = "/cosmos/gov/v1/params";
}
// Deposit queries single deposit information based on proposalID, depositAddr.
@ -57,9 +57,16 @@ service Query {
}
// ProposalVoteOptions queries the valid voting options for a proposal.
// Since: cosmos-sdk x/gov v1.0.0
rpc ProposalVoteOptions(QueryProposalVoteOptionsRequest) returns (QueryProposalVoteOptionsResponse) {
option (google.api.http).get = "/cosmos/gov/v1/proposals/{proposal_id}/vote_options";
}
// MessageBasedParams queries the message specific governance params based on a msg url.
// Since: cosmos-sdk x/gov v1.0.0
rpc MessageBasedParams(QueryMessageBasedParamsRequest) returns (QueryMessageBasedParamsResponse) {
option (google.api.http).get = "/cosmos/gov/v1/params/{msg_url}";
}
}
// QueryConstitutionRequest is the request type for the Query/Constitution RPC method
@ -144,7 +151,9 @@ message QueryVotesResponse {
message QueryParamsRequest {
// params_type defines which parameters to query for, can be one of "voting",
// "tallying" or "deposit".
string params_type = 1;
// Deprecated: all params are stored in Params.
string params_type = 1 [deprecated = true];
;
}
// QueryParamsResponse is the response type for the Query/Params RPC method.
@ -219,4 +228,18 @@ message QueryProposalVoteOptionsRequest {
message QueryProposalVoteOptionsResponse {
// vote_options defines the valid voting options for a proposal.
ProposalVoteOptions vote_options = 1;
}
// QueryMessageBasedParamsRequest is the request type for the Query/MessageBasedParams RPC method.
//
// Since: x/gov 1.0.0
message QueryMessageBasedParamsRequest {
string msg_url = 1;
}
// QueryMessageBasedParamsResponse is the response for the Query/MessageBasedParams RPC method.
//
// Since: x/gov 1.0.0
message QueryMessageBasedParamsResponse {
MessageBasedParams params = 1;
}

View File

@ -48,6 +48,11 @@ service Msg {
//
// Since: x/gov 1.0.0
rpc SubmitMultipleChoiceProposal(MsgSubmitMultipleChoiceProposal) returns (MsgSubmitMultipleChoiceProposalResponse);
// UpdateMessageParams defines a method to create or update message params when used in a governance proposal.
//
// Since: x/gov 1.0.0
rpc UpdateMessageParams(MsgUpdateMessageParams) returns (MsgUpdateMessageParamsResponse);
}
// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary
@ -263,3 +268,19 @@ message MsgSubmitMultipleChoiceProposalResponse {
// proposal_id defines the unique id of the proposal.
uint64 proposal_id = 1;
}
// MsgUpdateMessageParams defines the Msg/UpdateMessageParams response type.
//
// Since: x/gov 1.0.0
message MsgUpdateMessageParams {
option (cosmos.msg.v1.signer) = "authority";
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string msg_url = 2;
MessageBasedParams params = 3;
}
// MsgUpdateMessageParamsResponse defines the Msg/UpdateMessageParams response type.
//
// Since: x/gov 1.0.0
message MsgUpdateMessageParamsResponse {}

View File

@ -1,415 +0,0 @@
package gov
import (
"fmt"
"github.com/cosmos/gogoproto/proto"
"cosmossdk.io/math"
v1 "cosmossdk.io/x/gov/types/v1"
"github.com/cosmos/cosmos-sdk/testutil"
grpctypes "github.com/cosmos/cosmos-sdk/types/grpc"
)
func (s *E2ETestSuite) TestGetProposalGRPC() {
val := s.network.GetValidators()[0]
testCases := []struct {
name string
url string
expErr bool
}{
{
"empty proposal",
fmt.Sprintf("%s/cosmos/gov/v1/proposals/%s", val.GetAPIAddress(), ""),
true,
},
{
"get non existing proposal",
fmt.Sprintf("%s/cosmos/gov/v1/proposals/%s", val.GetAPIAddress(), "10"),
true,
},
{
"get proposal with id",
fmt.Sprintf("%s/cosmos/gov/v1/proposals/%s", val.GetAPIAddress(), "1"),
false,
},
}
for _, tc := range testCases {
tc := tc
s.Run(tc.name, func() {
resp, err := testutil.GetRequest(tc.url)
s.Require().NoError(err)
var proposal v1.QueryProposalResponse
err = val.GetClientCtx().Codec.UnmarshalJSON(resp, &proposal)
if tc.expErr {
s.Require().Error(err)
} else {
s.Require().NoError(err)
s.Require().NotNil(proposal.Proposal)
}
})
}
}
func (s *E2ETestSuite) TestGetProposalsGRPC() {
val := s.network.GetValidators()[0]
testCases := []struct {
name string
url string
headers map[string]string
wantNumProposals int
expErr bool
}{
{
"get proposals with height 1",
fmt.Sprintf("%s/cosmos/gov/v1/proposals", val.GetAPIAddress()),
map[string]string{
grpctypes.GRPCBlockHeightHeader: "1",
},
0,
true,
},
{
"valid request",
fmt.Sprintf("%s/cosmos/gov/v1/proposals", val.GetAPIAddress()),
map[string]string{},
4,
false,
},
{
"valid request with filter by status",
fmt.Sprintf("%s/cosmos/gov/v1/proposals?proposal_status=1", val.GetAPIAddress()),
map[string]string{},
1,
false,
},
}
for _, tc := range testCases {
tc := tc
s.Run(tc.name, func() {
resp, err := testutil.GetRequestWithHeaders(tc.url, tc.headers)
s.Require().NoError(err)
var proposals v1.QueryProposalsResponse
err = val.GetClientCtx().Codec.UnmarshalJSON(resp, &proposals)
if tc.expErr {
s.Require().Empty(proposals.Proposals)
} else {
s.Require().NoError(err)
s.Require().Len(proposals.Proposals, tc.wantNumProposals)
}
})
}
}
func (s *E2ETestSuite) TestGetProposalVoteGRPC() {
val := s.network.GetValidators()[0]
voterAddressBech32 := val.GetAddress().String()
testCases := []struct {
name string
url string
expErr bool
expVoteOptions v1.WeightedVoteOptions
}{
{
"empty proposal",
fmt.Sprintf("%s/cosmos/gov/v1/proposals/%s/votes/%s", val.GetAPIAddress(), "", voterAddressBech32),
true,
v1.NewNonSplitVoteOption(v1.OptionYes),
},
{
"get non existing proposal",
fmt.Sprintf("%s/cosmos/gov/v1/proposals/%s/votes/%s", val.GetAPIAddress(), "10", voterAddressBech32),
true,
v1.NewNonSplitVoteOption(v1.OptionYes),
},
{
"get proposal with wrong voter address",
fmt.Sprintf("%s/cosmos/gov/v1/proposals/%s/votes/%s", val.GetAPIAddress(), "1", "wrongVoterAddress"),
true,
v1.NewNonSplitVoteOption(v1.OptionYes),
},
{
"get proposal with id",
fmt.Sprintf("%s/cosmos/gov/v1/proposals/%s/votes/%s", val.GetAPIAddress(), "1", voterAddressBech32),
false,
v1.NewNonSplitVoteOption(v1.OptionYes),
},
{
"get proposal with id for split vote",
fmt.Sprintf("%s/cosmos/gov/v1/proposals/%s/votes/%s", val.GetAPIAddress(), "3", voterAddressBech32),
false,
v1.WeightedVoteOptions{
&v1.WeightedVoteOption{Option: v1.OptionYes, Weight: math.LegacyNewDecWithPrec(60, 2).String()},
&v1.WeightedVoteOption{Option: v1.OptionNo, Weight: math.LegacyNewDecWithPrec(30, 2).String()},
&v1.WeightedVoteOption{Option: v1.OptionAbstain, Weight: math.LegacyNewDecWithPrec(5, 2).String()},
&v1.WeightedVoteOption{Option: v1.OptionNoWithVeto, Weight: math.LegacyNewDecWithPrec(5, 2).String()},
},
},
}
for _, tc := range testCases {
tc := tc
s.Run(tc.name, func() {
resp, err := testutil.GetRequest(tc.url)
s.Require().NoError(err)
var vote v1.QueryVoteResponse
err = val.GetClientCtx().Codec.UnmarshalJSON(resp, &vote)
if tc.expErr {
s.Require().Error(err)
} else {
s.Require().NoError(err)
s.Require().NotEmpty(vote.Vote)
s.Require().Equal(len(vote.Vote.Options), len(tc.expVoteOptions))
for i, option := range tc.expVoteOptions {
s.Require().Equal(option.Option, vote.Vote.Options[i].Option)
s.Require().Equal(option.Weight, vote.Vote.Options[i].Weight)
}
}
})
}
}
func (s *E2ETestSuite) TestGetProposalVotesGRPC() {
val := s.network.GetValidators()[0]
testCases := []struct {
name string
url string
expErr bool
}{
{
"votes with empty proposal id",
fmt.Sprintf("%s/cosmos/gov/v1/proposals/%s/votes", val.GetAPIAddress(), ""),
true,
},
{
"get votes with valid id",
fmt.Sprintf("%s/cosmos/gov/v1/proposals/%s/votes", val.GetAPIAddress(), "1"),
false,
},
}
for _, tc := range testCases {
tc := tc
s.Run(tc.name, func() {
resp, err := testutil.GetRequest(tc.url)
s.Require().NoError(err)
var votes v1.QueryVotesResponse
err = val.GetClientCtx().Codec.UnmarshalJSON(resp, &votes)
if tc.expErr {
s.Require().Error(err)
} else {
s.Require().NoError(err)
s.Require().Len(votes.Votes, 1)
}
})
}
}
func (s *E2ETestSuite) TestGetProposalDepositGRPC() {
val := s.network.GetValidators()[0]
testCases := []struct {
name string
url string
expErr bool
}{
{
"get deposit with empty proposal id",
fmt.Sprintf("%s/cosmos/gov/v1/proposals/%s/deposits/%s", val.GetAPIAddress(), "", val.GetAddress().String()),
true,
},
{
"get deposit of non existing proposal",
fmt.Sprintf("%s/cosmos/gov/v1/proposals/%s/deposits/%s", val.GetAPIAddress(), "10", val.GetAddress().String()),
true,
},
{
"get deposit with wrong depositer address",
fmt.Sprintf("%s/cosmos/gov/v1/proposals/%s/deposits/%s", val.GetAPIAddress(), "1", "wrongDepositerAddress"),
true,
},
{
"get deposit valid request",
fmt.Sprintf("%s/cosmos/gov/v1/proposals/%s/deposits/%s", val.GetAPIAddress(), "1", val.GetAddress().String()),
false,
},
}
for _, tc := range testCases {
tc := tc
s.Run(tc.name, func() {
resp, err := testutil.GetRequest(tc.url)
s.Require().NoError(err)
var deposit v1.QueryDepositResponse
err = val.GetClientCtx().Codec.UnmarshalJSON(resp, &deposit)
if tc.expErr {
s.Require().Error(err)
} else {
s.Require().NoError(err)
s.Require().NotEmpty(deposit.Deposit)
}
})
}
}
func (s *E2ETestSuite) TestGetProposalDepositsGRPC() {
val := s.network.GetValidators()[0]
testCases := []struct {
name string
url string
expErr bool
}{
{
"get deposits with empty proposal id",
fmt.Sprintf("%s/cosmos/gov/v1/proposals/%s/deposits", val.GetAPIAddress(), ""),
true,
},
{
"valid request",
fmt.Sprintf("%s/cosmos/gov/v1/proposals/%s/deposits", val.GetAPIAddress(), "1"),
false,
},
}
for _, tc := range testCases {
tc := tc
s.Run(tc.name, func() {
resp, err := testutil.GetRequest(tc.url)
s.Require().NoError(err)
var deposits v1.QueryDepositsResponse
err = val.GetClientCtx().Codec.UnmarshalJSON(resp, &deposits)
if tc.expErr {
s.Require().Error(err)
} else {
s.Require().NoError(err)
s.Require().Len(deposits.Deposits, 1)
s.Require().NotEmpty(deposits.Deposits[0])
}
})
}
}
func (s *E2ETestSuite) TestGetTallyGRPC() {
val := s.network.GetValidators()[0]
testCases := []struct {
name string
url string
expErr bool
}{
{
"get tally with no proposal id",
fmt.Sprintf("%s/cosmos/gov/v1/proposals/%s/tally", val.GetAPIAddress(), ""),
true,
},
{
"get tally with non existing proposal",
fmt.Sprintf("%s/cosmos/gov/v1/proposals/%s/tally", val.GetAPIAddress(), "10"),
true,
},
{
"get tally valid request",
fmt.Sprintf("%s/cosmos/gov/v1/proposals/%s/tally", val.GetAPIAddress(), "1"),
false,
},
}
for _, tc := range testCases {
tc := tc
s.Run(tc.name, func() {
resp, err := testutil.GetRequest(tc.url)
s.Require().NoError(err)
var tally v1.QueryTallyResultResponse
err = val.GetClientCtx().Codec.UnmarshalJSON(resp, &tally)
if tc.expErr {
s.Require().Error(err)
} else {
s.Require().NoError(err)
s.Require().NotEmpty(tally.Tally)
}
})
}
}
func (s *E2ETestSuite) TestGetParamsGRPC() {
val := s.network.GetValidators()[0]
params := v1.DefaultParams()
dp := v1.NewDepositParams(params.MinDeposit, params.MaxDepositPeriod) //nolint:staticcheck // we use deprecated gov commands here, but we don't want to remove them
vp := v1.NewVotingParams(params.VotingPeriod) //nolint:staticcheck // we use deprecated gov commands here, but we don't want to remove them
tp := v1.NewTallyParams(params.Quorum, params.Threshold, params.VetoThreshold) //nolint:staticcheck // we use deprecated gov commands here, but we don't want to remove them
testCases := []struct {
name string
url string
expErr bool
respType proto.Message
expectResp proto.Message
}{
{
"request params with empty params type",
fmt.Sprintf("%s/cosmos/gov/v1/params/%s", val.GetAPIAddress(), ""),
true, nil, nil,
},
{
"get deposit params",
fmt.Sprintf("%s/cosmos/gov/v1/params/%s", val.GetAPIAddress(), v1.ParamDeposit),
false,
&v1.QueryParamsResponse{},
&v1.QueryParamsResponse{DepositParams: &dp, Params: &params},
},
{
"get vote params",
fmt.Sprintf("%s/cosmos/gov/v1/params/%s", val.GetAPIAddress(), v1.ParamVoting),
false,
&v1.QueryParamsResponse{},
&v1.QueryParamsResponse{VotingParams: &vp, Params: &params},
},
{
"get tally params",
fmt.Sprintf("%s/cosmos/gov/v1/params/%s", val.GetAPIAddress(), v1.ParamTallying),
false,
&v1.QueryParamsResponse{},
&v1.QueryParamsResponse{TallyParams: &tp, Params: &params},
},
}
for _, tc := range testCases {
tc := tc
s.Run(tc.name, func() {
resp, err := testutil.GetRequest(tc.url)
s.Require().NoError(err)
err = val.GetClientCtx().Codec.UnmarshalJSON(resp, tc.respType)
if tc.expErr {
s.Require().Error(err)
} else {
s.Require().NoError(err)
s.Require().Equal(tc.expectResp.String(), tc.respType.String())
}
})
}
}

View File

@ -11,7 +11,6 @@ import (
sdkmath "cosmossdk.io/math"
"cosmossdk.io/x/distribution/client/cli"
minttypes "cosmossdk.io/x/mint/types"
"github.com/cosmos/cosmos-sdk/client"

View File

@ -13,7 +13,6 @@ import (
"cosmossdk.io/x/evidence"
"cosmossdk.io/x/evidence/exported"
"cosmossdk.io/x/evidence/keeper"
"cosmossdk.io/x/evidence/types"
"github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"

View File

@ -35,12 +35,11 @@ import (
cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
"github.com/cosmos/cosmos-sdk/runtime"
"github.com/cosmos/cosmos-sdk/tests/integration/staking"
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
sdk "github.com/cosmos/cosmos-sdk/types"
moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
"github.com/cosmos/cosmos-sdk/tests/integration/staking"
)
type SimTestSuite struct {

View File

@ -11,31 +11,29 @@ import (
"cosmossdk.io/core/header"
"cosmossdk.io/depinject"
"cosmossdk.io/log"
_ "cosmossdk.io/x/auth" // import as blank for app wiring
authkeeper "cosmossdk.io/x/auth/keeper"
_ "cosmossdk.io/x/auth/tx/config" // import as blank for app wiring
"cosmossdk.io/x/authz"
authzkeeper "cosmossdk.io/x/authz/keeper"
_ "cosmossdk.io/x/authz/module" // import as blank for app wiring
"cosmossdk.io/x/authz/simulation"
_ "cosmossdk.io/x/bank" // import as blank for app wiring
bankkeeper "cosmossdk.io/x/bank/keeper"
banktestutil "cosmossdk.io/x/bank/testutil"
banktypes "cosmossdk.io/x/bank/types"
_ "cosmossdk.io/x/gov" // import as blank for app wiring
_ "cosmossdk.io/x/mint" // import as blank for app wiring
_ "cosmossdk.io/x/staking" // import as blank for app wiring
_ "cosmossdk.io/x/auth" // import as blank for app wiring
_ "cosmossdk.io/x/auth/tx/config" // import as blank for app wiring
_ "cosmossdk.io/x/authz/module" // import as blank for app wiring
_ "cosmossdk.io/x/bank" // import as blank for app wiring
_ "cosmossdk.io/x/gov" // import as blank for app wiring
_ "cosmossdk.io/x/mint" // import as blank for app wiring
_ "cosmossdk.io/x/staking" // import as blank for app wiring
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
"github.com/cosmos/cosmos-sdk/runtime"
"github.com/cosmos/cosmos-sdk/testutil/configurator"
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
sdk "github.com/cosmos/cosmos-sdk/types"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
"github.com/cosmos/cosmos-sdk/testutil/configurator"
_ "github.com/cosmos/cosmos-sdk/x/consensus" // import as blank for app wiring
_ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring
)

View File

@ -27,6 +27,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Features
* [#19101](https://github.com/cosmos/cosmos-sdk/pull/19101) Add message based params configuration.
* [#18532](https://github.com/cosmos/cosmos-sdk/pull/18532) Add SPAM vote to proposals.
* [#18532](https://github.com/cosmos/cosmos-sdk/pull/18532) Add proposal types to proposals.
* [#18620](https://github.com/cosmos/cosmos-sdk/pull/18620) Add optimistic proposals.
@ -39,10 +40,24 @@ Ref: https://keepachangelog.com/en/1.0.0/
* [#18445](https://github.com/cosmos/cosmos-sdk/pull/18445) Extend gov config.
* [#18532](https://github.com/cosmos/cosmos-sdk/pull/18532) Repurpose `govcliutils.NormalizeProposalType` to work for gov v1 proposal types.
### State Machine Breaking
* [#19101](https://github.com/cosmos/cosmos-sdk/pull/19101) Add message based params configuration.
* [#18532](https://github.com/cosmos/cosmos-sdk/pull/18532) Add SPAM vote to proposals.
* [#18532](https://github.com/cosmos/cosmos-sdk/pull/18532) Add proposal types to proposals.
* [#18620](https://github.com/cosmos/cosmos-sdk/pull/18620) Add optimistic proposals.
* [#18762](https://github.com/cosmos/cosmos-sdk/pull/18762) Add multiple choice proposals.
* [#18856](https://github.com/cosmos/cosmos-sdk/pull/18856) Add `ProposalCancelMaxPeriod` parameters.
### Client Breaking Changes
* [#19101](https://github.com/cosmos/cosmos-sdk/pull/19101) Querying specific params types was deprecated in gov/v1 and has been removed. gov/v1beta1 rest unchanged.
### API Breaking Changes
* [#18532](https://github.com/cosmos/cosmos-sdk/pull/18532) All functions that were taking an expedited bool parameter now take a `ProposalType` parameter instead.
* [#17496](https://github.com/cosmos/cosmos-sdk/pull/17496) in `x/gov/types/v1beta1/vote.go` `NewVote` was removed, constructing the struct is required for this type.
* [#19101](https://github.com/cosmos/cosmos-sdk/pull/19101) Move `QueryProposalVotesParams` and `QueryVoteParams` from the `types/v1` package to `utils` and remove unused `querier.go` file.
### Deprecated

View File

@ -625,6 +625,23 @@ The governance module contains the following parameters:
modules. If only a subset of parameters are desired to be changed, only they need
to be included and not the entire parameter object structure.
### Message Based Parameters
In addition to the parameters above, the governance module can also be configured to have different parameters for a given proposal message.
| Key | Type | Example |
| ------------------------------- | ----------------- | --------------------------------------- |
| voting_period | string (time ns) | "172800000000000" (17280s) |
| quorum | string (dec) | "0.334000000000000000" |
| threshold | string (dec) | "0.500000000000000000" |
| veto | string (dec) | "0.334000000000000000" |
If configured, these params will take precedence over the global params for a specific proposal.
:::warning
Currently, messaged based parameters limits the number of messages that can be included in a proposal to 1 if a messaged based parameter is configured.
:::
## Client
### CLI
@ -691,26 +708,6 @@ pagination:
total: "0"
```
##### param
The `param` command allows users to query a given parameter for the `gov` module.
```bash
simd query gov param [param-type] [flags]
```
Example:
```bash
simd query gov param voting
```
Example Output:
```bash
voting_period: "172800000000000"
```
##### params
The `params` command allows users to query all parameters for the `gov` module.
@ -728,11 +725,6 @@ simd query gov params
Example Output:
```bash
deposit_params:
max_deposit_period: 172800s
min_deposit:
- amount: "10000000"
denom: stake
params:
expedited_min_deposit:
- amount: "50000000"
@ -749,12 +741,6 @@ params:
threshold: "0.500000000000000000"
veto_threshold: "0.334000000000000000"
voting_period: 172800s
tally_params:
quorum: "0.334000000000000000"
threshold: "0.500000000000000000"
veto_threshold: "0.334000000000000000"
voting_params:
voting_period: 172800s
```
##### proposal
@ -1514,8 +1500,6 @@ Example Output:
The `Params` endpoint allows users to query all parameters for the `gov` module.
<!-- TODO: #10197 Querying governance params outputs nil values -->
Using legacy v1beta1:
```bash

View File

@ -18,10 +18,14 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
{
RpcMethod: "Params",
Use: "params",
Short: "Query the parameters of the governance process",
Long: "Query the parameters of the governance process. Specify specific param types (voting|tallying|deposit) to filter results.",
Short: "Query the parameters of the governance module",
},
{
RpcMethod: "MessageBasedParams",
Use: "params-by-msg-url [msg-url]",
Short: "Query the governance parameters of specific message",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
{ProtoField: "params_type", Optional: true},
{ProtoField: "msg_url"},
},
},
{
@ -139,6 +143,17 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "params"}},
GovProposal: true,
},
{
RpcMethod: "UpdateMessageParams",
Use: "update-params-msg-url-params [msg-url] [msg-params]",
Short: "Submit a proposal to update gov module message params. Note: the entire params must be provided.",
Example: fmt.Sprintf(`%s tx gov update-msg-params-proposal [msg-url]'{ params }'`, version.AppName),
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
{ProtoField: "msg_url"},
{ProtoField: "params"},
},
GovProposal: true,
},
},
EnhanceCustomCommand: true, // We still have manual commands in gov that we want to keep
},

View File

@ -34,10 +34,17 @@ func (p Proposer) String() string {
return fmt.Sprintf("Proposal with ID %d was proposed by %s", p.ProposalID, p.Proposer)
}
// QueryProposalVotesParams is used to query 'custom/gov/votes'.
type QueryProposalVotesParams struct {
ProposalID uint64
Page int
Limit int
}
// QueryVotesByTxQuery will query for votes via a direct txs tags query. It
// will fetch and build votes directly from the returned txs and returns a JSON
// marshaled result or any error that occurred.
func QueryVotesByTxQuery(clientCtx client.Context, params v1.QueryProposalVotesParams) ([]byte, error) {
func QueryVotesByTxQuery(clientCtx client.Context, params QueryProposalVotesParams) ([]byte, error) {
var (
votes []*v1.Vote
nextTxPage = defaultPage
@ -105,8 +112,14 @@ func QueryVotesByTxQuery(clientCtx client.Context, params v1.QueryProposalVotesP
return bz, nil
}
// QueryVoteParams is used to query 'custom/gov/vote'
type QueryVoteParams struct {
ProposalID uint64
Voter sdk.AccAddress
}
// QueryVoteByTxQuery will query for a single vote via a direct txs tags query.
func QueryVoteByTxQuery(clientCtx client.Context, params v1.QueryVoteParams) ([]byte, error) {
func QueryVoteByTxQuery(clientCtx client.Context, params QueryVoteParams) ([]byte, error) {
q1 := fmt.Sprintf("%s.%s='%d'", types.EventTypeProposalVote, types.AttributeKeyProposalID, params.ProposalID)
q2 := fmt.Sprintf("%s.%s='%s'", sdk.EventTypeMessage, sdk.AttributeKeySender, params.Voter.String())
q3 := fmt.Sprintf("%s.%s='%s'", sdk.EventTypeMessage, sdk.AttributeKeySender, params.Voter)

View File

@ -160,7 +160,7 @@ func TestGetPaginatedVotes(t *testing.T) {
marshaled[i] = tx
}
params := v1.NewQueryProposalVotesParams(0, tc.page, tc.limit)
params := utils.QueryProposalVotesParams{0, tc.page, tc.limit}
votesData, err := utils.QueryVotesByTxQuery(clientCtx, params)
require.NoError(t, err)
votes := []v1.Vote{}

View File

@ -214,31 +214,38 @@ func (q queryServer) Params(ctx context.Context, req *v1.QueryParamsRequest) (*v
params, err := q.k.Params.Get(ctx)
if err != nil {
return nil, err
return nil, status.Error(codes.Internal, err.Error())
}
response := &v1.QueryParamsResponse{}
//nolint:staticcheck // needed for legacy parameters
switch req.ParamsType {
case v1.ParamDeposit:
depositParams := v1.NewDepositParams(params.MinDeposit, params.MaxDepositPeriod)
response.DepositParams = &depositParams
return &v1.QueryParamsResponse{Params: &params}, nil
}
case v1.ParamVoting:
votingParams := v1.NewVotingParams(params.VotingPeriod)
response.VotingParams = &votingParams
// MessageBasedParams queries params for a specific message
func (q queryServer) MessageBasedParams(ctx context.Context, req *v1.QueryMessageBasedParamsRequest) (*v1.QueryMessageBasedParamsResponse, error) {
if req == nil || req.MsgUrl == "" {
return nil, status.Error(codes.InvalidArgument, "invalid request")
}
case v1.ParamTallying:
tallyParams := v1.NewTallyParams(params.Quorum, params.Threshold, params.VetoThreshold)
response.TallyParams = &tallyParams
default:
if len(req.ParamsType) > 0 {
return nil, status.Errorf(codes.InvalidArgument, "unknown params type: %s", req.ParamsType)
params, err := q.k.MessageBasedParams.Get(ctx, req.MsgUrl)
if err == nil {
return &v1.QueryMessageBasedParamsResponse{Params: &params}, nil
}
if errors.IsOf(err, collections.ErrNotFound) {
resp, err := q.Params(ctx, &v1.QueryParamsRequest{})
if err != nil {
return nil, status.Error(codes.Internal, err.Error())
}
}
response.Params = &params
return response, nil
return &v1.QueryMessageBasedParamsResponse{Params: &v1.MessageBasedParams{
VotingPeriod: resp.Params.VotingPeriod,
Quorum: resp.Params.Quorum,
Threshold: resp.Params.Threshold,
VetoThreshold: resp.Params.VetoThreshold,
}}, nil
}
return nil, status.Error(codes.Internal, err.Error())
}
// Deposit queries single deposit information based on proposalID, depositAddr.
@ -417,8 +424,11 @@ func (q legacyQueryServer) Votes(ctx context.Context, req *v1beta1.QueryVotesReq
}, nil
}
//nolint:staticcheck // this is needed for legacy param support
func (q legacyQueryServer) Params(ctx context.Context, req *v1beta1.QueryParamsRequest) (*v1beta1.QueryParamsResponse, error) {
if req == nil {
return nil, status.Error(codes.InvalidArgument, "invalid request")
}
resp, err := q.qs.Params(ctx, &v1.QueryParamsRequest{
ParamsType: req.ParamsType,
})
@ -427,35 +437,29 @@ func (q legacyQueryServer) Params(ctx context.Context, req *v1beta1.QueryParamsR
}
response := &v1beta1.QueryParamsResponse{}
if resp.DepositParams == nil && resp.VotingParams == nil && resp.TallyParams == nil {
return nil, status.Errorf(codes.InvalidArgument, "%s is not a valid parameter type", req.ParamsType)
}
if resp.DepositParams != nil {
minDeposit := sdk.NewCoins(resp.DepositParams.MinDeposit...)
response.DepositParams = v1beta1.NewDepositParams(minDeposit, *resp.DepositParams.MaxDepositPeriod)
}
if resp.VotingParams != nil {
response.VotingParams = v1beta1.NewVotingParams(*resp.VotingParams.VotingPeriod)
}
if resp.TallyParams != nil {
quorum, err := sdkmath.LegacyNewDecFromStr(resp.TallyParams.Quorum)
switch req.ParamsType {
case v1beta1.ParamDeposit:
minDeposit := sdk.NewCoins(resp.Params.MinDeposit...)
response.DepositParams = v1beta1.NewDepositParams(minDeposit, *resp.Params.MaxDepositPeriod)
case v1beta1.ParamVoting:
response.VotingParams = v1beta1.NewVotingParams(*resp.Params.VotingPeriod)
case v1beta1.ParamTallying:
quorum, err := sdkmath.LegacyNewDecFromStr(resp.Params.Quorum)
if err != nil {
return nil, err
}
threshold, err := sdkmath.LegacyNewDecFromStr(resp.TallyParams.Threshold)
threshold, err := sdkmath.LegacyNewDecFromStr(resp.Params.Threshold)
if err != nil {
return nil, err
}
vetoThreshold, err := sdkmath.LegacyNewDecFromStr(resp.TallyParams.VetoThreshold)
vetoThreshold, err := sdkmath.LegacyNewDecFromStr(resp.Params.VetoThreshold)
if err != nil {
return nil, err
}
response.TallyParams = v1beta1.NewTallyParams(quorum, threshold, vetoThreshold)
default:
return nil, status.Errorf(codes.InvalidArgument, "%s is not a valid parameter type", req.ParamsType)
}
return response, nil

View File

@ -898,82 +898,31 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryVotes() {
func (suite *KeeperTestSuite) TestGRPCQueryParams() {
queryClient := suite.queryClient
params := v1.DefaultParams()
var (
req *v1.QueryParamsRequest
expRes *v1.QueryParamsResponse
)
testCases := []struct {
msg string
malleate func()
expPass bool
msg string
req v1.QueryParamsRequest
expPass bool
}{
{
"empty request (valid and returns all params)",
func() {
req = &v1.QueryParamsRequest{}
},
v1.QueryParamsRequest{},
true,
},
{
"deposit params request",
func() {
req = &v1.QueryParamsRequest{ParamsType: v1.ParamDeposit}
depositParams := v1.NewDepositParams(params.MinDeposit, params.MaxDepositPeriod) //nolint:staticcheck // SA1019: params.MinDeposit is deprecated: Use MinInitialDeposit instead.
expRes = &v1.QueryParamsResponse{
DepositParams: &depositParams,
}
},
"invalid request (but passes as params type is deprecated)",
v1.QueryParamsRequest{ParamsType: "wrongPath"},
true,
},
{
"voting params request",
func() {
req = &v1.QueryParamsRequest{ParamsType: v1.ParamVoting}
votingParams := v1.NewVotingParams(params.VotingPeriod) //nolint:staticcheck // SA1019: params.VotingPeriod is deprecated: Use VotingPeriod instead.
expRes = &v1.QueryParamsResponse{
VotingParams: &votingParams,
}
},
true,
},
{
"tally params request",
func() {
req = &v1.QueryParamsRequest{ParamsType: v1.ParamTallying}
tallyParams := v1.NewTallyParams(params.Quorum, params.Threshold, params.VetoThreshold) //nolint:staticcheck // SA1019: params.Quorum is deprecated: Use Quorum instead.
expRes = &v1.QueryParamsResponse{
TallyParams: &tallyParams,
}
},
true,
},
{
"invalid request",
func() {
req = &v1.QueryParamsRequest{ParamsType: "wrongPath"}
expRes = &v1.QueryParamsResponse{}
},
false,
},
}
for _, tc := range testCases {
suite.Run(fmt.Sprintf("Case %s", tc.msg), func() {
if tc.malleate != nil {
tc.malleate()
}
tc := tc
params, err := queryClient.Params(gocontext.Background(), req)
suite.Run(fmt.Sprintf("Case %s", tc.msg), func() {
params, err := queryClient.Params(gocontext.Background(), &tc.req)
if tc.expPass {
suite.Require().NoError(err)
suite.Require().Equal(expRes.GetDepositParams(), params.GetDepositParams()) //nolint:staticcheck // SA1019: params.MinDeposit is deprecated: Use MinInitialDeposit instead.
suite.Require().Equal(expRes.GetVotingParams(), params.GetVotingParams()) //nolint:staticcheck // SA1019: params.VotingPeriod is deprecated: Use VotingPeriod instead.
suite.Require().Equal(expRes.GetTallyParams(), params.GetTallyParams()) //nolint:staticcheck // SA1019: params.Quorum is deprecated: Use Quorum instead.
} else {
suite.Require().Error(err)
suite.Require().Nil(params)
@ -982,6 +931,75 @@ func (suite *KeeperTestSuite) TestGRPCQueryParams() {
}
}
func (suite *KeeperTestSuite) TestGRPCQueryMessagedBasedParams() {
// create custom message based params for x/gov/MsgUpdateParams
err := suite.govKeeper.MessageBasedParams.Set(suite.ctx, sdk.MsgTypeURL(&v1.MsgUpdateParams{}), v1.MessageBasedParams{
VotingPeriod: func() *time.Duration { t := time.Hour * 24 * 7; return &t }(),
Quorum: "0.4",
Threshold: "0.5",
VetoThreshold: "0.66",
})
suite.Require().NoError(err)
defaultGovParams := v1.DefaultParams()
queryClient := suite.queryClient
testCases := []struct {
msg string
req v1.QueryMessageBasedParamsRequest
expResp *v1.QueryMessageBasedParamsResponse
expErrMsg string
}{
{
msg: "empty request",
req: v1.QueryMessageBasedParamsRequest{},
expErrMsg: "invalid request",
},
{
msg: "valid request (custom msg based params)",
req: v1.QueryMessageBasedParamsRequest{
MsgUrl: sdk.MsgTypeURL(&v1.MsgUpdateParams{}),
},
expResp: &v1.QueryMessageBasedParamsResponse{
Params: &v1.MessageBasedParams{
VotingPeriod: func() *time.Duration { t := time.Hour * 24 * 7; return &t }(),
Quorum: "0.4",
Threshold: "0.5",
VetoThreshold: "0.66",
},
},
},
{
msg: "valid request (default msg based params)",
req: v1.QueryMessageBasedParamsRequest{
MsgUrl: sdk.MsgTypeURL(&v1.MsgSubmitProposal{}),
},
expResp: &v1.QueryMessageBasedParamsResponse{
Params: &v1.MessageBasedParams{
VotingPeriod: defaultGovParams.VotingPeriod,
Quorum: defaultGovParams.Quorum,
Threshold: defaultGovParams.Threshold,
VetoThreshold: defaultGovParams.VetoThreshold,
},
},
},
}
for _, tc := range testCases {
tc := tc
suite.Run(fmt.Sprintf("Case %s", tc.msg), func() {
params, err := queryClient.MessageBasedParams(suite.ctx, &tc.req)
if tc.expErrMsg != "" {
suite.Require().Error(err)
suite.Require().ErrorContains(err, tc.expErrMsg)
} else {
suite.Require().NoError(err)
suite.Require().Equal(tc.expResp, params)
}
})
}
}
func (suite *KeeperTestSuite) TestLegacyGRPCQueryParams() {
queryClient := suite.legacyQueryClient

View File

@ -53,6 +53,9 @@ type Keeper struct {
Constitution collections.Item[string]
// Params stores the governance parameters
Params collections.Item[v1.Params]
// MessageBasedParams store message-based governance parameters
// key:proposal-msg-url | value MessageBasedParams
MessageBasedParams collections.Map[string, v1.MessageBasedParams]
// Deposits key: proposalID+depositorAddr | value: Deposit
Deposits collections.Map[collections.Pair[uint64, sdk.AccAddress], v1.Deposit]
// Votes key: proposalID+voterAddr | value: Vote
@ -125,6 +128,7 @@ func NewKeeper(
authority: authority,
Constitution: collections.NewItem(sb, types.ConstitutionKey, "constitution", collections.StringValue),
Params: collections.NewItem(sb, types.ParamsKey, "params", codec.CollValue[v1.Params](cdc)),
MessageBasedParams: collections.NewMap(sb, types.MessageBasedParamsKey, "proposal_messaged_based_params", collections.StringKey, codec.CollValue[v1.MessageBasedParams](cdc)),
Deposits: collections.NewMap(sb, types.DepositsKeyPrefix, "deposits", collections.PairKeyCodec(collections.Uint64Key, sdk.LengthPrefixedAddressKey(sdk.AccAddressKey)), codec.CollValue[v1.Deposit](cdc)), //nolint: staticcheck // sdk.LengthPrefixedAddressKey is needed to retain state compatibility
Votes: collections.NewMap(sb, types.VotesKeyPrefix, "votes", collections.PairKeyCodec(collections.Uint64Key, sdk.LengthPrefixedAddressKey(sdk.AccAddressKey)), codec.CollValue[v1.Vote](cdc)), //nolint: staticcheck // sdk.LengthPrefixedAddressKey is needed to retain state compatibility
ProposalID: collections.NewSequence(sb, types.ProposalIDKey, "proposal_id"),

View File

@ -305,7 +305,7 @@ func (k msgServer) Deposit(goCtx context.Context, msg *v1.MsgDeposit) (*v1.MsgDe
return &v1.MsgDepositResponse{}, nil
}
// UpdateParams implements the MsgServer.UpdateParams method.
// UpdateParams implements the v1.UpdateParams method.
func (k msgServer) UpdateParams(ctx context.Context, msg *v1.MsgUpdateParams) (*v1.MsgUpdateParamsResponse, error) {
if k.authority != msg.Authority {
return nil, errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", k.authority, msg.Authority)
@ -322,6 +322,36 @@ func (k msgServer) UpdateParams(ctx context.Context, msg *v1.MsgUpdateParams) (*
return &v1.MsgUpdateParamsResponse{}, nil
}
// UpdateMessageParams implements the v1.MsgServer method
func (k msgServer) UpdateMessageParams(ctx context.Context, msg *v1.MsgUpdateMessageParams) (*v1.MsgUpdateMessageParamsResponse, error) {
if k.authority != msg.Authority {
return nil, errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", k.authority, msg.Authority)
}
// delete the message params if the params are empty
if msg.Params == nil || *msg.Params == (v1.MessageBasedParams{}) {
if err := k.MessageBasedParams.Remove(ctx, msg.MsgUrl); err != nil {
return nil, err
}
return &v1.MsgUpdateMessageParamsResponse{}, nil
}
if err := msg.Params.ValidateBasic(); err != nil {
return nil, err
}
// note: we don't need to validate the message URL here, as it is gov gated
// a chain may want to configure proposal messages before having an upgrade
// adding new messages.
if err := k.MessageBasedParams.Set(ctx, msg.MsgUrl, *msg.Params); err != nil {
return nil, err
}
return &v1.MsgUpdateMessageParamsResponse{}, nil
}
type legacyMsgServer struct {
govAcct string
server v1.MsgServer

View File

@ -1850,6 +1850,124 @@ func (suite *KeeperTestSuite) TestMsgUpdateParams() {
}
}
func (suite *KeeperTestSuite) TestMsgUpdateMessageParams() {
testCases := []struct {
name string
input *v1.MsgUpdateMessageParams
expErrMsg string
}{
{
name: "invalid authority",
input: &v1.MsgUpdateMessageParams{
Authority: "invalid",
MsgUrl: "",
Params: nil,
},
expErrMsg: "invalid authority",
},
{
name: "invalid msg url (valid as not checked in msg handler)",
input: &v1.MsgUpdateMessageParams{
Authority: suite.govKeeper.GetAuthority(),
MsgUrl: "invalid",
Params: nil,
},
expErrMsg: "",
},
{
name: "empty params (valid = deleting params)",
input: &v1.MsgUpdateMessageParams{
Authority: suite.govKeeper.GetAuthority(),
MsgUrl: "",
Params: nil,
},
expErrMsg: "",
},
{
name: "invalid quorum",
input: &v1.MsgUpdateMessageParams{
Authority: suite.govKeeper.GetAuthority(),
MsgUrl: sdk.MsgTypeURL(&v1.MsgUpdateParams{}),
Params: &v1.MessageBasedParams{
VotingPeriod: func() *time.Duration { d := time.Hour; return &d }(),
Quorum: "-0.334",
Threshold: "0.5",
VetoThreshold: "0.334",
},
},
expErrMsg: "quorum cannot be negative",
},
{
name: "invalid threshold",
input: &v1.MsgUpdateMessageParams{
Authority: suite.govKeeper.GetAuthority(),
MsgUrl: sdk.MsgTypeURL(&v1.MsgUpdateParams{}),
Params: &v1.MessageBasedParams{
VotingPeriod: func() *time.Duration { d := time.Hour; return &d }(),
Quorum: "0.334",
Threshold: "-0.5",
VetoThreshold: "0.334",
},
},
expErrMsg: "vote threshold must be positive",
},
{
name: "invalid veto threshold",
input: &v1.MsgUpdateMessageParams{
Authority: suite.govKeeper.GetAuthority(),
MsgUrl: sdk.MsgTypeURL(&v1.MsgUpdateParams{}),
Params: &v1.MessageBasedParams{
VotingPeriod: func() *time.Duration { d := time.Hour; return &d }(),
Quorum: "0.334",
Threshold: "0.5",
VetoThreshold: "-0.334",
},
},
expErrMsg: "veto threshold must be positive",
},
{
name: "invalid voting period",
input: &v1.MsgUpdateMessageParams{
Authority: suite.govKeeper.GetAuthority(),
MsgUrl: sdk.MsgTypeURL(&v1.MsgUpdateParams{}),
Params: &v1.MessageBasedParams{
VotingPeriod: func() *time.Duration { d := -time.Hour; return &d }(),
Quorum: "0.334",
Threshold: "0.5",
VetoThreshold: "0.334",
},
},
expErrMsg: "voting period must be positive",
},
{
name: "valid",
input: &v1.MsgUpdateMessageParams{
Authority: suite.govKeeper.GetAuthority(),
MsgUrl: sdk.MsgTypeURL(&v1.MsgUpdateParams{}),
Params: &v1.MessageBasedParams{
VotingPeriod: func() *time.Duration { d := time.Hour; return &d }(),
Quorum: "0.334",
Threshold: "0.5",
VetoThreshold: "0.334",
},
},
},
}
for _, tc := range testCases {
tc := tc
suite.Run(tc.name, func() {
_, err := suite.msgSrvr.UpdateMessageParams(suite.ctx, tc.input)
if tc.expErrMsg != "" {
suite.Require().Error(err)
suite.Require().Contains(err.Error(), tc.expErrMsg)
} else {
suite.Require().NoError(err)
}
})
}
}
func (suite *KeeperTestSuite) TestSubmitProposal_InitialDeposit() {
const meetsDepositValue = baseDepositTestAmount * baseDepositTestPercent / 100
baseDepositRatioDec := sdkmath.LegacyNewDec(baseDepositTestPercent).Quo(sdkmath.LegacyNewDec(100))

View File

@ -45,6 +45,24 @@ func (k Keeper) SubmitProposal(ctx context.Context, messages []sdk.Msg, metadata
for _, msg := range messages {
msgs = append(msgs, sdk.MsgTypeURL(msg))
// check if any of the message has message based params
hasMessagedBasedParams, err := k.MessageBasedParams.Has(ctx, sdk.MsgTypeURL(msg))
if err != nil {
return v1.Proposal{}, err
}
if hasMessagedBasedParams {
// TODO(@julienrbrt), in the future, we can check if all messages have the same params
// and if so, we can allow the proposal.
if len(messages) > 1 {
return v1.Proposal{}, errorsmod.Wrap(types.ErrInvalidProposalMsg, "cannot submit multiple messages proposal with message based params")
}
if proposalType != v1.ProposalType_PROPOSAL_TYPE_STANDARD {
return v1.Proposal{}, errorsmod.Wrap(types.ErrInvalidProposalType, "cannot submit non standard proposal with message based params")
}
}
// perform a basic validation of the message
if m, ok := msg.(sdk.HasValidateBasic); ok {
if err := m.ValidateBasic(); err != nil {
@ -71,7 +89,7 @@ func (k Keeper) SubmitProposal(ctx context.Context, messages []sdk.Msg, metadata
return v1.Proposal{}, errorsmod.Wrap(types.ErrUnroutableProposalMsg, sdk.MsgTypeURL(msg))
}
// Only if it's a MsgExecLegacyContent do we try to execute the
// Only if it's a MsgExecLegacyContent we try to execute the
// proposal in a cached context.
// For other Msgs, we do not verify the proposal messages any further.
// They may fail upon execution.
@ -251,27 +269,38 @@ func (k Keeper) ActivateVotingPeriod(ctx context.Context, proposal v1.Proposal)
sdkCtx := sdk.UnwrapSDKContext(ctx)
startTime := sdkCtx.HeaderInfo().Time
proposal.VotingStartTime = &startTime
var votingPeriod *time.Duration
params, err := k.Params.Get(ctx)
if err != nil {
return err
}
if proposal.Expedited {
var votingPeriod *time.Duration
switch proposal.ProposalType {
case v1.ProposalType_PROPOSAL_TYPE_EXPEDITED:
votingPeriod = params.ExpeditedVotingPeriod
} else {
default:
votingPeriod = params.VotingPeriod
if len(proposal.Messages) > 0 {
// check if any of the message has message based params
customMessageParams, err := k.MessageBasedParams.Get(ctx, sdk.MsgTypeURL(proposal.Messages[0]))
if err == nil {
votingPeriod = customMessageParams.VotingPeriod
} else if err != nil && !errors.Is(err, collections.ErrNotFound) {
return err
}
}
}
endTime := proposal.VotingStartTime.Add(*votingPeriod)
proposal.VotingEndTime = &endTime
proposal.Status = v1.StatusVotingPeriod
err = k.SetProposal(ctx, proposal)
if err != nil {
if err = k.SetProposal(ctx, proposal); err != nil {
return err
}
err = k.InactiveProposalsQueue.Remove(ctx, collections.Join(*proposal.DepositEndTime, proposal.Id))
if err != nil {
if err = k.InactiveProposalsQueue.Remove(ctx, collections.Join(*proposal.DepositEndTime, proposal.Id)); err != nil {
return err
}

View File

@ -1,7 +1,6 @@
package keeper_test
import (
"errors"
"fmt"
"strings"
"testing"
@ -156,41 +155,56 @@ func (invalidProposalRoute) ProposalRoute() string { return "nonexistingroute" }
func (suite *KeeperTestSuite) TestSubmitProposal() {
govAcct := suite.govKeeper.GetGovernanceAccount(suite.ctx).GetAddress().String()
_, _, randomAddr := testdata.KeyTestPubAddr()
tp := v1beta1.TextProposal{Title: "title", Description: "description"}
legacyProposal := func(content v1beta1.Content, authority string) []sdk.Msg {
prop, err := v1.NewLegacyContent(content, authority)
suite.Require().NoError(err)
return []sdk.Msg{prop}
}
// create custom message based params for x/gov/MsgUpdateParams
err := suite.govKeeper.MessageBasedParams.Set(suite.ctx, sdk.MsgTypeURL(&v1.MsgUpdateParams{}), v1.MessageBasedParams{
VotingPeriod: func() *time.Duration { t := time.Hour * 24 * 7; return &t }(),
Quorum: "0.4",
Threshold: "0.5",
VetoThreshold: "0.66",
})
suite.Require().NoError(err)
testCases := []struct {
content v1beta1.Content
authority string
msgs []sdk.Msg
metadata string
proposalType v1.ProposalType
expectedErr error
}{
{&tp, govAcct, "", v1.ProposalType_PROPOSAL_TYPE_STANDARD, nil},
{&tp, govAcct, "", v1.ProposalType_PROPOSAL_TYPE_EXPEDITED, nil},
{nil, govAcct, "", v1.ProposalType_PROPOSAL_TYPE_MULTIPLE_CHOICE, nil},
{legacyProposal(&tp, govAcct), "", v1.ProposalType_PROPOSAL_TYPE_STANDARD, nil},
// normal proposal with msg with custom params
{[]sdk.Msg{&v1.MsgUpdateParams{Authority: govAcct}}, "", v1.ProposalType_PROPOSAL_TYPE_STANDARD, nil},
{legacyProposal(&tp, govAcct), "", v1.ProposalType_PROPOSAL_TYPE_EXPEDITED, nil},
{nil, "", v1.ProposalType_PROPOSAL_TYPE_MULTIPLE_CHOICE, nil},
// Keeper does not check the validity of title and description, no error
{&v1beta1.TextProposal{Title: "", Description: "description"}, govAcct, "", v1.ProposalType_PROPOSAL_TYPE_STANDARD, nil},
{&v1beta1.TextProposal{Title: strings.Repeat("1234567890", 100), Description: "description"}, govAcct, "", v1.ProposalType_PROPOSAL_TYPE_STANDARD, nil},
{&v1beta1.TextProposal{Title: "title", Description: ""}, govAcct, "", v1.ProposalType_PROPOSAL_TYPE_STANDARD, nil},
{&v1beta1.TextProposal{Title: "title", Description: strings.Repeat("1234567890", 1000)}, govAcct, "", v1.ProposalType_PROPOSAL_TYPE_EXPEDITED, nil},
{legacyProposal(&v1beta1.TextProposal{Title: "", Description: "description"}, govAcct), "", v1.ProposalType_PROPOSAL_TYPE_STANDARD, nil},
{legacyProposal(&v1beta1.TextProposal{Title: strings.Repeat("1234567890", 100), Description: "description"}, govAcct), "", v1.ProposalType_PROPOSAL_TYPE_STANDARD, nil},
{legacyProposal(&v1beta1.TextProposal{Title: "title", Description: ""}, govAcct), "", v1.ProposalType_PROPOSAL_TYPE_STANDARD, nil},
{legacyProposal(&v1beta1.TextProposal{Title: "title", Description: strings.Repeat("1234567890", 1000)}, govAcct), "", v1.ProposalType_PROPOSAL_TYPE_EXPEDITED, nil},
// error when signer is not gov acct
{&tp, randomAddr.String(), "", v1.ProposalType_PROPOSAL_TYPE_STANDARD, types.ErrInvalidSigner},
{legacyProposal(&tp, randomAddr.String()), "", v1.ProposalType_PROPOSAL_TYPE_STANDARD, types.ErrInvalidSigner},
// error only when invalid route
{&invalidProposalRoute{}, govAcct, "", v1.ProposalType_PROPOSAL_TYPE_STANDARD, types.ErrNoProposalHandlerExists},
{legacyProposal(&invalidProposalRoute{}, govAcct), "", v1.ProposalType_PROPOSAL_TYPE_STANDARD, types.ErrNoProposalHandlerExists},
// error invalid multiple choice proposal
{&tp, govAcct, "", v1.ProposalType_PROPOSAL_TYPE_MULTIPLE_CHOICE, types.ErrInvalidProposalMsg},
{legacyProposal(&tp, govAcct), "", v1.ProposalType_PROPOSAL_TYPE_MULTIPLE_CHOICE, types.ErrInvalidProposalMsg},
// error invalid multiple msg proposal with 1 msg with custom params
{[]sdk.Msg{&v1.MsgUpdateParams{Authority: govAcct}, &v1.MsgCancelProposal{Proposer: govAcct}}, "", v1.ProposalType_PROPOSAL_TYPE_STANDARD, types.ErrInvalidProposalMsg},
// error invalid msg proposal type with 1 msg with custom params
{[]sdk.Msg{&v1.MsgUpdateParams{Authority: govAcct}}, "", v1.ProposalType_PROPOSAL_TYPE_EXPEDITED, types.ErrInvalidProposalType},
}
for i, tc := range testCases {
msg := []sdk.Msg{}
if tc.content != nil {
prop, err := v1.NewLegacyContent(tc.content, tc.authority)
suite.Require().NoError(err)
msg = append(msg, prop)
_, err := suite.govKeeper.SubmitProposal(suite.ctx, tc.msgs, tc.metadata, "title", "", suite.addrs[0], tc.proposalType)
if tc.expectedErr != nil {
suite.Require().ErrorContains(err, tc.expectedErr.Error(), "tc #%d; got: %v, expected: %v", i, err, tc.expectedErr)
}
_, err := suite.govKeeper.SubmitProposal(suite.ctx, msg, tc.metadata, "title", "", suite.addrs[0], tc.proposalType)
suite.Require().True(errors.Is(tc.expectedErr, err), "tc #%d; got: %v, expected: %v", i, err, tc.expectedErr)
}
}

View File

@ -2,6 +2,7 @@ package keeper
import (
"context"
"errors"
"cosmossdk.io/collections"
"cosmossdk.io/math"
@ -53,7 +54,7 @@ func (k Keeper) Tally(ctx context.Context, proposal v1.Proposal) (passes, burnDe
case v1.ProposalType_PROPOSAL_TYPE_MULTIPLE_CHOICE:
return k.tallyMultipleChoice(totalVoterPower, totalBonded, results, params)
default:
return k.tallyStandard(totalVoterPower, totalBonded, results, params)
return k.tallyStandard(ctx, proposal, totalVoterPower, totalBonded, results, params)
}
}
@ -64,12 +65,28 @@ func (k Keeper) Tally(ctx context.Context, proposal v1.Proposal) (passes, burnDe
// If more than 1/2 of non-abstaining voters vote Yes, proposal passes
// If more than 1/2 of non-abstaining voters vote No, proposal fails
// Checking for spam votes is done before calling this function
func (k Keeper) tallyStandard(totalVoterPower math.LegacyDec, totalBonded math.Int, results map[v1.VoteOption]math.LegacyDec, params v1.Params) (passes, burnDeposits bool, tallyResults v1.TallyResult, err error) {
func (k Keeper) tallyStandard(ctx context.Context, proposal v1.Proposal, totalVoterPower math.LegacyDec, totalBonded math.Int, results map[v1.VoteOption]math.LegacyDec, params v1.Params) (passes, burnDeposits bool, tallyResults v1.TallyResult, err error) {
tallyResults = v1.NewTallyResultFromMap(results)
quorumStr := params.Quorum
thresholdStr := params.GetThreshold()
vetoThresholdStr := params.VetoThreshold
if len(proposal.Messages) > 0 {
// check if any of the message has message based params
customMessageParams, err := k.MessageBasedParams.Get(ctx, sdk.MsgTypeURL(proposal.Messages[0]))
if err != nil && !errors.Is(err, collections.ErrNotFound) {
return false, false, tallyResults, err
} else if err == nil {
quorumStr = customMessageParams.GetQuorum()
thresholdStr = customMessageParams.GetThreshold()
vetoThresholdStr = customMessageParams.GetVetoThreshold()
}
}
// If there is not enough quorum of votes, the proposal fails
percentVoting := totalVoterPower.Quo(math.LegacyNewDecFromInt(totalBonded))
quorum, _ := math.LegacyNewDecFromStr(params.Quorum)
quorum, _ := math.LegacyNewDecFromStr(quorumStr)
if percentVoting.LT(quorum) {
return false, params.BurnVoteQuorum, tallyResults, nil
}
@ -80,13 +97,13 @@ func (k Keeper) tallyStandard(totalVoterPower math.LegacyDec, totalBonded math.I
}
// If more than 1/3 of voters veto, proposal fails
vetoThreshold, _ := math.LegacyNewDecFromStr(params.VetoThreshold)
vetoThreshold, _ := math.LegacyNewDecFromStr(vetoThresholdStr)
if results[v1.OptionNoWithVeto].Quo(totalVoterPower).GT(vetoThreshold) {
return false, params.BurnVoteVeto, tallyResults, nil
}
// If more than 1/2 of non-abstaining voters vote Yes, proposal passes
threshold, _ := math.LegacyNewDecFromStr(params.GetThreshold())
threshold, _ := math.LegacyNewDecFromStr(thresholdStr)
if results[v1.OptionYes].Quo(totalVoterPower.Sub(results[v1.OptionAbstain])).GT(threshold) {
return true, false, tallyResults, nil

View File

@ -26,4 +26,5 @@ var (
ParamsKey = collections.NewPrefix(48) // ParamsKey stores the module's params.
ConstitutionKey = collections.NewPrefix(49) // ConstitutionKey stores a chain's constitution.
ProposalVoteOptionsKeyPrefix = collections.NewPrefix(50) // ProposalVoteOptionsKeyPrefix stores the vote options of proposals.
MessageBasedParamsKey = collections.NewPrefix(51) // MessageBasedParamsKey stores the message based gov params.
)

View File

@ -923,7 +923,7 @@ func (m *TallyParams) GetVetoThreshold() string {
type Params struct {
// Minimum deposit for a proposal to enter voting period.
MinDeposit []types.Coin `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3" json:"min_deposit"`
// Maximum period for Atom holders to deposit on a proposal. Initial value: 2
// Maximum period for stake holders to deposit on a proposal. Initial value: 2
// months.
MaxDepositPeriod *time.Duration `protobuf:"bytes,2,opt,name=max_deposit_period,json=maxDepositPeriod,proto3,stdduration" json:"max_deposit_period,omitempty"`
// Duration of the voting period.
@ -1160,6 +1160,85 @@ func (m *Params) GetOptimisticRejectedThreshold() string {
return ""
}
// MessageBasedParams defines the parameters of specific messages in a proposal.
// It is used to define the parameters of a proposal that is based on a specific message.
// Once a message has message based params, it only supports a standard proposal type.
//
// Since: x/gov v1.0.0
type MessageBasedParams struct {
// Duration of the voting period.
VotingPeriod *time.Duration `protobuf:"bytes,1,opt,name=voting_period,json=votingPeriod,proto3,stdduration" json:"voting_period,omitempty"`
// Minimum percentage of total stake needed to vote for a result to be
// considered valid.
Quorum string `protobuf:"bytes,2,opt,name=quorum,proto3" json:"quorum,omitempty"`
// Minimum proportion of Yes votes for proposal to pass.
Threshold string `protobuf:"bytes,3,opt,name=threshold,proto3" json:"threshold,omitempty"`
// Minimum value of Veto votes to Total votes ratio for proposal to be
// vetoed.
VetoThreshold string `protobuf:"bytes,4,opt,name=veto_threshold,json=vetoThreshold,proto3" json:"veto_threshold,omitempty"`
}
func (m *MessageBasedParams) Reset() { *m = MessageBasedParams{} }
func (m *MessageBasedParams) String() string { return proto.CompactTextString(m) }
func (*MessageBasedParams) ProtoMessage() {}
func (*MessageBasedParams) Descriptor() ([]byte, []int) {
return fileDescriptor_e05cb1c0d030febb, []int{10}
}
func (m *MessageBasedParams) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *MessageBasedParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_MessageBasedParams.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *MessageBasedParams) XXX_Merge(src proto.Message) {
xxx_messageInfo_MessageBasedParams.Merge(m, src)
}
func (m *MessageBasedParams) XXX_Size() int {
return m.Size()
}
func (m *MessageBasedParams) XXX_DiscardUnknown() {
xxx_messageInfo_MessageBasedParams.DiscardUnknown(m)
}
var xxx_messageInfo_MessageBasedParams proto.InternalMessageInfo
func (m *MessageBasedParams) GetVotingPeriod() *time.Duration {
if m != nil {
return m.VotingPeriod
}
return nil
}
func (m *MessageBasedParams) GetQuorum() string {
if m != nil {
return m.Quorum
}
return ""
}
func (m *MessageBasedParams) GetThreshold() string {
if m != nil {
return m.Threshold
}
return ""
}
func (m *MessageBasedParams) GetVetoThreshold() string {
if m != nil {
return m.VetoThreshold
}
return ""
}
func init() {
proto.RegisterEnum("cosmos.gov.v1.ProposalType", ProposalType_name, ProposalType_value)
proto.RegisterEnum("cosmos.gov.v1.VoteOption", VoteOption_name, VoteOption_value)
@ -1174,122 +1253,125 @@ func init() {
proto.RegisterType((*VotingParams)(nil), "cosmos.gov.v1.VotingParams")
proto.RegisterType((*TallyParams)(nil), "cosmos.gov.v1.TallyParams")
proto.RegisterType((*Params)(nil), "cosmos.gov.v1.Params")
proto.RegisterType((*MessageBasedParams)(nil), "cosmos.gov.v1.MessageBasedParams")
}
func init() { proto.RegisterFile("cosmos/gov/v1/gov.proto", fileDescriptor_e05cb1c0d030febb) }
var fileDescriptor_e05cb1c0d030febb = []byte{
// 1748 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0x4f, 0x73, 0xe3, 0x48,
0x15, 0x8f, 0x6c, 0xc7, 0xb1, 0x9f, 0xff, 0x44, 0xe9, 0x64, 0x36, 0x4a, 0xb2, 0x71, 0x32, 0x66,
0x6b, 0x2b, 0x0c, 0x3b, 0x36, 0xd9, 0x65, 0x38, 0xec, 0x52, 0x05, 0x4e, 0xac, 0x21, 0x1a, 0x92,
0xd8, 0xc8, 0x9a, 0x64, 0x86, 0x8b, 0x50, 0xa2, 0x1e, 0x47, 0x60, 0xa9, 0x8d, 0xd4, 0xce, 0xc4,
0x7c, 0x00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 0x85, 0x7d, 0x48, 0x04, 0xcd, 0xcb,
0xdd, 0xb3, 0x3c, 0x9f, 0xa5, 0x1f, 0x7d, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x38, 0x0a, 0x94, 0x69,
0x6d, 0x11, 0x00, 0x00,
// 1778 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x4f, 0x73, 0xdb, 0xc6,
0x15, 0x17, 0x48, 0x8a, 0x22, 0x1f, 0xff, 0x08, 0x5a, 0xc9, 0x11, 0x24, 0x45, 0x94, 0xcc, 0x66,
0x32, 0xaa, 0x1b, 0x93, 0x55, 0x52, 0xf7, 0x90, 0x74, 0xa6, 0x25, 0x45, 0xb8, 0x82, 0x2b, 0x89,
0x2c, 0x08, 0x4b, 0x76, 0x2f, 0x28, 0x24, 0xac, 0x29, 0xb4, 0x04, 0x96, 0x05, 0x96, 0xb2, 0xd8,
0x0f, 0xd0, 0x73, 0xa6, 0xa7, 0x9e, 0x3a, 0xbd, 0xb5, 0xc7, 0x1e, 0x32, 0x9d, 0x7e, 0x84, 0x4c,
0x0f, 0x9d, 0x4c, 0x4e, 0xbd, 0xd4, 0xed, 0xd8, 0x87, 0xcc, 0xe4, 0x23, 0xf4, 0xd4, 0xd9, 0xc5,
0x82, 0x00, 0x29, 0x26, 0xa2, 0x32, 0xb9, 0xd8, 0xc4, 0x7b, 0xbf, 0xdf, 0xdb, 0xdd, 0xf7, 0x7e,
0xef, 0x2d, 0x20, 0x58, 0xbf, 0x20, 0x81, 0x4b, 0x82, 0x7a, 0x8f, 0x5c, 0xd5, 0xaf, 0xf6, 0xd9,
0x7f, 0xb5, 0x81, 0x4f, 0x28, 0x41, 0xa5, 0xd0, 0x51, 0x63, 0x96, 0xab, 0xfd, 0xcd, 0x8a, 0xc0,
0x9d, 0x5b, 0x01, 0xae, 0x5f, 0xed, 0x9f, 0x63, 0x6a, 0xed, 0xd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 0x9d, 0xc6, 0xb1, 0xbc, 0xb8, 0x99,
0x92, 0xa5, 0x07, 0xff, 0x94, 0xa0, 0x3c, 0xf9, 0x7d, 0x8b, 0x76, 0x60, 0x6b, 0x9c, 0xac, 0xae,
0xd1, 0x30, 0x9e, 0x76, 0xa7, 0x92, 0x50, 0x85, 0xca, 0x34, 0xa0, 0xa5, 0x76, 0xda, 0x5d, 0xcd,
0x30, 0x3b, 0xaa, 0xae, 0xb5, 0xa7, 0x4b, 0x26, 0x30, 0xa7, 0x6d, 0x43, 0x3b, 0xf9, 0x69, 0x04,
0x49, 0x4d, 0x54, 0x5c, 0x40, 0x3a, 0x8d, 0x6e, 0x57, 0x6d, 0xc9, 0xe9, 0x89, 0x72, 0x0a, 0x9f,
0xae, 0x3e, 0x51, 0x0f, 0x78, 0xc5, 0x66, 0x31, 0x1f, 0x37, 0xb4, 0x23, 0xb5, 0x25, 0x2f, 0x36,
0x1f, 0x7d, 0xfa, 0xba, 0x22, 0x7d, 0xf6, 0xba, 0x22, 0xfd, 0xf7, 0x75, 0x45, 0xfa, 0xf8, 0x4d,
0x65, 0xe1, 0xb3, 0x37, 0x95, 0x85, 0x7f, 0xbd, 0xa9, 0x2c, 0xfc, 0x62, 0x2b, 0x14, 0x6b, 0x60,
0xff, 0xba, 0xe6, 0x90, 0xfa, 0x35, 0xff, 0xcb, 0x11, 0xfb, 0x64, 0x0a, 0xea, 0x57, 0xfb, 0xe7,
0x59, 0xde, 0x62, 0x1f, 0xfc, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x90, 0x78, 0x19, 0xda, 0x57, 0x12,
0x00, 0x00,
}
func (m *WeightedVoteOption) Marshal() (dAtA []byte, err error) {
@ -2035,6 +2117,60 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
func (m *MessageBasedParams) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *MessageBasedParams) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *MessageBasedParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.VetoThreshold) > 0 {
i -= len(m.VetoThreshold)
copy(dAtA[i:], m.VetoThreshold)
i = encodeVarintGov(dAtA, i, uint64(len(m.VetoThreshold)))
i--
dAtA[i] = 0x22
}
if len(m.Threshold) > 0 {
i -= len(m.Threshold)
copy(dAtA[i:], m.Threshold)
i = encodeVarintGov(dAtA, i, uint64(len(m.Threshold)))
i--
dAtA[i] = 0x1a
}
if len(m.Quorum) > 0 {
i -= len(m.Quorum)
copy(dAtA[i:], m.Quorum)
i = encodeVarintGov(dAtA, i, uint64(len(m.Quorum)))
i--
dAtA[i] = 0x12
}
if m.VotingPeriod != nil {
n11, err11 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(*m.VotingPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(*m.VotingPeriod):])
if err11 != nil {
return 0, err11
}
i -= n11
i = encodeVarintGov(dAtA, i, uint64(n11))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintGov(dAtA []byte, offset int, v uint64) int {
offset -= sovGov(v)
base := offset
@ -2382,6 +2518,31 @@ func (m *Params) Size() (n int) {
return n
}
func (m *MessageBasedParams) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.VotingPeriod != nil {
l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(*m.VotingPeriod)
n += 1 + l + sovGov(uint64(l))
}
l = len(m.Quorum)
if l > 0 {
n += 1 + l + sovGov(uint64(l))
}
l = len(m.Threshold)
if l > 0 {
n += 1 + l + sovGov(uint64(l))
}
l = len(m.VetoThreshold)
if l > 0 {
n += 1 + l + sovGov(uint64(l))
}
return n
}
func sovGov(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
@ -4736,6 +4897,188 @@ func (m *Params) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *MessageBasedParams) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: MessageBasedParams: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: MessageBasedParams: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field VotingPeriod", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGov
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGov
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.VotingPeriod == nil {
m.VotingPeriod = new(time.Duration)
}
if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(m.VotingPeriod, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Quorum", 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.Quorum = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Threshold", 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.Threshold = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field VetoThreshold", 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.VetoThreshold = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGov(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGov
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipGov(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0

View File

@ -37,30 +37,6 @@ var (
DefaultOptimisticAuthorizedAddreses = []string(nil)
)
// Deprecated: NewDepositParams creates a new DepositParams object
func NewDepositParams(minDeposit sdk.Coins, maxDepositPeriod *time.Duration) DepositParams {
return DepositParams{
MinDeposit: minDeposit,
MaxDepositPeriod: maxDepositPeriod,
}
}
// Deprecated: NewTallyParams creates a new TallyParams object
func NewTallyParams(quorum, threshold, vetoThreshold string) TallyParams {
return TallyParams{
Quorum: quorum,
Threshold: threshold,
VetoThreshold: vetoThreshold,
}
}
// Deprecated: NewVotingParams creates a new VotingParams object
func NewVotingParams(votingPeriod *time.Duration) VotingParams {
return VotingParams{
VotingPeriod: votingPeriod,
}
}
// NewParams creates a new Params instance with given values.
func NewParams(
minDeposit, expeditedminDeposit sdk.Coins, maxDepositPeriod, votingPeriod, expeditedVotingPeriod time.Duration,
@ -261,3 +237,48 @@ func (p Params) ValidateBasic(addressCodec address.Codec) error {
return nil
}
// ValidateBasic performs basic validation on governance parameters.
func (p MessageBasedParams) ValidateBasic() error {
if p.VotingPeriod == nil {
return fmt.Errorf("voting period must not be nil: %d", p.VotingPeriod)
}
if p.VotingPeriod.Seconds() <= 0 {
return fmt.Errorf("voting period must be positive: %s", p.VotingPeriod)
}
quorum, err := sdkmath.LegacyNewDecFromStr(p.Quorum)
if err != nil {
return fmt.Errorf("invalid quorum string: %w", err)
}
if quorum.IsNegative() {
return fmt.Errorf("quorum cannot be negative: %s", quorum)
}
if quorum.GT(sdkmath.LegacyOneDec()) {
return fmt.Errorf("quorum too large: %s", p.Quorum)
}
vetoThreshold, err := sdkmath.LegacyNewDecFromStr(p.VetoThreshold)
if err != nil {
return fmt.Errorf("invalid vetoThreshold string: %w", err)
}
if !vetoThreshold.IsPositive() {
return fmt.Errorf("veto threshold must be positive: %s", vetoThreshold)
}
if vetoThreshold.GT(sdkmath.LegacyOneDec()) {
return fmt.Errorf("veto threshold too large: %s", vetoThreshold)
}
threshold, err := sdkmath.LegacyNewDecFromStr(p.Threshold)
if err != nil {
return fmt.Errorf("invalid threshold string: %w", err)
}
if !threshold.IsPositive() {
return fmt.Errorf("vote threshold must be positive: %s", threshold)
}
if threshold.GT(sdkmath.LegacyOneDec()) {
return fmt.Errorf("vote threshold too large: %s", threshold)
}
return nil
}

View File

@ -1,100 +0,0 @@
package v1
import (
sdk "github.com/cosmos/cosmos-sdk/types"
)
// query endpoints supported by the governance Querier
const (
QueryParams = "params"
QueryProposals = "proposals"
QueryProposal = "proposal"
QueryDeposits = "deposits"
QueryDeposit = "deposit"
QueryVotes = "votes"
QueryVote = "vote"
QueryTally = "tally"
ParamDeposit = "deposit"
ParamVoting = "voting"
ParamTallying = "tallying"
)
// QueryProposalParams is used for queries:
// - 'custom/gov/proposal'
// - 'custom/gov/deposits'
// - 'custom/gov/tally'
type QueryProposalParams struct {
ProposalID uint64
}
// NewQueryProposalParams creates a new instance of QueryProposalParams
func NewQueryProposalParams(proposalID uint64) QueryProposalParams {
return QueryProposalParams{
ProposalID: proposalID,
}
}
// QueryProposalVotesParams is used to query 'custom/gov/votes'.
type QueryProposalVotesParams struct {
ProposalID uint64
Page int
Limit int
}
// NewQueryProposalVotesParams creates new instance of the QueryProposalVotesParams.
func NewQueryProposalVotesParams(proposalID uint64, page, limit int) QueryProposalVotesParams {
return QueryProposalVotesParams{
ProposalID: proposalID,
Page: page,
Limit: limit,
}
}
// QueryDepositParams is used to query 'custom/gov/deposit'
type QueryDepositParams struct {
ProposalID uint64
Depositor sdk.AccAddress
}
// NewQueryDepositParams creates a new instance of QueryDepositParams
func NewQueryDepositParams(proposalID uint64, depositor sdk.AccAddress) QueryDepositParams {
return QueryDepositParams{
ProposalID: proposalID,
Depositor: depositor,
}
}
// QueryVoteParams is used to query 'custom/gov/vote'
type QueryVoteParams struct {
ProposalID uint64
Voter sdk.AccAddress
}
// NewQueryVoteParams creates a new instance of QueryVoteParams
func NewQueryVoteParams(proposalID uint64, voter sdk.AccAddress) QueryVoteParams {
return QueryVoteParams{
ProposalID: proposalID,
Voter: voter,
}
}
// QueryProposalsParams is used to query 'custom/gov/proposals'
type QueryProposalsParams struct {
Page int
Limit int
Voter sdk.AccAddress
Depositor sdk.AccAddress
ProposalStatus ProposalStatus
}
// NewQueryProposalsParams creates a new instance of QueryProposalsParams
func NewQueryProposalsParams(page, limit int, status ProposalStatus, voter, depositor sdk.AccAddress) QueryProposalsParams {
return QueryProposalsParams{
Page: page,
Limit: limit,
Voter: voter,
Depositor: depositor,
ProposalStatus: status,
}
}

View File

@ -548,7 +548,8 @@ func (m *QueryVotesResponse) GetPagination() *query.PageResponse {
type QueryParamsRequest struct {
// params_type defines which parameters to query for, can be one of "voting",
// "tallying" or "deposit".
ParamsType string `protobuf:"bytes,1,opt,name=params_type,json=paramsType,proto3" json:"params_type,omitempty"`
// Deprecated: all params are stored in Params.
ParamsType string `protobuf:"bytes,1,opt,name=params_type,json=paramsType,proto3" json:"params_type,omitempty"` // Deprecated: Do not use.
}
func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} }
@ -584,6 +585,7 @@ func (m *QueryParamsRequest) XXX_DiscardUnknown() {
var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo
// Deprecated: Do not use.
func (m *QueryParamsRequest) GetParamsType() string {
if m != nil {
return m.ParamsType
@ -1067,6 +1069,100 @@ func (m *QueryProposalVoteOptionsResponse) GetVoteOptions() *ProposalVoteOptions
return nil
}
// QueryMessageBasedParamsRequest is the request type for the Query/MessageBasedParams RPC method.
//
// Since: x/gov 1.0.0
type QueryMessageBasedParamsRequest struct {
MsgUrl string `protobuf:"bytes,1,opt,name=msg_url,json=msgUrl,proto3" json:"msg_url,omitempty"`
}
func (m *QueryMessageBasedParamsRequest) Reset() { *m = QueryMessageBasedParamsRequest{} }
func (m *QueryMessageBasedParamsRequest) String() string { return proto.CompactTextString(m) }
func (*QueryMessageBasedParamsRequest) ProtoMessage() {}
func (*QueryMessageBasedParamsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_46a436d1109b50d0, []int{20}
}
func (m *QueryMessageBasedParamsRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryMessageBasedParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryMessageBasedParamsRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *QueryMessageBasedParamsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryMessageBasedParamsRequest.Merge(m, src)
}
func (m *QueryMessageBasedParamsRequest) XXX_Size() int {
return m.Size()
}
func (m *QueryMessageBasedParamsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_QueryMessageBasedParamsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_QueryMessageBasedParamsRequest proto.InternalMessageInfo
func (m *QueryMessageBasedParamsRequest) GetMsgUrl() string {
if m != nil {
return m.MsgUrl
}
return ""
}
// QueryMessageBasedParamsResponse is the response for the Query/MessageBasedParams RPC method.
//
// Since: x/gov 1.0.0
type QueryMessageBasedParamsResponse struct {
Params *MessageBasedParams `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
}
func (m *QueryMessageBasedParamsResponse) Reset() { *m = QueryMessageBasedParamsResponse{} }
func (m *QueryMessageBasedParamsResponse) String() string { return proto.CompactTextString(m) }
func (*QueryMessageBasedParamsResponse) ProtoMessage() {}
func (*QueryMessageBasedParamsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_46a436d1109b50d0, []int{21}
}
func (m *QueryMessageBasedParamsResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryMessageBasedParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryMessageBasedParamsResponse.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *QueryMessageBasedParamsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryMessageBasedParamsResponse.Merge(m, src)
}
func (m *QueryMessageBasedParamsResponse) XXX_Size() int {
return m.Size()
}
func (m *QueryMessageBasedParamsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_QueryMessageBasedParamsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_QueryMessageBasedParamsResponse proto.InternalMessageInfo
func (m *QueryMessageBasedParamsResponse) GetParams() *MessageBasedParams {
if m != nil {
return m.Params
}
return nil
}
func init() {
proto.RegisterType((*QueryConstitutionRequest)(nil), "cosmos.gov.v1.QueryConstitutionRequest")
proto.RegisterType((*QueryConstitutionResponse)(nil), "cosmos.gov.v1.QueryConstitutionResponse")
@ -1088,80 +1184,88 @@ func init() {
proto.RegisterType((*QueryTallyResultResponse)(nil), "cosmos.gov.v1.QueryTallyResultResponse")
proto.RegisterType((*QueryProposalVoteOptionsRequest)(nil), "cosmos.gov.v1.QueryProposalVoteOptionsRequest")
proto.RegisterType((*QueryProposalVoteOptionsResponse)(nil), "cosmos.gov.v1.QueryProposalVoteOptionsResponse")
proto.RegisterType((*QueryMessageBasedParamsRequest)(nil), "cosmos.gov.v1.QueryMessageBasedParamsRequest")
proto.RegisterType((*QueryMessageBasedParamsResponse)(nil), "cosmos.gov.v1.QueryMessageBasedParamsResponse")
}
func init() { proto.RegisterFile("cosmos/gov/v1/query.proto", fileDescriptor_46a436d1109b50d0) }
var fileDescriptor_46a436d1109b50d0 = []byte{
// 1086 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x5b, 0x6f, 0xdc, 0xc4,
0x17, 0x8f, 0x37, 0x97, 0x26, 0x67, 0x93, 0xfc, 0xff, 0x9c, 0xb4, 0xcd, 0xd6, 0x69, 0x37, 0x61,
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1, 0xff, 0x7c, 0xf3, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2d, 0x36, 0xe1, 0xe8,
0x49, 0x10, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -1195,7 +1299,11 @@ type QueryClient interface {
// TallyResult queries the tally of a proposal vote.
TallyResult(ctx context.Context, in *QueryTallyResultRequest, opts ...grpc.CallOption) (*QueryTallyResultResponse, error)
// ProposalVoteOptions queries the valid voting options for a proposal.
// Since: cosmos-sdk x/gov v1.0.0
ProposalVoteOptions(ctx context.Context, in *QueryProposalVoteOptionsRequest, opts ...grpc.CallOption) (*QueryProposalVoteOptionsResponse, error)
// MessageBasedParams queries the message specific governance params based on a msg url.
// Since: cosmos-sdk x/gov v1.0.0
MessageBasedParams(ctx context.Context, in *QueryMessageBasedParamsRequest, opts ...grpc.CallOption) (*QueryMessageBasedParamsResponse, error)
}
type queryClient struct {
@ -1296,6 +1404,15 @@ func (c *queryClient) ProposalVoteOptions(ctx context.Context, in *QueryProposal
return out, nil
}
func (c *queryClient) MessageBasedParams(ctx context.Context, in *QueryMessageBasedParamsRequest, opts ...grpc.CallOption) (*QueryMessageBasedParamsResponse, error) {
out := new(QueryMessageBasedParamsResponse)
err := c.cc.Invoke(ctx, "/cosmos.gov.v1.Query/MessageBasedParams", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// QueryServer is the server API for Query service.
type QueryServer interface {
// Constitution queries the chain's constitution.
@ -1317,7 +1434,11 @@ type QueryServer interface {
// TallyResult queries the tally of a proposal vote.
TallyResult(context.Context, *QueryTallyResultRequest) (*QueryTallyResultResponse, error)
// ProposalVoteOptions queries the valid voting options for a proposal.
// Since: cosmos-sdk x/gov v1.0.0
ProposalVoteOptions(context.Context, *QueryProposalVoteOptionsRequest) (*QueryProposalVoteOptionsResponse, error)
// MessageBasedParams queries the message specific governance params based on a msg url.
// Since: cosmos-sdk x/gov v1.0.0
MessageBasedParams(context.Context, *QueryMessageBasedParamsRequest) (*QueryMessageBasedParamsResponse, error)
}
// UnimplementedQueryServer can be embedded to have forward compatible implementations.
@ -1354,6 +1475,9 @@ func (*UnimplementedQueryServer) TallyResult(ctx context.Context, req *QueryTall
func (*UnimplementedQueryServer) ProposalVoteOptions(ctx context.Context, req *QueryProposalVoteOptionsRequest) (*QueryProposalVoteOptionsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ProposalVoteOptions not implemented")
}
func (*UnimplementedQueryServer) MessageBasedParams(ctx context.Context, req *QueryMessageBasedParamsRequest) (*QueryMessageBasedParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method MessageBasedParams not implemented")
}
func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
s.RegisterService(&_Query_serviceDesc, srv)
@ -1539,6 +1663,24 @@ func _Query_ProposalVoteOptions_Handler(srv interface{}, ctx context.Context, de
return interceptor(ctx, in, info, handler)
}
func _Query_MessageBasedParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryMessageBasedParamsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).MessageBasedParams(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/cosmos.gov.v1.Query/MessageBasedParams",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).MessageBasedParams(ctx, req.(*QueryMessageBasedParamsRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Query_serviceDesc = grpc.ServiceDesc{
ServiceName: "cosmos.gov.v1.Query",
HandlerType: (*QueryServer)(nil),
@ -1583,6 +1725,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{
MethodName: "ProposalVoteOptions",
Handler: _Query_ProposalVoteOptions_Handler,
},
{
MethodName: "MessageBasedParams",
Handler: _Query_MessageBasedParams_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "cosmos/gov/v1/query.proto",
@ -2352,6 +2498,71 @@ func (m *QueryProposalVoteOptionsResponse) MarshalToSizedBuffer(dAtA []byte) (in
return len(dAtA) - i, nil
}
func (m *QueryMessageBasedParamsRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *QueryMessageBasedParamsRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryMessageBasedParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.MsgUrl) > 0 {
i -= len(m.MsgUrl)
copy(dAtA[i:], m.MsgUrl)
i = encodeVarintQuery(dAtA, i, uint64(len(m.MsgUrl)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *QueryMessageBasedParamsResponse) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *QueryMessageBasedParamsResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryMessageBasedParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Params != nil {
{
size, err := m.Params.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintQuery(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
offset -= sovQuery(v)
base := offset
@ -2669,6 +2880,32 @@ func (m *QueryProposalVoteOptionsResponse) Size() (n int) {
return n
}
func (m *QueryMessageBasedParamsRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.MsgUrl)
if l > 0 {
n += 1 + l + sovQuery(uint64(l))
}
return n
}
func (m *QueryMessageBasedParamsResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Params != nil {
l = m.Params.Size()
n += 1 + l + sovQuery(uint64(l))
}
return n
}
func sovQuery(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
@ -4661,6 +4898,174 @@ func (m *QueryProposalVoteOptionsResponse) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *QueryMessageBasedParamsRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: QueryMessageBasedParamsRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryMessageBasedParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field MsgUrl", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
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 ErrInvalidLengthQuery
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.MsgUrl = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipQuery(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthQuery
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *QueryMessageBasedParamsResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: QueryMessageBasedParamsResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryMessageBasedParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthQuery
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Params == nil {
m.Params = &MessageBasedParams{}
}
if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipQuery(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthQuery
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipQuery(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0

View File

@ -289,26 +289,19 @@ func local_request_Query_Votes_0(ctx context.Context, marshaler runtime.Marshale
}
var (
filter_Query_Params_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryParamsRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["params_type"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "params_type")
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
protoReq.ParamsType, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "params_type", err)
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Params_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
@ -320,22 +313,11 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal
var protoReq QueryParamsRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["params_type"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "params_type")
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
protoReq.ParamsType, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "params_type", err)
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Params_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.Params(ctx, &protoReq)
@ -599,6 +581,60 @@ func local_request_Query_ProposalVoteOptions_0(ctx context.Context, marshaler ru
}
func request_Query_MessageBasedParams_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryMessageBasedParamsRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["msg_url"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "msg_url")
}
protoReq.MsgUrl, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "msg_url", err)
}
msg, err := client.MessageBasedParams(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Query_MessageBasedParams_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryMessageBasedParamsRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["msg_url"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "msg_url")
}
protoReq.MsgUrl, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "msg_url", err)
}
msg, err := server.MessageBasedParams(ctx, &protoReq)
return msg, metadata, err
}
// RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
// UnaryRPC :call QueryServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
@ -835,6 +871,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
})
mux.Handle("GET", pattern_Query_MessageBasedParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Query_MessageBasedParams_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Query_MessageBasedParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@ -1076,6 +1135,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
})
mux.Handle("GET", pattern_Query_MessageBasedParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Query_MessageBasedParams_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Query_MessageBasedParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@ -1090,7 +1169,7 @@ var (
pattern_Query_Votes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"cosmos", "gov", "v1", "proposals", "proposal_id", "votes"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "gov", "v1", "params", "params_type"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "gov", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_Deposit_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"cosmos", "gov", "v1", "proposals", "proposal_id", "deposits", "depositor"}, "", runtime.AssumeColonVerbOpt(false)))
@ -1099,6 +1178,8 @@ var (
pattern_Query_TallyResult_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"cosmos", "gov", "v1", "proposals", "proposal_id", "tally"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_ProposalVoteOptions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"cosmos", "gov", "v1", "proposals", "proposal_id", "vote_options"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_MessageBasedParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "gov", "v1", "params", "msg_url"}, "", runtime.AssumeColonVerbOpt(false)))
)
var (
@ -1121,4 +1202,6 @@ var (
forward_Query_TallyResult_0 = runtime.ForwardResponseMessage
forward_Query_ProposalVoteOptions_0 = runtime.ForwardResponseMessage
forward_Query_MessageBasedParams_0 = runtime.ForwardResponseMessage
)

View File

@ -987,6 +987,108 @@ func (m *MsgSubmitMultipleChoiceProposalResponse) GetProposalId() uint64 {
return 0
}
// MsgUpdateMessageParams defines the Msg/UpdateMessageParams response type.
//
// Since: x/gov 1.0.0
type MsgUpdateMessageParams struct {
Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
MsgUrl string `protobuf:"bytes,2,opt,name=msg_url,json=msgUrl,proto3" json:"msg_url,omitempty"`
Params *MessageBasedParams `protobuf:"bytes,3,opt,name=params,proto3" json:"params,omitempty"`
}
func (m *MsgUpdateMessageParams) Reset() { *m = MsgUpdateMessageParams{} }
func (m *MsgUpdateMessageParams) String() string { return proto.CompactTextString(m) }
func (*MsgUpdateMessageParams) ProtoMessage() {}
func (*MsgUpdateMessageParams) Descriptor() ([]byte, []int) {
return fileDescriptor_9ff8f4a63b6fc9a9, []int{16}
}
func (m *MsgUpdateMessageParams) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *MsgUpdateMessageParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_MsgUpdateMessageParams.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *MsgUpdateMessageParams) XXX_Merge(src proto.Message) {
xxx_messageInfo_MsgUpdateMessageParams.Merge(m, src)
}
func (m *MsgUpdateMessageParams) XXX_Size() int {
return m.Size()
}
func (m *MsgUpdateMessageParams) XXX_DiscardUnknown() {
xxx_messageInfo_MsgUpdateMessageParams.DiscardUnknown(m)
}
var xxx_messageInfo_MsgUpdateMessageParams proto.InternalMessageInfo
func (m *MsgUpdateMessageParams) GetAuthority() string {
if m != nil {
return m.Authority
}
return ""
}
func (m *MsgUpdateMessageParams) GetMsgUrl() string {
if m != nil {
return m.MsgUrl
}
return ""
}
func (m *MsgUpdateMessageParams) GetParams() *MessageBasedParams {
if m != nil {
return m.Params
}
return nil
}
// MsgUpdateMessageParamsResponse defines the Msg/UpdateMessageParams response type.
//
// Since: x/gov 1.0.0
type MsgUpdateMessageParamsResponse struct {
}
func (m *MsgUpdateMessageParamsResponse) Reset() { *m = MsgUpdateMessageParamsResponse{} }
func (m *MsgUpdateMessageParamsResponse) String() string { return proto.CompactTextString(m) }
func (*MsgUpdateMessageParamsResponse) ProtoMessage() {}
func (*MsgUpdateMessageParamsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_9ff8f4a63b6fc9a9, []int{17}
}
func (m *MsgUpdateMessageParamsResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *MsgUpdateMessageParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_MsgUpdateMessageParamsResponse.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *MsgUpdateMessageParamsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_MsgUpdateMessageParamsResponse.Merge(m, src)
}
func (m *MsgUpdateMessageParamsResponse) XXX_Size() int {
return m.Size()
}
func (m *MsgUpdateMessageParamsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_MsgUpdateMessageParamsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_MsgUpdateMessageParamsResponse proto.InternalMessageInfo
func init() {
proto.RegisterType((*MsgSubmitProposal)(nil), "cosmos.gov.v1.MsgSubmitProposal")
proto.RegisterType((*MsgSubmitProposalResponse)(nil), "cosmos.gov.v1.MsgSubmitProposalResponse")
@ -1004,88 +1106,95 @@ func init() {
proto.RegisterType((*MsgCancelProposalResponse)(nil), "cosmos.gov.v1.MsgCancelProposalResponse")
proto.RegisterType((*MsgSubmitMultipleChoiceProposal)(nil), "cosmos.gov.v1.MsgSubmitMultipleChoiceProposal")
proto.RegisterType((*MsgSubmitMultipleChoiceProposalResponse)(nil), "cosmos.gov.v1.MsgSubmitMultipleChoiceProposalResponse")
proto.RegisterType((*MsgUpdateMessageParams)(nil), "cosmos.gov.v1.MsgUpdateMessageParams")
proto.RegisterType((*MsgUpdateMessageParamsResponse)(nil), "cosmos.gov.v1.MsgUpdateMessageParamsResponse")
}
func init() { proto.RegisterFile("cosmos/gov/v1/tx.proto", fileDescriptor_9ff8f4a63b6fc9a9) }
var fileDescriptor_9ff8f4a63b6fc9a9 = []byte{
// 1216 bytes of a gzipped FileDescriptorProto
// 1293 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcf, 0x6f, 0x1b, 0xc5,
0x17, 0xcf, 0xc4, 0xb1, 0x9d, 0x4c, 0x7e, 0x29, 0x2b, 0xb7, 0xdd, 0x6c, 0xfb, 0xb5, 0xdd, 0xed,
0x57, 0xd4, 0x4a, 0xe9, 0x1a, 0x07, 0x12, 0x21, 0x53, 0x21, 0xea, 0x50, 0xa0, 0x08, 0x43, 0xb5,
0x2d, 0x45, 0x42, 0x48, 0xd6, 0xc6, 0x3b, 0x6c, 0x56, 0xf5, 0xee, 0xac, 0x3c, 0x63, 0x2b, 0xbe,
0x21, 0x0e, 0x3d, 0xe4, 0xd4, 0x33, 0x7f, 0x01, 0xe2, 0x94, 0x43, 0x6f, 0x3d, 0x71, 0xab, 0x38,
0x55, 0x9c, 0x38, 0xb5, 0x28, 0x11, 0x44, 0x82, 0x13, 0x7f, 0x01, 0x68, 0x66, 0x67, 0xd7, 0xfb,
0xcb, 0x4e, 0xda, 0x03, 0xe2, 0x92, 0xec, 0xbc, 0x5f, 0xf3, 0xde, 0xe7, 0xbd, 0xf9, 0xcc, 0x18,
0x9e, 0xef, 0x62, 0xe2, 0x60, 0x52, 0xb7, 0xf0, 0xb0, 0x3e, 0x6c, 0xd4, 0xe9, 0xbe, 0xe6, 0xf5,
0x31, 0xc5, 0xd2, 0xb2, 0x2f, 0xd7, 0x2c, 0x3c, 0xd4, 0x86, 0x0d, 0xa5, 0x2c, 0xcc, 0x76, 0x0d,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7a, 0x79, 0x2c, 0x6b, 0xd4, 0xc1, 0xc8,
0x04, 0x4a, 0x71, 0x70, 0x94, 0x9f, 0xe6, 0x60, 0xda, 0x10, 0xa0, 0xd9, 0x8f, 0x0d, 0x80, 0x94,
0xec, 0x47, 0x25, 0xd2, 0xb2, 0x3f, 0xa6, 0x6f, 0x3f, 0x92, 0xc0, 0xa5, 0x89, 0xed, 0x50, 0x1f,
0x57, 0x48, 0xe9, 0xf2, 0xea, 0x8d, 0x17, 0x93, 0x17, 0x8e, 0xec, 0x80, 0xff, 0xa5, 0xbd, 0xe0,
0x57, 0xc7, 0xa1, 0x14, 0x11, 0x53, 0xd7, 0xcf, 0x24, 0x16, 0x5e, 0xa6, 0xce, 0x7e, 0x43, 0xbb,
0x6d, 0xe3, 0xfa, 0xd3, 0xa3, 0xa2, 0xf4, 0xec, 0xa8, 0x28, 0xfd, 0x7a, 0x54, 0x94, 0x1e, 0x1f,
0x17, 0xa7, 0x9e, 0x1d, 0x17, 0xa7, 0x7e, 0x39, 0x2e, 0x4e, 0x7d, 0x79, 0x31, 0x30, 0x87, 0xad,
0x1d, 0xdd, 0x41, 0x7c, 0x76, 0xb3, 0xee, 0x4d, 0x7f, 0x52, 0x67, 0xd9, 0x68, 0x7a, 0xf3, 0xef,
0x00, 0x00, 0x00, 0xff, 0xff, 0x81, 0x96, 0x04, 0xd2, 0x92, 0x0f, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -1124,6 +1233,10 @@ type MsgClient interface {
//
// Since: x/gov 1.0.0
SubmitMultipleChoiceProposal(ctx context.Context, in *MsgSubmitMultipleChoiceProposal, opts ...grpc.CallOption) (*MsgSubmitMultipleChoiceProposalResponse, error)
// UpdateMessageParams defines a method to create or update message params when used in a governance proposal.
//
// Since: x/gov 1.0.0
UpdateMessageParams(ctx context.Context, in *MsgUpdateMessageParams, opts ...grpc.CallOption) (*MsgUpdateMessageParamsResponse, error)
}
type msgClient struct {
@ -1206,6 +1319,15 @@ func (c *msgClient) SubmitMultipleChoiceProposal(ctx context.Context, in *MsgSub
return out, nil
}
func (c *msgClient) UpdateMessageParams(ctx context.Context, in *MsgUpdateMessageParams, opts ...grpc.CallOption) (*MsgUpdateMessageParamsResponse, error) {
out := new(MsgUpdateMessageParamsResponse)
err := c.cc.Invoke(ctx, "/cosmos.gov.v1.Msg/UpdateMessageParams", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// MsgServer is the server API for Msg service.
type MsgServer interface {
// SubmitProposal defines a method to create new proposal given the messages.
@ -1232,6 +1354,10 @@ type MsgServer interface {
//
// Since: x/gov 1.0.0
SubmitMultipleChoiceProposal(context.Context, *MsgSubmitMultipleChoiceProposal) (*MsgSubmitMultipleChoiceProposalResponse, error)
// UpdateMessageParams defines a method to create or update message params when used in a governance proposal.
//
// Since: x/gov 1.0.0
UpdateMessageParams(context.Context, *MsgUpdateMessageParams) (*MsgUpdateMessageParamsResponse, error)
}
// UnimplementedMsgServer can be embedded to have forward compatible implementations.
@ -1262,6 +1388,9 @@ func (*UnimplementedMsgServer) CancelProposal(ctx context.Context, req *MsgCance
func (*UnimplementedMsgServer) SubmitMultipleChoiceProposal(ctx context.Context, req *MsgSubmitMultipleChoiceProposal) (*MsgSubmitMultipleChoiceProposalResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SubmitMultipleChoiceProposal not implemented")
}
func (*UnimplementedMsgServer) UpdateMessageParams(ctx context.Context, req *MsgUpdateMessageParams) (*MsgUpdateMessageParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateMessageParams not implemented")
}
func RegisterMsgServer(s grpc1.Server, srv MsgServer) {
s.RegisterService(&_Msg_serviceDesc, srv)
@ -1411,6 +1540,24 @@ func _Msg_SubmitMultipleChoiceProposal_Handler(srv interface{}, ctx context.Cont
return interceptor(ctx, in, info, handler)
}
func _Msg_UpdateMessageParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgUpdateMessageParams)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).UpdateMessageParams(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/cosmos.gov.v1.Msg/UpdateMessageParams",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).UpdateMessageParams(ctx, req.(*MsgUpdateMessageParams))
}
return interceptor(ctx, in, info, handler)
}
var _Msg_serviceDesc = grpc.ServiceDesc{
ServiceName: "cosmos.gov.v1.Msg",
HandlerType: (*MsgServer)(nil),
@ -1447,6 +1594,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{
MethodName: "SubmitMultipleChoiceProposal",
Handler: _Msg_SubmitMultipleChoiceProposal_Handler,
},
{
MethodName: "UpdateMessageParams",
Handler: _Msg_UpdateMessageParams_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "cosmos/gov/v1/tx.proto",
@ -2104,6 +2255,78 @@ func (m *MsgSubmitMultipleChoiceProposalResponse) MarshalToSizedBuffer(dAtA []by
return len(dAtA) - i, nil
}
func (m *MsgUpdateMessageParams) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *MsgUpdateMessageParams) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *MsgUpdateMessageParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Params != nil {
{
size, err := m.Params.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintTx(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
}
if len(m.MsgUrl) > 0 {
i -= len(m.MsgUrl)
copy(dAtA[i:], m.MsgUrl)
i = encodeVarintTx(dAtA, i, uint64(len(m.MsgUrl)))
i--
dAtA[i] = 0x12
}
if len(m.Authority) > 0 {
i -= len(m.Authority)
copy(dAtA[i:], m.Authority)
i = encodeVarintTx(dAtA, i, uint64(len(m.Authority)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *MsgUpdateMessageParamsResponse) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *MsgUpdateMessageParamsResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *MsgUpdateMessageParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
return len(dAtA) - i, nil
}
func encodeVarintTx(dAtA []byte, offset int, v uint64) int {
offset -= sovTx(v)
base := offset
@ -2398,6 +2621,36 @@ func (m *MsgSubmitMultipleChoiceProposalResponse) Size() (n int) {
return n
}
func (m *MsgUpdateMessageParams) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Authority)
if l > 0 {
n += 1 + l + sovTx(uint64(l))
}
l = len(m.MsgUrl)
if l > 0 {
n += 1 + l + sovTx(uint64(l))
}
if m.Params != nil {
l = m.Params.Size()
n += 1 + l + sovTx(uint64(l))
}
return n
}
func (m *MsgUpdateMessageParamsResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
return n
}
func sovTx(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
@ -4234,6 +4487,206 @@ func (m *MsgSubmitMultipleChoiceProposalResponse) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *MsgUpdateMessageParams) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: MsgUpdateMessageParams: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: MsgUpdateMessageParams: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Authority", 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.Authority = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field MsgUrl", 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.MsgUrl = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTx
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthTx
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Params == nil {
m.Params = &MessageBasedParams{}
}
if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTx(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthTx
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *MsgUpdateMessageParamsResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: MsgUpdateMessageParamsResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: MsgUpdateMessageParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default:
iNdEx = preIndex
skippy, err := skipTx(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthTx
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipTx(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0