From ec555b58109be528be46d671556405b7268321f3 Mon Sep 17 00:00:00 2001 From: Alexxxxxx <118710506+alexgao001@users.noreply.github.com> Date: Thu, 13 Apr 2023 14:58:20 +0800 Subject: [PATCH] feat: update crosschain gov v0.47 (#171) --- api/cosmos/gov/v1/gov.pulsar.go | 868 ++++++++++++++-- api/cosmos/gov/v1/tx.pulsar.go | 1152 ++++++++++++++++++++-- api/cosmos/gov/v1/tx_grpc.pb.go | 51 +- proto/cosmos/gov/v1/gov.proto | 11 + proto/cosmos/gov/v1/tx.proto | 18 + simapp/app.go | 3 +- tests/integration/gov/genesis_test.go | 2 + tests/integration/gov/module_test.go | 1 + testutil/configurator/configurator.go | 58 ++ x/bank/app_test.go | 3 + x/gov/common_test.go | 3 + x/gov/keeper/common_test.go | 9 +- x/gov/keeper/crosschain.go | 75 ++ x/gov/keeper/deposit_test.go | 4 +- x/gov/keeper/hooks_test.go | 2 +- x/gov/keeper/keeper.go | 24 +- x/gov/keeper/keeper_test.go | 8 +- x/gov/keeper/msg_server.go | 12 + x/gov/keeper/proposal_test.go | 88 ++ x/gov/keeper/vote_test.go | 2 +- x/gov/module.go | 8 +- x/gov/simulation/operations_test.go | 23 +- x/gov/testutil/expected_keepers.go | 11 + x/gov/testutil/expected_keepers_mocks.go | 54 + x/gov/types/crosschain.go | 21 + x/gov/types/errors.go | 13 + x/gov/types/expected_keepers.go | 10 + x/gov/types/v1/codec.go | 2 + x/gov/types/v1/crosschain.go | 45 + x/gov/types/v1/gov.pb.go | 450 +++++++-- x/gov/types/v1/msgs.go | 24 +- x/gov/types/v1/tx.pb.go | 504 ++++++++-- 32 files changed, 3232 insertions(+), 327 deletions(-) create mode 100644 x/gov/keeper/crosschain.go create mode 100644 x/gov/types/crosschain.go create mode 100644 x/gov/types/v1/crosschain.go diff --git a/api/cosmos/gov/v1/gov.pulsar.go b/api/cosmos/gov/v1/gov.pulsar.go index ceb82da18d..03e45a094f 100644 --- a/api/cosmos/gov/v1/gov.pulsar.go +++ b/api/cosmos/gov/v1/gov.pulsar.go @@ -6380,6 +6380,674 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { } } +var _ protoreflect.List = (*_CrossChainParamsChange_2_list)(nil) + +type _CrossChainParamsChange_2_list struct { + list *[]string +} + +func (x *_CrossChainParamsChange_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_CrossChainParamsChange_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_CrossChainParamsChange_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_CrossChainParamsChange_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_CrossChainParamsChange_2_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message CrossChainParamsChange at list field Values as it is not of Message kind")) +} + +func (x *_CrossChainParamsChange_2_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_CrossChainParamsChange_2_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_CrossChainParamsChange_2_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_CrossChainParamsChange_3_list)(nil) + +type _CrossChainParamsChange_3_list struct { + list *[]string +} + +func (x *_CrossChainParamsChange_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_CrossChainParamsChange_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_CrossChainParamsChange_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_CrossChainParamsChange_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_CrossChainParamsChange_3_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message CrossChainParamsChange at list field Targets as it is not of Message kind")) +} + +func (x *_CrossChainParamsChange_3_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_CrossChainParamsChange_3_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_CrossChainParamsChange_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_CrossChainParamsChange protoreflect.MessageDescriptor + fd_CrossChainParamsChange_key protoreflect.FieldDescriptor + fd_CrossChainParamsChange_values protoreflect.FieldDescriptor + fd_CrossChainParamsChange_targets protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_gov_v1_gov_proto_init() + md_CrossChainParamsChange = File_cosmos_gov_v1_gov_proto.Messages().ByName("CrossChainParamsChange") + fd_CrossChainParamsChange_key = md_CrossChainParamsChange.Fields().ByName("key") + fd_CrossChainParamsChange_values = md_CrossChainParamsChange.Fields().ByName("values") + fd_CrossChainParamsChange_targets = md_CrossChainParamsChange.Fields().ByName("targets") +} + +var _ protoreflect.Message = (*fastReflection_CrossChainParamsChange)(nil) + +type fastReflection_CrossChainParamsChange CrossChainParamsChange + +func (x *CrossChainParamsChange) ProtoReflect() protoreflect.Message { + return (*fastReflection_CrossChainParamsChange)(x) +} + +func (x *CrossChainParamsChange) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_gov_v1_gov_proto_msgTypes[9] + 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_CrossChainParamsChange_messageType fastReflection_CrossChainParamsChange_messageType +var _ protoreflect.MessageType = fastReflection_CrossChainParamsChange_messageType{} + +type fastReflection_CrossChainParamsChange_messageType struct{} + +func (x fastReflection_CrossChainParamsChange_messageType) Zero() protoreflect.Message { + return (*fastReflection_CrossChainParamsChange)(nil) +} +func (x fastReflection_CrossChainParamsChange_messageType) New() protoreflect.Message { + return new(fastReflection_CrossChainParamsChange) +} +func (x fastReflection_CrossChainParamsChange_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_CrossChainParamsChange +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_CrossChainParamsChange) Descriptor() protoreflect.MessageDescriptor { + return md_CrossChainParamsChange +} + +// 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_CrossChainParamsChange) Type() protoreflect.MessageType { + return _fastReflection_CrossChainParamsChange_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_CrossChainParamsChange) New() protoreflect.Message { + return new(fastReflection_CrossChainParamsChange) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_CrossChainParamsChange) Interface() protoreflect.ProtoMessage { + return (*CrossChainParamsChange)(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_CrossChainParamsChange) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Key != "" { + value := protoreflect.ValueOfString(x.Key) + if !f(fd_CrossChainParamsChange_key, value) { + return + } + } + if len(x.Values) != 0 { + value := protoreflect.ValueOfList(&_CrossChainParamsChange_2_list{list: &x.Values}) + if !f(fd_CrossChainParamsChange_values, value) { + return + } + } + if len(x.Targets) != 0 { + value := protoreflect.ValueOfList(&_CrossChainParamsChange_3_list{list: &x.Targets}) + if !f(fd_CrossChainParamsChange_targets, 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_CrossChainParamsChange) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.gov.v1.CrossChainParamsChange.key": + return x.Key != "" + case "cosmos.gov.v1.CrossChainParamsChange.values": + return len(x.Values) != 0 + case "cosmos.gov.v1.CrossChainParamsChange.targets": + return len(x.Targets) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.CrossChainParamsChange")) + } + panic(fmt.Errorf("message cosmos.gov.v1.CrossChainParamsChange 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_CrossChainParamsChange) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.gov.v1.CrossChainParamsChange.key": + x.Key = "" + case "cosmos.gov.v1.CrossChainParamsChange.values": + x.Values = nil + case "cosmos.gov.v1.CrossChainParamsChange.targets": + x.Targets = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.CrossChainParamsChange")) + } + panic(fmt.Errorf("message cosmos.gov.v1.CrossChainParamsChange 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_CrossChainParamsChange) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.gov.v1.CrossChainParamsChange.key": + value := x.Key + return protoreflect.ValueOfString(value) + case "cosmos.gov.v1.CrossChainParamsChange.values": + if len(x.Values) == 0 { + return protoreflect.ValueOfList(&_CrossChainParamsChange_2_list{}) + } + listValue := &_CrossChainParamsChange_2_list{list: &x.Values} + return protoreflect.ValueOfList(listValue) + case "cosmos.gov.v1.CrossChainParamsChange.targets": + if len(x.Targets) == 0 { + return protoreflect.ValueOfList(&_CrossChainParamsChange_3_list{}) + } + listValue := &_CrossChainParamsChange_3_list{list: &x.Targets} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.CrossChainParamsChange")) + } + panic(fmt.Errorf("message cosmos.gov.v1.CrossChainParamsChange 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_CrossChainParamsChange) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.gov.v1.CrossChainParamsChange.key": + x.Key = value.Interface().(string) + case "cosmos.gov.v1.CrossChainParamsChange.values": + lv := value.List() + clv := lv.(*_CrossChainParamsChange_2_list) + x.Values = *clv.list + case "cosmos.gov.v1.CrossChainParamsChange.targets": + lv := value.List() + clv := lv.(*_CrossChainParamsChange_3_list) + x.Targets = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.CrossChainParamsChange")) + } + panic(fmt.Errorf("message cosmos.gov.v1.CrossChainParamsChange 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_CrossChainParamsChange) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.gov.v1.CrossChainParamsChange.values": + if x.Values == nil { + x.Values = []string{} + } + value := &_CrossChainParamsChange_2_list{list: &x.Values} + return protoreflect.ValueOfList(value) + case "cosmos.gov.v1.CrossChainParamsChange.targets": + if x.Targets == nil { + x.Targets = []string{} + } + value := &_CrossChainParamsChange_3_list{list: &x.Targets} + return protoreflect.ValueOfList(value) + case "cosmos.gov.v1.CrossChainParamsChange.key": + panic(fmt.Errorf("field key of message cosmos.gov.v1.CrossChainParamsChange is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.CrossChainParamsChange")) + } + panic(fmt.Errorf("message cosmos.gov.v1.CrossChainParamsChange 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_CrossChainParamsChange) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.gov.v1.CrossChainParamsChange.key": + return protoreflect.ValueOfString("") + case "cosmos.gov.v1.CrossChainParamsChange.values": + list := []string{} + return protoreflect.ValueOfList(&_CrossChainParamsChange_2_list{list: &list}) + case "cosmos.gov.v1.CrossChainParamsChange.targets": + list := []string{} + return protoreflect.ValueOfList(&_CrossChainParamsChange_3_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.CrossChainParamsChange")) + } + panic(fmt.Errorf("message cosmos.gov.v1.CrossChainParamsChange 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_CrossChainParamsChange) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.CrossChainParamsChange", 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_CrossChainParamsChange) 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_CrossChainParamsChange) 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_CrossChainParamsChange) 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_CrossChainParamsChange) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*CrossChainParamsChange) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Key) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Values) > 0 { + for _, s := range x.Values { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.Targets) > 0 { + for _, s := range x.Targets { + l = len(s) + 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().(*CrossChainParamsChange) + 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.Targets) > 0 { + for iNdEx := len(x.Targets) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Targets[iNdEx]) + copy(dAtA[i:], x.Targets[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Targets[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.Values) > 0 { + for iNdEx := len(x.Values) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Values[iNdEx]) + copy(dAtA[i:], x.Values[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Values[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.Key) > 0 { + i -= len(x.Key) + copy(dAtA[i:], x.Key) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) + 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().(*CrossChainParamsChange) + 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: CrossChainParamsChange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CrossChainParamsChange: 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 Key", 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.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Values", 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.Values = append(x.Values, 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 Targets", 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.Targets = append(x.Targets, 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. @@ -7174,6 +7842,61 @@ func (x *Params) GetBurnVoteVeto() bool { return false } +// CrossChainParamsChange defines the parameter change or contract upgrade +type CrossChainParamsChange struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // parameter to be updated or 'upgrade' for contract upgrade + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // values is a new parameter or slice of new contract addresses in hex format + Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` + // targets defines a slice of addresses string in hex format + Targets []string `protobuf:"bytes,3,rep,name=targets,proto3" json:"targets,omitempty"` +} + +func (x *CrossChainParamsChange) Reset() { + *x = CrossChainParamsChange{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_gov_v1_gov_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CrossChainParamsChange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CrossChainParamsChange) ProtoMessage() {} + +// Deprecated: Use CrossChainParamsChange.ProtoReflect.Descriptor instead. +func (*CrossChainParamsChange) Descriptor() ([]byte, []int) { + return file_cosmos_gov_v1_gov_proto_rawDescGZIP(), []int{9} +} + +func (x *CrossChainParamsChange) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *CrossChainParamsChange) GetValues() []string { + if x != nil { + return x.Values + } + return nil +} + +func (x *CrossChainParamsChange) GetTargets() []string { + if x != nil { + return x.Targets + } + return nil +} + var File_cosmos_gov_v1_gov_proto protoreflect.FileDescriptor var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{ @@ -7344,39 +8067,45 @@ var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{ 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x72, 0x65, 0x76, 0x6f, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x62, 0x75, 0x72, 0x6e, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x62, 0x75, 0x72, 0x6e, 0x56, 0x6f, 0x74, 0x65, - 0x56, 0x65, 0x74, 0x6f, 0x2a, 0x89, 0x01, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x59, 0x45, 0x53, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x53, 0x54, 0x41, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x12, - 0x0a, 0x0e, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, - 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x56, 0x45, 0x54, 0x4f, 0x10, 0x04, - 0x2a, 0xce, 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, - 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x5f, - 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x50, - 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x4f, 0x54, 0x49, - 0x4e, 0x47, 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x50, - 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, - 0x41, 0x53, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, - 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, - 0x54, 0x45, 0x44, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, - 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, - 0x05, 0x42, 0x99, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x47, 0x6f, 0x76, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, - 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, - 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, - 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, - 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x56, 0x65, 0x74, 0x6f, 0x22, 0x5c, 0x0a, 0x16, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x73, 0x2a, 0x89, 0x01, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, + 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, + 0x53, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x53, 0x54, 0x41, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, + 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x10, 0x03, + 0x12, 0x1c, 0x0a, 0x18, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x4e, 0x4f, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x56, 0x45, 0x54, 0x4f, 0x10, 0x04, 0x2a, 0xce, + 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x5f, 0x50, 0x45, + 0x52, 0x49, 0x4f, 0x44, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, + 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x4f, 0x54, 0x49, 0x4e, 0x47, + 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, + 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x41, 0x53, + 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, + 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, + 0x44, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x42, + 0x99, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x47, 0x6f, 0x76, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, + 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -7392,42 +8121,43 @@ func file_cosmos_gov_v1_gov_proto_rawDescGZIP() []byte { } var file_cosmos_gov_v1_gov_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_cosmos_gov_v1_gov_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_cosmos_gov_v1_gov_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_cosmos_gov_v1_gov_proto_goTypes = []interface{}{ - (VoteOption)(0), // 0: cosmos.gov.v1.VoteOption - (ProposalStatus)(0), // 1: cosmos.gov.v1.ProposalStatus - (*WeightedVoteOption)(nil), // 2: cosmos.gov.v1.WeightedVoteOption - (*Deposit)(nil), // 3: cosmos.gov.v1.Deposit - (*Proposal)(nil), // 4: cosmos.gov.v1.Proposal - (*TallyResult)(nil), // 5: cosmos.gov.v1.TallyResult - (*Vote)(nil), // 6: cosmos.gov.v1.Vote - (*DepositParams)(nil), // 7: cosmos.gov.v1.DepositParams - (*VotingParams)(nil), // 8: cosmos.gov.v1.VotingParams - (*TallyParams)(nil), // 9: cosmos.gov.v1.TallyParams - (*Params)(nil), // 10: cosmos.gov.v1.Params - (*v1beta1.Coin)(nil), // 11: cosmos.base.v1beta1.Coin - (*anypb.Any)(nil), // 12: google.protobuf.Any - (*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 14: google.protobuf.Duration + (VoteOption)(0), // 0: cosmos.gov.v1.VoteOption + (ProposalStatus)(0), // 1: cosmos.gov.v1.ProposalStatus + (*WeightedVoteOption)(nil), // 2: cosmos.gov.v1.WeightedVoteOption + (*Deposit)(nil), // 3: cosmos.gov.v1.Deposit + (*Proposal)(nil), // 4: cosmos.gov.v1.Proposal + (*TallyResult)(nil), // 5: cosmos.gov.v1.TallyResult + (*Vote)(nil), // 6: cosmos.gov.v1.Vote + (*DepositParams)(nil), // 7: cosmos.gov.v1.DepositParams + (*VotingParams)(nil), // 8: cosmos.gov.v1.VotingParams + (*TallyParams)(nil), // 9: cosmos.gov.v1.TallyParams + (*Params)(nil), // 10: cosmos.gov.v1.Params + (*CrossChainParamsChange)(nil), // 11: cosmos.gov.v1.CrossChainParamsChange + (*v1beta1.Coin)(nil), // 12: cosmos.base.v1beta1.Coin + (*anypb.Any)(nil), // 13: google.protobuf.Any + (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 15: google.protobuf.Duration } var file_cosmos_gov_v1_gov_proto_depIdxs = []int32{ 0, // 0: cosmos.gov.v1.WeightedVoteOption.option:type_name -> cosmos.gov.v1.VoteOption - 11, // 1: cosmos.gov.v1.Deposit.amount:type_name -> cosmos.base.v1beta1.Coin - 12, // 2: cosmos.gov.v1.Proposal.messages:type_name -> google.protobuf.Any + 12, // 1: cosmos.gov.v1.Deposit.amount:type_name -> cosmos.base.v1beta1.Coin + 13, // 2: cosmos.gov.v1.Proposal.messages:type_name -> google.protobuf.Any 1, // 3: cosmos.gov.v1.Proposal.status:type_name -> cosmos.gov.v1.ProposalStatus 5, // 4: cosmos.gov.v1.Proposal.final_tally_result:type_name -> cosmos.gov.v1.TallyResult - 13, // 5: cosmos.gov.v1.Proposal.submit_time:type_name -> google.protobuf.Timestamp - 13, // 6: cosmos.gov.v1.Proposal.deposit_end_time:type_name -> google.protobuf.Timestamp - 11, // 7: cosmos.gov.v1.Proposal.total_deposit:type_name -> cosmos.base.v1beta1.Coin - 13, // 8: cosmos.gov.v1.Proposal.voting_start_time:type_name -> google.protobuf.Timestamp - 13, // 9: cosmos.gov.v1.Proposal.voting_end_time:type_name -> google.protobuf.Timestamp + 14, // 5: cosmos.gov.v1.Proposal.submit_time:type_name -> google.protobuf.Timestamp + 14, // 6: cosmos.gov.v1.Proposal.deposit_end_time:type_name -> google.protobuf.Timestamp + 12, // 7: cosmos.gov.v1.Proposal.total_deposit:type_name -> cosmos.base.v1beta1.Coin + 14, // 8: cosmos.gov.v1.Proposal.voting_start_time:type_name -> google.protobuf.Timestamp + 14, // 9: cosmos.gov.v1.Proposal.voting_end_time:type_name -> google.protobuf.Timestamp 2, // 10: cosmos.gov.v1.Vote.options:type_name -> cosmos.gov.v1.WeightedVoteOption - 11, // 11: cosmos.gov.v1.DepositParams.min_deposit:type_name -> cosmos.base.v1beta1.Coin - 14, // 12: cosmos.gov.v1.DepositParams.max_deposit_period:type_name -> google.protobuf.Duration - 14, // 13: cosmos.gov.v1.VotingParams.voting_period:type_name -> google.protobuf.Duration - 11, // 14: cosmos.gov.v1.Params.min_deposit:type_name -> cosmos.base.v1beta1.Coin - 14, // 15: cosmos.gov.v1.Params.max_deposit_period:type_name -> google.protobuf.Duration - 14, // 16: cosmos.gov.v1.Params.voting_period:type_name -> google.protobuf.Duration + 12, // 11: cosmos.gov.v1.DepositParams.min_deposit:type_name -> cosmos.base.v1beta1.Coin + 15, // 12: cosmos.gov.v1.DepositParams.max_deposit_period:type_name -> google.protobuf.Duration + 15, // 13: cosmos.gov.v1.VotingParams.voting_period:type_name -> google.protobuf.Duration + 12, // 14: cosmos.gov.v1.Params.min_deposit:type_name -> cosmos.base.v1beta1.Coin + 15, // 15: cosmos.gov.v1.Params.max_deposit_period:type_name -> google.protobuf.Duration + 15, // 16: cosmos.gov.v1.Params.voting_period:type_name -> google.protobuf.Duration 17, // [17:17] is the sub-list for method output_type 17, // [17:17] is the sub-list for method input_type 17, // [17:17] is the sub-list for extension type_name @@ -7549,6 +8279,18 @@ func file_cosmos_gov_v1_gov_proto_init() { return nil } } + file_cosmos_gov_v1_gov_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CrossChainParamsChange); 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{ @@ -7556,7 +8298,7 @@ func file_cosmos_gov_v1_gov_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_gov_v1_gov_proto_rawDesc, NumEnums: 2, - NumMessages: 9, + NumMessages: 10, NumExtensions: 0, NumServices: 0, }, diff --git a/api/cosmos/gov/v1/tx.pulsar.go b/api/cosmos/gov/v1/tx.pulsar.go index e2062e7017..4744915579 100644 --- a/api/cosmos/gov/v1/tx.pulsar.go +++ b/api/cosmos/gov/v1/tx.pulsar.go @@ -5944,6 +5944,861 @@ func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Meth } } +var ( + md_MsgUpdateCrossChainParams protoreflect.MessageDescriptor + fd_MsgUpdateCrossChainParams_authority protoreflect.FieldDescriptor + fd_MsgUpdateCrossChainParams_params protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_gov_v1_tx_proto_init() + md_MsgUpdateCrossChainParams = File_cosmos_gov_v1_tx_proto.Messages().ByName("MsgUpdateCrossChainParams") + fd_MsgUpdateCrossChainParams_authority = md_MsgUpdateCrossChainParams.Fields().ByName("authority") + fd_MsgUpdateCrossChainParams_params = md_MsgUpdateCrossChainParams.Fields().ByName("params") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateCrossChainParams)(nil) + +type fastReflection_MsgUpdateCrossChainParams MsgUpdateCrossChainParams + +func (x *MsgUpdateCrossChainParams) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateCrossChainParams)(x) +} + +func (x *MsgUpdateCrossChainParams) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_gov_v1_tx_proto_msgTypes[12] + 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_MsgUpdateCrossChainParams_messageType fastReflection_MsgUpdateCrossChainParams_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateCrossChainParams_messageType{} + +type fastReflection_MsgUpdateCrossChainParams_messageType struct{} + +func (x fastReflection_MsgUpdateCrossChainParams_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateCrossChainParams)(nil) +} +func (x fastReflection_MsgUpdateCrossChainParams_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateCrossChainParams) +} +func (x fastReflection_MsgUpdateCrossChainParams_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateCrossChainParams +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateCrossChainParams) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateCrossChainParams +} + +// 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_MsgUpdateCrossChainParams) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateCrossChainParams_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateCrossChainParams) New() protoreflect.Message { + return new(fastReflection_MsgUpdateCrossChainParams) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateCrossChainParams) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateCrossChainParams)(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_MsgUpdateCrossChainParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgUpdateCrossChainParams_authority, value) { + return + } + } + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_MsgUpdateCrossChainParams_params, 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_MsgUpdateCrossChainParams) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.gov.v1.MsgUpdateCrossChainParams.authority": + return x.Authority != "" + case "cosmos.gov.v1.MsgUpdateCrossChainParams.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgUpdateCrossChainParams")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgUpdateCrossChainParams 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_MsgUpdateCrossChainParams) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.gov.v1.MsgUpdateCrossChainParams.authority": + x.Authority = "" + case "cosmos.gov.v1.MsgUpdateCrossChainParams.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgUpdateCrossChainParams")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgUpdateCrossChainParams 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_MsgUpdateCrossChainParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.gov.v1.MsgUpdateCrossChainParams.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "cosmos.gov.v1.MsgUpdateCrossChainParams.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgUpdateCrossChainParams")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgUpdateCrossChainParams 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_MsgUpdateCrossChainParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.gov.v1.MsgUpdateCrossChainParams.authority": + x.Authority = value.Interface().(string) + case "cosmos.gov.v1.MsgUpdateCrossChainParams.params": + x.Params = value.Message().Interface().(*CrossChainParamsChange) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgUpdateCrossChainParams")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgUpdateCrossChainParams 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_MsgUpdateCrossChainParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.gov.v1.MsgUpdateCrossChainParams.params": + if x.Params == nil { + x.Params = new(CrossChainParamsChange) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + case "cosmos.gov.v1.MsgUpdateCrossChainParams.authority": + panic(fmt.Errorf("field authority of message cosmos.gov.v1.MsgUpdateCrossChainParams is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgUpdateCrossChainParams")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgUpdateCrossChainParams 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_MsgUpdateCrossChainParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.gov.v1.MsgUpdateCrossChainParams.authority": + return protoreflect.ValueOfString("") + case "cosmos.gov.v1.MsgUpdateCrossChainParams.params": + m := new(CrossChainParamsChange) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgUpdateCrossChainParams")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgUpdateCrossChainParams 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_MsgUpdateCrossChainParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.MsgUpdateCrossChainParams", 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_MsgUpdateCrossChainParams) 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_MsgUpdateCrossChainParams) 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_MsgUpdateCrossChainParams) 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_MsgUpdateCrossChainParams) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateCrossChainParams) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Params != nil { + l = options.Size(x.Params) + 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().(*MsgUpdateCrossChainParams) + 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 x.Params != nil { + encoded, err := options.Marshal(x.Params) + 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] = 0x12 + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + 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().(*MsgUpdateCrossChainParams) + 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: MsgUpdateCrossChainParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateCrossChainParams: 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 Authority", 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.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", 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.Params == nil { + x.Params = &CrossChainParamsChange{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + 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, + } +} + +var ( + md_MsgUpdateCrossChainParamsResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_gov_v1_tx_proto_init() + md_MsgUpdateCrossChainParamsResponse = File_cosmos_gov_v1_tx_proto.Messages().ByName("MsgUpdateCrossChainParamsResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateCrossChainParamsResponse)(nil) + +type fastReflection_MsgUpdateCrossChainParamsResponse MsgUpdateCrossChainParamsResponse + +func (x *MsgUpdateCrossChainParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateCrossChainParamsResponse)(x) +} + +func (x *MsgUpdateCrossChainParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_gov_v1_tx_proto_msgTypes[13] + 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_MsgUpdateCrossChainParamsResponse_messageType fastReflection_MsgUpdateCrossChainParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateCrossChainParamsResponse_messageType{} + +type fastReflection_MsgUpdateCrossChainParamsResponse_messageType struct{} + +func (x fastReflection_MsgUpdateCrossChainParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateCrossChainParamsResponse)(nil) +} +func (x fastReflection_MsgUpdateCrossChainParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateCrossChainParamsResponse) +} +func (x fastReflection_MsgUpdateCrossChainParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateCrossChainParamsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateCrossChainParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateCrossChainParamsResponse +} + +// 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_MsgUpdateCrossChainParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateCrossChainParamsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateCrossChainParamsResponse) New() protoreflect.Message { + return new(fastReflection_MsgUpdateCrossChainParamsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateCrossChainParamsResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateCrossChainParamsResponse)(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_MsgUpdateCrossChainParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// 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_MsgUpdateCrossChainParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgUpdateCrossChainParamsResponse")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgUpdateCrossChainParamsResponse 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_MsgUpdateCrossChainParamsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgUpdateCrossChainParamsResponse")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgUpdateCrossChainParamsResponse 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_MsgUpdateCrossChainParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgUpdateCrossChainParamsResponse")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgUpdateCrossChainParamsResponse 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_MsgUpdateCrossChainParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgUpdateCrossChainParamsResponse")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgUpdateCrossChainParamsResponse 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_MsgUpdateCrossChainParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgUpdateCrossChainParamsResponse")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgUpdateCrossChainParamsResponse 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_MsgUpdateCrossChainParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgUpdateCrossChainParamsResponse")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgUpdateCrossChainParamsResponse 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_MsgUpdateCrossChainParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.MsgUpdateCrossChainParamsResponse", 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_MsgUpdateCrossChainParamsResponse) 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_MsgUpdateCrossChainParamsResponse) 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_MsgUpdateCrossChainParamsResponse) 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_MsgUpdateCrossChainParamsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateCrossChainParamsResponse) + 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.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().(*MsgUpdateCrossChainParamsResponse) + 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 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().(*MsgUpdateCrossChainParamsResponse) + 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: MsgUpdateCrossChainParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateCrossChainParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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. @@ -6501,6 +7356,79 @@ func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { return file_cosmos_gov_v1_tx_proto_rawDescGZIP(), []int{11} } +// MsgUpdateCrossChainParams for cross chain gov +type MsgUpdateCrossChainParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // for cross chain param change or contract upgrade + Params *CrossChainParamsChange `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *MsgUpdateCrossChainParams) Reset() { + *x = MsgUpdateCrossChainParams{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_gov_v1_tx_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateCrossChainParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateCrossChainParams) ProtoMessage() {} + +// Deprecated: Use MsgUpdateCrossChainParams.ProtoReflect.Descriptor instead. +func (*MsgUpdateCrossChainParams) Descriptor() ([]byte, []int) { + return file_cosmos_gov_v1_tx_proto_rawDescGZIP(), []int{12} +} + +func (x *MsgUpdateCrossChainParams) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgUpdateCrossChainParams) GetParams() *CrossChainParamsChange { + if x != nil { + return x.Params + } + return nil +} + +// MsgUpdateCrossChainParamsResponse defines the response structure for executing a MsgUpdateCrossChainParams message. +type MsgUpdateCrossChainParamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgUpdateCrossChainParamsResponse) Reset() { + *x = MsgUpdateCrossChainParamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_gov_v1_tx_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateCrossChainParamsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateCrossChainParamsResponse) ProtoMessage() {} + +// Deprecated: Use MsgUpdateCrossChainParamsResponse.ProtoReflect.Descriptor instead. +func (*MsgUpdateCrossChainParamsResponse) Descriptor() ([]byte, []int) { + return file_cosmos_gov_v1_tx_proto_rawDescGZIP(), []int{13} +} + var File_cosmos_gov_v1_tx_proto protoreflect.FileDescriptor var file_cosmos_gov_v1_tx_proto_rawDesc = []byte{ @@ -6619,49 +7547,73 @@ var file_cosmos_gov_v1_tx_proto_rawDesc = []byte{ 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x32, 0x8a, 0x04, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x5c, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x20, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, - 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x28, 0x2e, 0x63, + 0x22, 0xdf, 0x01, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x72, + 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, + 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x48, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, + 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x09, 0xc8, + 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x3a, 0x40, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x8a, 0xe7, 0xb0, 0x2a, 0x2d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, + 0x78, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x22, 0x23, 0x0a, 0x21, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, + 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x80, 0x05, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, + 0x5c, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x12, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, + 0x11, 0x45, 0x78, 0x65, 0x63, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x4c, + 0x65, 0x67, 0x61, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x11, 0x45, 0x78, 0x65, 0x63, 0x4c, 0x65, - 0x67, 0x61, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, - 0x78, 0x65, 0x63, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, - 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x1a, 0x1e, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, - 0x0c, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x12, 0x1e, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x1a, 0x26, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x12, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x1a, 0x21, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, - 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1e, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x26, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x98, 0x01, - 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, - 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 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, + 0x56, 0x6f, 0x74, 0x65, 0x1a, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, + 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x65, 0x64, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, + 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x65, 0x64, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, + 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x07, + 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x1a, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x74, 0x0a, + 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, + 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x72, 0x6f, 0x73, 0x73, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x98, 0x01, 0x0a, 0x11, 0x63, + 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, + 0x42, 0x07, 0x54, 0x78, 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 ( @@ -6676,51 +7628,57 @@ func file_cosmos_gov_v1_tx_proto_rawDescGZIP() []byte { return file_cosmos_gov_v1_tx_proto_rawDescData } -var file_cosmos_gov_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_cosmos_gov_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_cosmos_gov_v1_tx_proto_goTypes = []interface{}{ - (*MsgSubmitProposal)(nil), // 0: cosmos.gov.v1.MsgSubmitProposal - (*MsgSubmitProposalResponse)(nil), // 1: cosmos.gov.v1.MsgSubmitProposalResponse - (*MsgExecLegacyContent)(nil), // 2: cosmos.gov.v1.MsgExecLegacyContent - (*MsgExecLegacyContentResponse)(nil), // 3: cosmos.gov.v1.MsgExecLegacyContentResponse - (*MsgVote)(nil), // 4: cosmos.gov.v1.MsgVote - (*MsgVoteResponse)(nil), // 5: cosmos.gov.v1.MsgVoteResponse - (*MsgVoteWeighted)(nil), // 6: cosmos.gov.v1.MsgVoteWeighted - (*MsgVoteWeightedResponse)(nil), // 7: cosmos.gov.v1.MsgVoteWeightedResponse - (*MsgDeposit)(nil), // 8: cosmos.gov.v1.MsgDeposit - (*MsgDepositResponse)(nil), // 9: cosmos.gov.v1.MsgDepositResponse - (*MsgUpdateParams)(nil), // 10: cosmos.gov.v1.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 11: cosmos.gov.v1.MsgUpdateParamsResponse - (*anypb.Any)(nil), // 12: google.protobuf.Any - (*v1beta1.Coin)(nil), // 13: cosmos.base.v1beta1.Coin - (VoteOption)(0), // 14: cosmos.gov.v1.VoteOption - (*WeightedVoteOption)(nil), // 15: cosmos.gov.v1.WeightedVoteOption - (*Params)(nil), // 16: cosmos.gov.v1.Params + (*MsgSubmitProposal)(nil), // 0: cosmos.gov.v1.MsgSubmitProposal + (*MsgSubmitProposalResponse)(nil), // 1: cosmos.gov.v1.MsgSubmitProposalResponse + (*MsgExecLegacyContent)(nil), // 2: cosmos.gov.v1.MsgExecLegacyContent + (*MsgExecLegacyContentResponse)(nil), // 3: cosmos.gov.v1.MsgExecLegacyContentResponse + (*MsgVote)(nil), // 4: cosmos.gov.v1.MsgVote + (*MsgVoteResponse)(nil), // 5: cosmos.gov.v1.MsgVoteResponse + (*MsgVoteWeighted)(nil), // 6: cosmos.gov.v1.MsgVoteWeighted + (*MsgVoteWeightedResponse)(nil), // 7: cosmos.gov.v1.MsgVoteWeightedResponse + (*MsgDeposit)(nil), // 8: cosmos.gov.v1.MsgDeposit + (*MsgDepositResponse)(nil), // 9: cosmos.gov.v1.MsgDepositResponse + (*MsgUpdateParams)(nil), // 10: cosmos.gov.v1.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 11: cosmos.gov.v1.MsgUpdateParamsResponse + (*MsgUpdateCrossChainParams)(nil), // 12: cosmos.gov.v1.MsgUpdateCrossChainParams + (*MsgUpdateCrossChainParamsResponse)(nil), // 13: cosmos.gov.v1.MsgUpdateCrossChainParamsResponse + (*anypb.Any)(nil), // 14: google.protobuf.Any + (*v1beta1.Coin)(nil), // 15: cosmos.base.v1beta1.Coin + (VoteOption)(0), // 16: cosmos.gov.v1.VoteOption + (*WeightedVoteOption)(nil), // 17: cosmos.gov.v1.WeightedVoteOption + (*Params)(nil), // 18: cosmos.gov.v1.Params + (*CrossChainParamsChange)(nil), // 19: cosmos.gov.v1.CrossChainParamsChange } var file_cosmos_gov_v1_tx_proto_depIdxs = []int32{ - 12, // 0: cosmos.gov.v1.MsgSubmitProposal.messages:type_name -> google.protobuf.Any - 13, // 1: cosmos.gov.v1.MsgSubmitProposal.initial_deposit:type_name -> cosmos.base.v1beta1.Coin - 12, // 2: cosmos.gov.v1.MsgExecLegacyContent.content:type_name -> google.protobuf.Any - 14, // 3: cosmos.gov.v1.MsgVote.option:type_name -> cosmos.gov.v1.VoteOption - 15, // 4: cosmos.gov.v1.MsgVoteWeighted.options:type_name -> cosmos.gov.v1.WeightedVoteOption - 13, // 5: cosmos.gov.v1.MsgDeposit.amount:type_name -> cosmos.base.v1beta1.Coin - 16, // 6: cosmos.gov.v1.MsgUpdateParams.params:type_name -> cosmos.gov.v1.Params - 0, // 7: cosmos.gov.v1.Msg.SubmitProposal:input_type -> cosmos.gov.v1.MsgSubmitProposal - 2, // 8: cosmos.gov.v1.Msg.ExecLegacyContent:input_type -> cosmos.gov.v1.MsgExecLegacyContent - 4, // 9: cosmos.gov.v1.Msg.Vote:input_type -> cosmos.gov.v1.MsgVote - 6, // 10: cosmos.gov.v1.Msg.VoteWeighted:input_type -> cosmos.gov.v1.MsgVoteWeighted - 8, // 11: cosmos.gov.v1.Msg.Deposit:input_type -> cosmos.gov.v1.MsgDeposit - 10, // 12: cosmos.gov.v1.Msg.UpdateParams:input_type -> cosmos.gov.v1.MsgUpdateParams - 1, // 13: cosmos.gov.v1.Msg.SubmitProposal:output_type -> cosmos.gov.v1.MsgSubmitProposalResponse - 3, // 14: cosmos.gov.v1.Msg.ExecLegacyContent:output_type -> cosmos.gov.v1.MsgExecLegacyContentResponse - 5, // 15: cosmos.gov.v1.Msg.Vote:output_type -> cosmos.gov.v1.MsgVoteResponse - 7, // 16: cosmos.gov.v1.Msg.VoteWeighted:output_type -> cosmos.gov.v1.MsgVoteWeightedResponse - 9, // 17: cosmos.gov.v1.Msg.Deposit:output_type -> cosmos.gov.v1.MsgDepositResponse - 11, // 18: cosmos.gov.v1.Msg.UpdateParams:output_type -> cosmos.gov.v1.MsgUpdateParamsResponse - 13, // [13:19] is the sub-list for method output_type - 7, // [7:13] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 14, // 0: cosmos.gov.v1.MsgSubmitProposal.messages:type_name -> google.protobuf.Any + 15, // 1: cosmos.gov.v1.MsgSubmitProposal.initial_deposit:type_name -> cosmos.base.v1beta1.Coin + 14, // 2: cosmos.gov.v1.MsgExecLegacyContent.content:type_name -> google.protobuf.Any + 16, // 3: cosmos.gov.v1.MsgVote.option:type_name -> cosmos.gov.v1.VoteOption + 17, // 4: cosmos.gov.v1.MsgVoteWeighted.options:type_name -> cosmos.gov.v1.WeightedVoteOption + 15, // 5: cosmos.gov.v1.MsgDeposit.amount:type_name -> cosmos.base.v1beta1.Coin + 18, // 6: cosmos.gov.v1.MsgUpdateParams.params:type_name -> cosmos.gov.v1.Params + 19, // 7: cosmos.gov.v1.MsgUpdateCrossChainParams.params:type_name -> cosmos.gov.v1.CrossChainParamsChange + 0, // 8: cosmos.gov.v1.Msg.SubmitProposal:input_type -> cosmos.gov.v1.MsgSubmitProposal + 2, // 9: cosmos.gov.v1.Msg.ExecLegacyContent:input_type -> cosmos.gov.v1.MsgExecLegacyContent + 4, // 10: cosmos.gov.v1.Msg.Vote:input_type -> cosmos.gov.v1.MsgVote + 6, // 11: cosmos.gov.v1.Msg.VoteWeighted:input_type -> cosmos.gov.v1.MsgVoteWeighted + 8, // 12: cosmos.gov.v1.Msg.Deposit:input_type -> cosmos.gov.v1.MsgDeposit + 10, // 13: cosmos.gov.v1.Msg.UpdateParams:input_type -> cosmos.gov.v1.MsgUpdateParams + 12, // 14: cosmos.gov.v1.Msg.UpdateCrossChainParams:input_type -> cosmos.gov.v1.MsgUpdateCrossChainParams + 1, // 15: cosmos.gov.v1.Msg.SubmitProposal:output_type -> cosmos.gov.v1.MsgSubmitProposalResponse + 3, // 16: cosmos.gov.v1.Msg.ExecLegacyContent:output_type -> cosmos.gov.v1.MsgExecLegacyContentResponse + 5, // 17: cosmos.gov.v1.Msg.Vote:output_type -> cosmos.gov.v1.MsgVoteResponse + 7, // 18: cosmos.gov.v1.Msg.VoteWeighted:output_type -> cosmos.gov.v1.MsgVoteWeightedResponse + 9, // 19: cosmos.gov.v1.Msg.Deposit:output_type -> cosmos.gov.v1.MsgDepositResponse + 11, // 20: cosmos.gov.v1.Msg.UpdateParams:output_type -> cosmos.gov.v1.MsgUpdateParamsResponse + 13, // 21: cosmos.gov.v1.Msg.UpdateCrossChainParams:output_type -> cosmos.gov.v1.MsgUpdateCrossChainParamsResponse + 15, // [15:22] is the sub-list for method output_type + 8, // [8:15] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_cosmos_gov_v1_tx_proto_init() } @@ -6874,6 +7832,30 @@ func file_cosmos_gov_v1_tx_proto_init() { return nil } } + file_cosmos_gov_v1_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateCrossChainParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_gov_v1_tx_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateCrossChainParamsResponse); 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{ @@ -6881,7 +7863,7 @@ func file_cosmos_gov_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_gov_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 12, + NumMessages: 14, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/gov/v1/tx_grpc.pb.go b/api/cosmos/gov/v1/tx_grpc.pb.go index eb59a3f78f..4624a4bc5e 100644 --- a/api/cosmos/gov/v1/tx_grpc.pb.go +++ b/api/cosmos/gov/v1/tx_grpc.pb.go @@ -21,12 +21,13 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Msg_SubmitProposal_FullMethodName = "/cosmos.gov.v1.Msg/SubmitProposal" - Msg_ExecLegacyContent_FullMethodName = "/cosmos.gov.v1.Msg/ExecLegacyContent" - Msg_Vote_FullMethodName = "/cosmos.gov.v1.Msg/Vote" - Msg_VoteWeighted_FullMethodName = "/cosmos.gov.v1.Msg/VoteWeighted" - Msg_Deposit_FullMethodName = "/cosmos.gov.v1.Msg/Deposit" - Msg_UpdateParams_FullMethodName = "/cosmos.gov.v1.Msg/UpdateParams" + Msg_SubmitProposal_FullMethodName = "/cosmos.gov.v1.Msg/SubmitProposal" + Msg_ExecLegacyContent_FullMethodName = "/cosmos.gov.v1.Msg/ExecLegacyContent" + Msg_Vote_FullMethodName = "/cosmos.gov.v1.Msg/Vote" + Msg_VoteWeighted_FullMethodName = "/cosmos.gov.v1.Msg/VoteWeighted" + Msg_Deposit_FullMethodName = "/cosmos.gov.v1.Msg/Deposit" + Msg_UpdateParams_FullMethodName = "/cosmos.gov.v1.Msg/UpdateParams" + Msg_UpdateCrossChainParams_FullMethodName = "/cosmos.gov.v1.Msg/UpdateCrossChainParams" ) // MsgClient is the client API for Msg service. @@ -49,6 +50,8 @@ type MsgClient interface { // // Since: cosmos-sdk 0.47 UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + // UpdateCrossChainParams defines a method to send IBC package to update cross-chain params + UpdateCrossChainParams(ctx context.Context, in *MsgUpdateCrossChainParams, opts ...grpc.CallOption) (*MsgUpdateCrossChainParamsResponse, error) } type msgClient struct { @@ -113,6 +116,15 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } +func (c *msgClient) UpdateCrossChainParams(ctx context.Context, in *MsgUpdateCrossChainParams, opts ...grpc.CallOption) (*MsgUpdateCrossChainParamsResponse, error) { + out := new(MsgUpdateCrossChainParamsResponse) + err := c.cc.Invoke(ctx, Msg_UpdateCrossChainParams_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 @@ -133,6 +145,8 @@ type MsgServer interface { // // Since: cosmos-sdk 0.47 UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + // UpdateCrossChainParams defines a method to send IBC package to update cross-chain params + UpdateCrossChainParams(context.Context, *MsgUpdateCrossChainParams) (*MsgUpdateCrossChainParamsResponse, error) mustEmbedUnimplementedMsgServer() } @@ -158,6 +172,9 @@ func (UnimplementedMsgServer) Deposit(context.Context, *MsgDeposit) (*MsgDeposit func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } +func (UnimplementedMsgServer) UpdateCrossChainParams(context.Context, *MsgUpdateCrossChainParams) (*MsgUpdateCrossChainParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateCrossChainParams not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -279,6 +296,24 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Msg_UpdateCrossChainParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateCrossChainParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateCrossChainParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateCrossChainParams_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateCrossChainParams(ctx, req.(*MsgUpdateCrossChainParams)) + } + 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) @@ -310,6 +345,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, + { + MethodName: "UpdateCrossChainParams", + Handler: _Msg_UpdateCrossChainParams_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/gov/v1/tx.proto", diff --git a/proto/cosmos/gov/v1/gov.proto b/proto/cosmos/gov/v1/gov.proto index 49bfcc264b..a2669779cc 100644 --- a/proto/cosmos/gov/v1/gov.proto +++ b/proto/cosmos/gov/v1/gov.proto @@ -218,3 +218,14 @@ message Params { // burn deposits if quorum with vote type no_veto is met bool burn_vote_veto = 15; } + +// CrossChainParamsChange defines the parameter change or contract upgrade +message CrossChainParamsChange { + // parameter to be updated or 'upgrade' for contract upgrade + string key = 1; + // values is a new parameter or slice of new contract addresses in hex format + repeated string values = 2; + // targets defines a slice of addresses string in hex format + repeated string targets = 3; +} + diff --git a/proto/cosmos/gov/v1/tx.proto b/proto/cosmos/gov/v1/tx.proto index 1708066c65..89b7003051 100644 --- a/proto/cosmos/gov/v1/tx.proto +++ b/proto/cosmos/gov/v1/tx.proto @@ -37,6 +37,9 @@ service Msg { // // Since: cosmos-sdk 0.47 rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); + + // UpdateCrossChainParams defines a method to send IBC package to update cross-chain params + rpc UpdateCrossChainParams(MsgUpdateCrossChainParams) returns (MsgUpdateCrossChainParamsResponse); } // MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary @@ -170,3 +173,18 @@ message MsgUpdateParams { // // Since: cosmos-sdk 0.47 message MsgUpdateParamsResponse {} + +// MsgUpdateCrossChainParams for cross chain gov +message MsgUpdateCrossChainParams { + option (cosmos.msg.v1.signer) = "authority"; + option (amino.name) = "cosmos-sdk/x/gov/v1/MsgUpdateCrossChainParams"; + + // authority is the address that controls the module (defaults to x/gov unless overwritten). + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // for cross chain param change or contract upgrade + CrossChainParamsChange params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +// MsgUpdateCrossChainParamsResponse defines the response structure for executing a MsgUpdateCrossChainParams message. +message MsgUpdateCrossChainParamsResponse {} diff --git a/simapp/app.go b/simapp/app.go index 4d36bd7736..881e8f6195 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -357,6 +357,7 @@ func NewSimApp( // set the governance module account as the authority for conducting upgrades app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath, app.BaseApp, authtypes.NewModuleAddress(govtypes.ModuleName).String()) + app.CrossChainKeeper = crosschainkeeper.NewKeeper(appCodec, keys[crosschaintypes.StoreKey], authtypes.NewModuleAddress(govtypes.ModuleName).String()) // Register the proposal types // Deprecated: Avoid adding new handlers, instead use the new proposal flow // by granting the governance module the right to execute the message. @@ -372,7 +373,7 @@ func NewSimApp( */ govKeeper := govkeeper.NewKeeper( appCodec, keys[govtypes.StoreKey], app.AccountKeeper, app.BankKeeper, - app.StakingKeeper, app.MsgServiceRouter(), govConfig, authtypes.NewModuleAddress(govtypes.ModuleName).String(), + app.StakingKeeper, app.CrossChainKeeper, app.MsgServiceRouter(), govConfig, authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) // Set legacy router for backwards compatibility with gov v1beta1 diff --git a/tests/integration/gov/genesis_test.go b/tests/integration/gov/genesis_test.go index ab4ea1e178..d918514b34 100644 --- a/tests/integration/gov/genesis_test.go +++ b/tests/integration/gov/genesis_test.go @@ -21,6 +21,7 @@ import ( bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" _ "github.com/cosmos/cosmos-sdk/x/consensus" + _ "github.com/cosmos/cosmos-sdk/x/crosschain" _ "github.com/cosmos/cosmos-sdk/x/distribution" distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" @@ -52,6 +53,7 @@ var appConfig = configurator.NewAppConfig( configurator.StakingModule(), configurator.BankModule(), configurator.GovModule(), + configurator.CrossChainModule(), configurator.DistributionModule(), configurator.MintModule(), configurator.ConsensusModule(), diff --git a/tests/integration/gov/module_test.go b/tests/integration/gov/module_test.go index a8b6567ad2..7bbb140e1f 100644 --- a/tests/integration/gov/module_test.go +++ b/tests/integration/gov/module_test.go @@ -18,6 +18,7 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" _ "github.com/cosmos/cosmos-sdk/x/authz/module" + _ "github.com/cosmos/cosmos-sdk/x/crosschain" _ "github.com/cosmos/cosmos-sdk/x/distribution" "github.com/cosmos/cosmos-sdk/x/gov/types" ) diff --git a/testutil/configurator/configurator.go b/testutil/configurator/configurator.go index 79f480ecba..404b3aeedc 100644 --- a/testutil/configurator/configurator.go +++ b/testutil/configurator/configurator.go @@ -7,11 +7,16 @@ import ( authzmodulev1 "cosmossdk.io/api/cosmos/authz/module/v1" bankmodulev1 "cosmossdk.io/api/cosmos/bank/module/v1" consensusmodulev1 "cosmossdk.io/api/cosmos/consensus/module/v1" + crosschainmodulev1 "cosmossdk.io/api/cosmos/crosschain/module/v1" distrmodulev1 "cosmossdk.io/api/cosmos/distribution/module/v1" + evidencemodulev1 "cosmossdk.io/api/cosmos/evidence/module/v1" feegrantmodulev1 "cosmossdk.io/api/cosmos/feegrant/module/v1" genutilmodulev1 "cosmossdk.io/api/cosmos/genutil/module/v1" govmodulev1 "cosmossdk.io/api/cosmos/gov/module/v1" + groupmodulev1 "cosmossdk.io/api/cosmos/group/module/v1" mintmodulev1 "cosmossdk.io/api/cosmos/mint/module/v1" + nftmodulev1 "cosmossdk.io/api/cosmos/nft/module/v1" + oraclemodulev1 "cosmossdk.io/api/cosmos/oracle/module/v1" paramsmodulev1 "cosmossdk.io/api/cosmos/params/module/v1" slashingmodulev1 "cosmossdk.io/api/cosmos/slashing/module/v1" stakingmodulev1 "cosmossdk.io/api/cosmos/staking/module/v1" @@ -42,6 +47,8 @@ var beginBlockOrder = []string{ "params", "consensus", "vesting", + "crosschain", + "oracle", } var endBlockersOrder = []string{ @@ -65,6 +72,8 @@ var endBlockersOrder = []string{ "consensus", "upgrade", "vesting", + "crosschain", + "oracle", } var initGenesisOrder = []string{ @@ -88,6 +97,8 @@ var initGenesisOrder = []string{ "consensus", "upgrade", "vesting", + "crosschain", + "oracle", } type appConfig struct { @@ -119,6 +130,8 @@ func AuthModule() ModuleOption { {Account: "bonded_tokens_pool", Permissions: []string{"burner", "staking"}}, {Account: "not_bonded_tokens_pool", Permissions: []string{"burner", "staking"}}, {Account: "gov", Permissions: []string{"burner"}}, + {Account: "nft"}, + {Account: "crosschain", Permissions: []string{"minter"}}, }, }), } @@ -239,6 +252,51 @@ func MintModule() ModuleOption { } } +func EvidenceModule() ModuleOption { + return func(config *appConfig) { + config.moduleConfigs["evidence"] = &appv1alpha1.ModuleConfig{ + Name: "evidence", + Config: appconfig.WrapAny(&evidencemodulev1.Module{}), + } + } +} + +func GroupModule() ModuleOption { + return func(config *appConfig) { + config.moduleConfigs["group"] = &appv1alpha1.ModuleConfig{ + Name: "group", + Config: appconfig.WrapAny(&groupmodulev1.Module{}), + } + } +} + +func NFTModule() ModuleOption { + return func(config *appConfig) { + config.moduleConfigs["nft"] = &appv1alpha1.ModuleConfig{ + Name: "nft", + Config: appconfig.WrapAny(&nftmodulev1.Module{}), + } + } +} + +func CrossChainModule() ModuleOption { + return func(config *appConfig) { + config.moduleConfigs["crosschain"] = &appv1alpha1.ModuleConfig{ + Name: "crosschain", + Config: appconfig.WrapAny(&crosschainmodulev1.Module{}), + } + } +} + +func OracleModule() ModuleOption { + return func(config *appConfig) { + config.moduleConfigs["oracle"] = &appv1alpha1.ModuleConfig{ + Name: "oracle", + Config: appconfig.WrapAny(&oraclemodulev1.Module{}), + } + } +} + func OmitInitGenesis() ModuleOption { return func(config *appConfig) { config.setInitGenesis = false diff --git a/x/bank/app_test.go b/x/bank/app_test.go index dc1ad79579..6b5d116ed9 100644 --- a/x/bank/app_test.go +++ b/x/bank/app_test.go @@ -23,6 +23,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/bank/testutil" "github.com/cosmos/cosmos-sdk/x/bank/types" _ "github.com/cosmos/cosmos-sdk/x/consensus" + _ "github.com/cosmos/cosmos-sdk/x/crosschain" + _ "github.com/cosmos/cosmos-sdk/x/distribution" _ "github.com/cosmos/cosmos-sdk/x/gov" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" _ "github.com/cosmos/cosmos-sdk/x/params" @@ -115,6 +117,7 @@ func createTestSuite(t *testing.T, genesisAccounts []authtypes.GenesisAccount) s configurator.ConsensusModule(), configurator.BankModule(), configurator.GovModule(), + configurator.CrossChainModule(), ), startupCfg, &res.BankKeeper, &res.AccountKeeper) diff --git a/x/gov/common_test.go b/x/gov/common_test.go index 2f5178cbb6..19eb512326 100644 --- a/x/gov/common_test.go +++ b/x/gov/common_test.go @@ -23,6 +23,8 @@ import ( _ "github.com/cosmos/cosmos-sdk/x/bank" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" _ "github.com/cosmos/cosmos-sdk/x/consensus" + _ "github.com/cosmos/cosmos-sdk/x/crosschain" + _ "github.com/cosmos/cosmos-sdk/x/distribution" "github.com/cosmos/cosmos-sdk/x/gov/keeper" "github.com/cosmos/cosmos-sdk/x/gov/types" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" @@ -120,6 +122,7 @@ func createTestSuite(t *testing.T) suite { configurator.BankModule(), configurator.AuthzModule(), configurator.GovModule(), + configurator.CrossChainModule(), configurator.ConsensusModule(), ), simtestutil.DefaultStartUpConfig(), diff --git a/x/gov/keeper/common_test.go b/x/gov/keeper/common_test.go index cd3aa29fcc..7283530e0c 100644 --- a/x/gov/keeper/common_test.go +++ b/x/gov/keeper/common_test.go @@ -49,6 +49,7 @@ func setupGovKeeper(t *testing.T) ( *govtestutil.MockAccountKeeper, *govtestutil.MockBankKeeper, *govtestutil.MockStakingKeeper, + *govtestutil.MockCrossChainKeeper, moduletestutil.TestEncodingConfig, sdk.Context, ) { @@ -69,6 +70,8 @@ func setupGovKeeper(t *testing.T) ( acctKeeper := govtestutil.NewMockAccountKeeper(ctrl) bankKeeper := govtestutil.NewMockBankKeeper(ctrl) stakingKeeper := govtestutil.NewMockStakingKeeper(ctrl) + crossChainKeeper := govtestutil.NewMockCrossChainKeeper(ctrl) + acctKeeper.EXPECT().GetModuleAddress(types.ModuleName).Return(govAcct).AnyTimes() acctKeeper.EXPECT().GetModuleAccount(gomock.Any(), types.ModuleName).Return(authtypes.NewEmptyModuleAccount(types.ModuleName)).AnyTimes() trackMockBalances(bankKeeper) @@ -81,19 +84,21 @@ func setupGovKeeper(t *testing.T) ( stakingKeeper.EXPECT().TotalBondedTokens(gomock.Any()).Return(math.NewInt(10000000)).AnyTimes() // Gov keeper initializations - govKeeper := keeper.NewKeeper(encCfg.Codec, key, acctKeeper, bankKeeper, stakingKeeper, msr, types.DefaultConfig(), govAcct.String()) + govKeeper := keeper.NewKeeper(encCfg.Codec, key, acctKeeper, bankKeeper, stakingKeeper, crossChainKeeper, msr, types.DefaultConfig(), govAcct.String()) govKeeper.SetProposalID(ctx, 1) govRouter := v1beta1.NewRouter() // Also register legacy gov handlers to test them too. govRouter.AddRoute(types.RouterKey, v1beta1.ProposalHandler) govKeeper.SetLegacyRouter(govRouter) govKeeper.SetParams(ctx, v1.DefaultParams()) + crossChainKeeper.EXPECT().CreateRawIBCPackageWithFee(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(uint64(0), nil).AnyTimes() + // Register all handlers for the MegServiceRouter. msr.SetInterfaceRegistry(encCfg.InterfaceRegistry) v1.RegisterMsgServer(msr, keeper.NewMsgServerImpl(govKeeper)) banktypes.RegisterMsgServer(msr, nil) // Nil is fine here as long as we never execute the proposal's Msgs. - return govKeeper, acctKeeper, bankKeeper, stakingKeeper, encCfg, ctx + return govKeeper, acctKeeper, bankKeeper, stakingKeeper, crossChainKeeper, encCfg, ctx } // trackMockBalances sets up expected calls on the Mock BankKeeper, and also diff --git a/x/gov/keeper/crosschain.go b/x/gov/keeper/crosschain.go new file mode 100644 index 0000000000..7f514e6ec5 --- /dev/null +++ b/x/gov/keeper/crosschain.go @@ -0,0 +1,75 @@ +package keeper + +import ( + "encoding/hex" + "math/big" + + sdkerrors "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/bsc/rlp" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" +) + +func (k Keeper) RegisterCrossChainSyncParamsApp() error { + return k.crossChainKeeper.RegisterChannel(types.SyncParamsChannel, types.SyncParamsChannelID, k) +} + +func (k Keeper) SyncParams(ctx sdk.Context, cpc govv1.CrossChainParamsChange) error { + if err := cpc.ValidateBasic(); err != nil { + return err + } + values := make([]byte, 0) + addresses := make([]byte, 0) + + for i, v := range cpc.Values { + var value []byte + var err error + if cpc.Key == types.KeyUpgrade { + value = sdk.MustAccAddressFromHex(v) + } else { + value, err = hex.DecodeString(v) + if err != nil { + return sdkerrors.Wrapf(types.ErrInvalidValue, "value is not valid %s", v) + } + } + values = append(values, value...) + addr := sdk.MustAccAddressFromHex(cpc.Targets[i]) + addresses = append(addresses, addr.Bytes()...) + } + + pack := types.SyncParamsPackage{ + Key: cpc.Key, + Value: values, + Target: addresses, + } + + encodedPackage, err := rlp.EncodeToBytes(pack) + if err != nil { + return sdkerrors.Wrapf(types.ErrInvalidUpgradeProposal, "encode sync params package error") + } + _, err = k.crossChainKeeper.CreateRawIBCPackageWithFee( + ctx, + types.SyncParamsChannelID, + sdk.SynCrossChainPackageType, + encodedPackage, + big.NewInt(0), + big.NewInt(0), + ) + return err +} + +func (k Keeper) ExecuteSynPackage(ctx sdk.Context, _ *sdk.CrossChainAppContext, payload []byte) sdk.ExecuteResult { + k.Logger(ctx).Error("received sync params sync package", "payload", hex.EncodeToString(payload)) + return sdk.ExecuteResult{} +} + +func (k Keeper) ExecuteAckPackage(ctx sdk.Context, _ *sdk.CrossChainAppContext, payload []byte) sdk.ExecuteResult { + k.Logger(ctx).Error("received sync params in ack package", "payload", hex.EncodeToString(payload)) + return sdk.ExecuteResult{} +} + +func (k Keeper) ExecuteFailAckPackage(ctx sdk.Context, _ *sdk.CrossChainAppContext, payload []byte) sdk.ExecuteResult { + k.Logger(ctx).Error("received sync params fail ack package", "payload", hex.EncodeToString(payload)) + return sdk.ExecuteResult{} +} diff --git a/x/gov/keeper/deposit_test.go b/x/gov/keeper/deposit_test.go index 204dc66508..67bfedcee6 100644 --- a/x/gov/keeper/deposit_test.go +++ b/x/gov/keeper/deposit_test.go @@ -16,7 +16,7 @@ const ( ) func TestDeposits(t *testing.T) { - govKeeper, _, bankKeeper, stakingKeeper, _, ctx := setupGovKeeper(t) + govKeeper, _, bankKeeper, stakingKeeper, _, _, ctx := setupGovKeeper(t) trackMockBalances(bankKeeper) TestAddrs := simtestutil.AddTestAddrsIncremental(bankKeeper, stakingKeeper, ctx, 2, sdk.NewInt(10000000)) @@ -193,7 +193,7 @@ func TestValidateInitialDeposit(t *testing.T) { for name, tc := range testcases { t.Run(name, func(t *testing.T) { - govKeeper, _, _, _, _, ctx := setupGovKeeper(t) + govKeeper, _, _, _, _, _, ctx := setupGovKeeper(t) params := v1.DefaultParams() params.MinDeposit = tc.minDeposit diff --git a/x/gov/keeper/hooks_test.go b/x/gov/keeper/hooks_test.go index ab3cf089ed..4b7c795b26 100644 --- a/x/gov/keeper/hooks_test.go +++ b/x/gov/keeper/hooks_test.go @@ -47,7 +47,7 @@ func (h *MockGovHooksReceiver) AfterProposalVotingPeriodEnded(ctx sdk.Context, p func TestHooks(t *testing.T) { minDeposit := v1.DefaultParams().MinDeposit - govKeeper, _, bankKeeper, stakingKeeper, _, ctx := setupGovKeeper(t) + govKeeper, _, bankKeeper, stakingKeeper, _, _, ctx := setupGovKeeper(t) addrs := simtestutil.AddTestAddrs(bankKeeper, stakingKeeper, ctx, 1, minDeposit[0].Amount) govHooksReceiver := MockGovHooksReceiver{} diff --git a/x/gov/keeper/keeper.go b/x/gov/keeper/keeper.go index 7357be60bb..333566cf5e 100644 --- a/x/gov/keeper/keeper.go +++ b/x/gov/keeper/keeper.go @@ -18,8 +18,9 @@ import ( // Keeper defines the governance module Keeper type Keeper struct { - authKeeper types.AccountKeeper - bankKeeper types.BankKeeper + authKeeper types.AccountKeeper + bankKeeper types.BankKeeper + crossChainKeeper types.CrossChainKeeper // The reference to the DelegationSet and ValidatorSet to get information about validators and delegators sk types.StakingKeeper @@ -60,7 +61,7 @@ func (k Keeper) GetAuthority() string { // CONTRACT: the parameter Subspace must have the param key table already initialized func NewKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, authKeeper types.AccountKeeper, - bankKeeper types.BankKeeper, sk types.StakingKeeper, + bankKeeper types.BankKeeper, sk types.StakingKeeper, crossChainKeeper types.CrossChainKeeper, router *baseapp.MsgServiceRouter, config types.Config, authority string, ) *Keeper { // ensure governance module account is set @@ -78,14 +79,15 @@ func NewKeeper( } return &Keeper{ - storeKey: key, - authKeeper: authKeeper, - bankKeeper: bankKeeper, - sk: sk, - cdc: cdc, - router: router, - config: config, - authority: authority, + storeKey: key, + authKeeper: authKeeper, + bankKeeper: bankKeeper, + sk: sk, + crossChainKeeper: crossChainKeeper, + cdc: cdc, + router: router, + config: config, + authority: authority, } } diff --git a/x/gov/keeper/keeper_test.go b/x/gov/keeper/keeper_test.go index e41487302f..e9300985d7 100644 --- a/x/gov/keeper/keeper_test.go +++ b/x/gov/keeper/keeper_test.go @@ -27,6 +27,7 @@ type KeeperTestSuite struct { acctKeeper *govtestutil.MockAccountKeeper bankKeeper *govtestutil.MockBankKeeper stakingKeeper *govtestutil.MockStakingKeeper + crossChainKeeper *govtestutil.MockCrossChainKeeper queryClient v1.QueryClient legacyQueryClient v1beta1.QueryClient addrs []sdk.AccAddress @@ -39,7 +40,7 @@ func (suite *KeeperTestSuite) SetupSuite() { } func (suite *KeeperTestSuite) reset() { - govKeeper, acctKeeper, bankKeeper, stakingKeeper, encCfg, ctx := setupGovKeeper(suite.T()) + govKeeper, acctKeeper, bankKeeper, stakingKeeper, crossChainKeeper, encCfg, ctx := setupGovKeeper(suite.T()) // Populate the gov account with some coins, as the TestProposal we have // is a MsgSend from the gov account. @@ -61,6 +62,7 @@ func (suite *KeeperTestSuite) reset() { suite.acctKeeper = acctKeeper suite.bankKeeper = bankKeeper suite.stakingKeeper = stakingKeeper + suite.crossChainKeeper = crossChainKeeper suite.cdc = encCfg.Codec suite.queryClient = queryClient suite.legacyQueryClient = legacyQueryClient @@ -71,7 +73,7 @@ func (suite *KeeperTestSuite) reset() { } func TestIncrementProposalNumber(t *testing.T) { - govKeeper, _, _, _, _, ctx := setupGovKeeper(t) + govKeeper, _, _, _, _, _, ctx := setupGovKeeper(t) tp := TestProposal _, err := govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("0x45f3624b98fCfc4D7A6b37B0957b656878636773")) @@ -91,7 +93,7 @@ func TestIncrementProposalNumber(t *testing.T) { } func TestProposalQueues(t *testing.T) { - govKeeper, _, _, _, _, ctx := setupGovKeeper(t) + govKeeper, _, _, _, _, _, ctx := setupGovKeeper(t) // create test proposals tp := TestProposal diff --git a/x/gov/keeper/msg_server.go b/x/gov/keeper/msg_server.go index 336ca466d0..ba5739fd45 100644 --- a/x/gov/keeper/msg_server.go +++ b/x/gov/keeper/msg_server.go @@ -202,6 +202,18 @@ func (k msgServer) UpdateParams(goCtx context.Context, msg *v1.MsgUpdateParams) return &v1.MsgUpdateParamsResponse{}, nil } +// UpdateCrossChainParams implements the MsgServer.UpdateCrossChainParams method. +func (k msgServer) UpdateCrossChainParams(goCtx context.Context, msg *v1.MsgUpdateCrossChainParams) (*v1.MsgUpdateCrossChainParamsResponse, error) { + if k.authority != msg.Authority { + return nil, errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", k.authority, msg.Authority) + } + ctx := sdk.UnwrapSDKContext(goCtx) + if err := k.SyncParams(ctx, msg.Params); err != nil { + return nil, err + } + return &v1.MsgUpdateCrossChainParamsResponse{}, nil +} + type legacyMsgServer struct { govAcct string server v1.MsgServer diff --git a/x/gov/keeper/proposal_test.go b/x/gov/keeper/proposal_test.go index c1ec4ad3b8..5308d9defc 100644 --- a/x/gov/keeper/proposal_test.go +++ b/x/gov/keeper/proposal_test.go @@ -208,3 +208,91 @@ func TestMigrateProposalMessages(t *testing.T) { require.Equal(t, "Test", content.GetTitle()) require.Equal(t, "description", content.GetDescription()) } + +func (suite *KeeperTestSuite) TestUpdateCrossChainParams() { + testCases := []struct { + name string + request *v1.MsgUpdateCrossChainParams + expectErr bool + }{ + { + name: "set invalid authority", + request: &v1.MsgUpdateCrossChainParams{ + Authority: "0x76d244CE05c3De4BbC6fDd7F56379B145709ade9", + }, + expectErr: true, + }, + { + name: "parameter change should restrict values and targets only be size 1", + request: &v1.MsgUpdateCrossChainParams{ + Authority: suite.govKeeper.GetAuthority(), + Params: v1.CrossChainParamsChange{ + Key: "batchSizeForOracle", + Values: []string{"0000000000000000000000000000000000000000000000000000000000000033", "0000000000000000000000000000000000000000000000000000000000000034"}, + Targets: []string{"0x76d244CE05c3De4BbC6fDd7F56379B145709ade9", "0x76d244CE05c3De4BbC6fDd7F56379B145709ade9"}, + }, + }, + expectErr: true, + }, + { + name: "'values' and 'targets' should all be hex address for contract upgrade", + request: &v1.MsgUpdateCrossChainParams{ + Authority: suite.govKeeper.GetAuthority(), + Params: v1.CrossChainParamsChange{ + Key: "upgrade", + Values: []string{"not_an_hex_address"}, + Targets: []string{"not_an_hex_address"}, + }, + }, + expectErr: true, + }, + { + name: "'values' and 'targets' size not match", + request: &v1.MsgUpdateCrossChainParams{ + Authority: suite.govKeeper.GetAuthority(), + Params: v1.CrossChainParamsChange{ + Key: "upgrade", + Values: []string{"0x76d244CE05c3De4BbC6fDd7F56379B145709ade9", "0xeAE67217D95E786a9309A363437066428b97c046"}, + Targets: []string{"0xeAE67217D95E786a9309A363437066428b97c046"}, + }, + }, + expectErr: true, + }, + { + name: "single parameter change should work", + request: &v1.MsgUpdateCrossChainParams{ + Authority: suite.govKeeper.GetAuthority(), + Params: v1.CrossChainParamsChange{ + Key: "batchSizeForOracle", + Values: []string{"0000000000000000000000000000000000000000000000000000000000000033"}, + Targets: []string{"0x76d244CE05c3De4BbC6fDd7F56379B145709ade9"}, + }, + }, + expectErr: false, + }, + { + name: "upgrade smart contract", + request: &v1.MsgUpdateCrossChainParams{ + Authority: suite.govKeeper.GetAuthority(), + Params: v1.CrossChainParamsChange{ + Key: "upgrade", + Values: []string{"0xeAE67217D95E786a9309A363437066428b97c046"}, + Targets: []string{"0x76d244CE05c3De4BbC6fDd7F56379B145709ade9"}, + }, + }, + expectErr: false, + }, + } + + for _, tc := range testCases { + tc := tc + suite.Run(tc.name, func() { + _, err := suite.msgSrvr.UpdateCrossChainParams(suite.ctx, tc.request) + if tc.expectErr { + suite.Require().Error(err) + } else { + suite.Require().NoError(err) + } + }) + } +} diff --git a/x/gov/keeper/vote_test.go b/x/gov/keeper/vote_test.go index 6aa1f2b2bc..d52f9ae810 100644 --- a/x/gov/keeper/vote_test.go +++ b/x/gov/keeper/vote_test.go @@ -11,7 +11,7 @@ import ( ) func TestVotes(t *testing.T) { - govKeeper, _, bankKeeper, stakingKeeper, _, ctx := setupGovKeeper(t) + govKeeper, _, bankKeeper, stakingKeeper, _, _, ctx := setupGovKeeper(t) addrs := simtestutil.AddTestAddrsIncremental(bankKeeper, stakingKeeper, ctx, 2, sdk.NewInt(10000000)) tp := TestProposal diff --git a/x/gov/module.go b/x/gov/module.go index 54199c1fb8..83fcec3ae6 100644 --- a/x/gov/module.go +++ b/x/gov/module.go @@ -171,9 +171,10 @@ type GovInputs struct { ModuleKey depinject.OwnModuleKey MsgServiceRouter *baseapp.MsgServiceRouter - AccountKeeper govtypes.AccountKeeper - BankKeeper govtypes.BankKeeper - StakingKeeper govtypes.StakingKeeper + AccountKeeper govtypes.AccountKeeper + BankKeeper govtypes.BankKeeper + StakingKeeper govtypes.StakingKeeper + CrossChainKeeper govtypes.CrossChainKeeper // LegacySubspace is used solely for migration of x/params managed parameters LegacySubspace govtypes.ParamSubspace @@ -205,6 +206,7 @@ func ProvideModule(in GovInputs) GovOutputs { in.AccountKeeper, in.BankKeeper, in.StakingKeeper, + in.CrossChainKeeper, in.MsgServiceRouter, kConfig, authority.String(), diff --git a/x/gov/simulation/operations_test.go b/x/gov/simulation/operations_test.go index ddd41d3c70..8e8d311410 100644 --- a/x/gov/simulation/operations_test.go +++ b/x/gov/simulation/operations_test.go @@ -11,6 +11,8 @@ import ( "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/codec" + crosschainkeeper "github.com/cosmos/cosmos-sdk/x/crosschain/keeper" + "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil/configurator" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" @@ -24,7 +26,10 @@ import ( _ "github.com/cosmos/cosmos-sdk/x/bank" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" "github.com/cosmos/cosmos-sdk/x/bank/testutil" + _ "github.com/cosmos/cosmos-sdk/x/consensus" + _ "github.com/cosmos/cosmos-sdk/x/crosschain" + _ "github.com/cosmos/cosmos-sdk/x/distribution" govcodec "github.com/cosmos/cosmos-sdk/x/gov/codec" "github.com/cosmos/cosmos-sdk/x/gov/keeper" "github.com/cosmos/cosmos-sdk/x/gov/simulation" @@ -328,13 +333,14 @@ func TestSimulateMsgVoteWeighted(t *testing.T) { } type suite struct { - cdc codec.Codec - AccountKeeper authkeeper.AccountKeeper - AuthzKeeper authzkeeper.Keeper - BankKeeper bankkeeper.Keeper - GovKeeper *keeper.Keeper - StakingKeeper *stakingkeeper.Keeper - App *runtime.App + cdc codec.Codec + AccountKeeper authkeeper.AccountKeeper + AuthzKeeper authzkeeper.Keeper + BankKeeper bankkeeper.Keeper + GovKeeper *keeper.Keeper + StakingKeeper *stakingkeeper.Keeper + CrossChainKeeper crosschainkeeper.Keeper + App *runtime.App } // returns context and an app with updated mint keeper @@ -350,7 +356,8 @@ func createTestSuite(t *testing.T, isCheckTx bool) (suite, sdk.Context) { configurator.StakingModule(), configurator.ConsensusModule(), configurator.GovModule(), - ), &res.AccountKeeper, &res.AuthzKeeper, &res.BankKeeper, &res.GovKeeper, &res.StakingKeeper, &res.cdc) + configurator.CrossChainModule(), + ), &res.AccountKeeper, &res.AuthzKeeper, &res.BankKeeper, &res.GovKeeper, &res.StakingKeeper, &res.CrossChainKeeper, &res.cdc) require.NoError(t, err) ctx := app.BaseApp.NewContext(isCheckTx, tmproto.Header{}) diff --git a/x/gov/testutil/expected_keepers.go b/x/gov/testutil/expected_keepers.go index 669dbc010b..2a142b6637 100644 --- a/x/gov/testutil/expected_keepers.go +++ b/x/gov/testutil/expected_keepers.go @@ -3,6 +3,8 @@ package testutil import ( + "math/big" + math "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" @@ -33,3 +35,12 @@ type StakingKeeper interface { BondDenom(ctx sdk.Context) string TokensFromConsensusPower(ctx sdk.Context, power int64) math.Int } + +// CrossChainKeeper defines the expected crossChain keeper +type CrossChainKeeper interface { + RegisterChannel(name string, id sdk.ChannelID, app sdk.CrossChainApplication) error + + CreateRawIBCPackageWithFee(ctx sdk.Context, channelID sdk.ChannelID, packageType sdk.CrossChainPackageType, + packageLoad []byte, relayerFee *big.Int, ackRelayerFee *big.Int, + ) (uint64, error) +} diff --git a/x/gov/testutil/expected_keepers_mocks.go b/x/gov/testutil/expected_keepers_mocks.go index 3492e16a4b..a1ca86103e 100644 --- a/x/gov/testutil/expected_keepers_mocks.go +++ b/x/gov/testutil/expected_keepers_mocks.go @@ -6,6 +6,7 @@ package testutil import ( context "context" + "math/big" reflect "reflect" math "cosmossdk.io/math" @@ -1035,3 +1036,56 @@ func (mr *MockStakingKeeperMockRecorder) TotalBondedTokens(arg0 interface{}) *go mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TotalBondedTokens", reflect.TypeOf((*MockStakingKeeper)(nil).TotalBondedTokens), arg0) } + +// MockCrossChainKeeper is a mock of CrossChainKeeper interface. +type MockCrossChainKeeper struct { + ctrl *gomock.Controller + recorder *MockCrossChainKeeperMockRecorder +} + +// MockCrossChainKeeperMockRecorder is the mock recorder for MockCrossChainKeeper. +type MockCrossChainKeeperMockRecorder struct { + mock *MockCrossChainKeeper +} + +// NewMockCrossChainKeeper creates a new mock instance. +func NewMockCrossChainKeeper(ctrl *gomock.Controller) *MockCrossChainKeeper { + mock := &MockCrossChainKeeper{ctrl: ctrl} + mock.recorder = &MockCrossChainKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockCrossChainKeeper) EXPECT() *MockCrossChainKeeperMockRecorder { + return m.recorder +} + +// RegisterChannel mocks base method. +func (m *MockCrossChainKeeper) RegisterChannel(name string, id types.ChannelID, app types.CrossChainApplication) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "RegisterChannel", name, id, app) + ret0, _ := ret[0].(error) + return ret0 +} + +// RegisterChannel indicates an expected call of RegisterChannel. +func (mr *MockCrossChainKeeperMockRecorder) RegisterChannel(name, id, app interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterChannel", reflect.TypeOf((*MockCrossChainKeeper)(nil).RegisterChannel), name, id, app) +} + +// CreateRawIBCPackageWithFee mocks base method. +func (m *MockCrossChainKeeper) CreateRawIBCPackageWithFee(ctx types.Context, channelID types.ChannelID, packageType types.CrossChainPackageType, + packageLoad []byte, relayerFee, ackRelayerFee *big.Int) (uint64, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateRawIBCPackageWithFee", ctx, channelID, packageType, packageLoad, relayerFee, ackRelayerFee) + ret0, _ := ret[0].(uint64) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateRawIBCPackageWithFee indicates an expected call of CreateRawIBCPackageWithFee. +func (mr *MockCrossChainKeeperMockRecorder) CreateRawIBCPackageWithFee(ctx, channelID, packageType, packageLoad, relayerFee, ackRelayerFee interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRawIBCPackageWithFee", reflect.TypeOf((*MockCrossChainKeeper)(nil).CreateRawIBCPackageWithFee), ctx, channelID, packageType, packageLoad, relayerFee, ackRelayerFee) +} diff --git a/x/gov/types/crosschain.go b/x/gov/types/crosschain.go new file mode 100644 index 0000000000..7c33fb8ff2 --- /dev/null +++ b/x/gov/types/crosschain.go @@ -0,0 +1,21 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +const ( + SyncParamsChannel = "syncParametersChange" + SyncParamsChannelID sdk.ChannelID = 3 + KeyUpgrade = "upgrade" +) + +// SyncParamsPackage is the payload to be encoded for cross-chain IBC package +type SyncParamsPackage struct { + // Key is the parameter to be changed + Key string + // Value is either new parameter or new smart contract address(es) if it is an upgrade proposal + Value []byte + // Target is the smart contract address(es) + Target []byte +} diff --git a/x/gov/types/errors.go b/x/gov/types/errors.go index eb14067caa..bc230b24dd 100644 --- a/x/gov/types/errors.go +++ b/x/gov/types/errors.go @@ -1,6 +1,7 @@ package types import ( + "cosmossdk.io/errors" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) @@ -23,3 +24,15 @@ var ( ErrMetadataTooLong = sdkerrors.Register(ModuleName, 15, "metadata too long") ErrMinDepositTooSmall = sdkerrors.Register(ModuleName, 16, "minimum deposit is too small") ) + +var ( + ErrEmptyChange = errors.Register(ModuleName, 22, "crosschain: change is empty") + ErrEmptyValue = errors.Register(ModuleName, 23, "crosschain: value is empty") + ErrEmptyTarget = errors.Register(ModuleName, 24, "crosschain: target is empty") + + ErrAddressSizeNotMatch = errors.Register(ModuleName, 25, "number of old address not equal to new addresses") + ErrAddressNotValid = errors.Register(ModuleName, 26, "address format is not valid") + ErrExceedParamsChangeLimit = errors.Register(ModuleName, 27, "exceed params change limit") + ErrInvalidUpgradeProposal = errors.Register(ModuleName, 28, "invalid sync params package") + ErrInvalidValue = errors.Register(ModuleName, 29, "decode hex value failed") +) diff --git a/x/gov/types/expected_keepers.go b/x/gov/types/expected_keepers.go index 70f0e5fbe9..d1aef52e12 100644 --- a/x/gov/types/expected_keepers.go +++ b/x/gov/types/expected_keepers.go @@ -1,6 +1,8 @@ package types import ( + "math/big" + "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -50,6 +52,14 @@ type BankKeeper interface { BurnCoins(ctx sdk.Context, name string, amt sdk.Coins) error } +type CrossChainKeeper interface { + CreateRawIBCPackageWithFee(ctx sdk.Context, channelID sdk.ChannelID, packageType sdk.CrossChainPackageType, + packageLoad []byte, relayerFee *big.Int, ackRelayerFee *big.Int, + ) (uint64, error) + + RegisterChannel(name string, id sdk.ChannelID, app sdk.CrossChainApplication) error +} + // Event Hooks // These can be utilized to communicate between a governance keeper and another // keepers. diff --git a/x/gov/types/v1/codec.go b/x/gov/types/v1/codec.go index 1a0031578c..eb297cf28a 100644 --- a/x/gov/types/v1/codec.go +++ b/x/gov/types/v1/codec.go @@ -20,6 +20,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { legacy.RegisterAminoMsg(cdc, &MsgVoteWeighted{}, "cosmos-sdk/v1/MsgVoteWeighted") legacy.RegisterAminoMsg(cdc, &MsgExecLegacyContent{}, "cosmos-sdk/v1/MsgExecLegacyContent") legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "cosmos-sdk/x/gov/v1/MsgUpdateParams") + } // RegisterInterfaces registers the interfaces types with the Interface Registry. @@ -31,6 +32,7 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { &MsgDeposit{}, &MsgExecLegacyContent{}, &MsgUpdateParams{}, + &MsgUpdateCrossChainParams{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/x/gov/types/v1/crosschain.go b/x/gov/types/v1/crosschain.go new file mode 100644 index 0000000000..1d1925b33e --- /dev/null +++ b/x/gov/types/v1/crosschain.go @@ -0,0 +1,45 @@ +package v1 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/gov/types" + "strings" +) + +func NewCrossChainParamsChange(key string, values, targets []string) *CrossChainParamsChange { + return &CrossChainParamsChange{Key: key, Values: values, Targets: targets} +} + +func (m *CrossChainParamsChange) ValidateBasic() error { + if m.Key == "" || len(m.Values) == 0 || len(m.Targets) == 0 { + return types.ErrEmptyChange + } + if len(m.Values) != len(m.Targets) { + return types.ErrAddressSizeNotMatch + } + if m.Key != types.KeyUpgrade && len(m.Values) > 1 { + return types.ErrExceedParamsChangeLimit + } + + for i := 0; i < len(m.Values); i++ { + value := m.Values[i] + target := m.Targets[i] + if len(strings.TrimSpace(value)) == 0 { + return types.ErrEmptyValue + } + if len(strings.TrimSpace(target)) == 0 { + return types.ErrEmptyTarget + } + if m.Key == types.KeyUpgrade { + _, err := sdk.AccAddressFromHexUnsafe(value) + if err != nil { + return types.ErrAddressNotValid + } + } + _, err := sdk.AccAddressFromHexUnsafe(target) + if err != nil { + return types.ErrAddressNotValid + } + } + return nil +} diff --git a/x/gov/types/v1/gov.pb.go b/x/gov/types/v1/gov.pb.go index 747eab5c4c..da9a14c1b7 100644 --- a/x/gov/types/v1/gov.pb.go +++ b/x/gov/types/v1/gov.pb.go @@ -850,6 +850,70 @@ func (m *Params) GetBurnVoteVeto() bool { return false } +// CrossChainParamsChange defines the parameter change or contract upgrade +type CrossChainParamsChange struct { + // parameter to be updated or 'upgrade' for contract upgrade + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // values is a new parameter or slice of new contract addresses in hex format + Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` + // targets defines a slice of addresses string in hex format + Targets []string `protobuf:"bytes,3,rep,name=targets,proto3" json:"targets,omitempty"` +} + +func (m *CrossChainParamsChange) Reset() { *m = CrossChainParamsChange{} } +func (m *CrossChainParamsChange) String() string { return proto.CompactTextString(m) } +func (*CrossChainParamsChange) ProtoMessage() {} +func (*CrossChainParamsChange) Descriptor() ([]byte, []int) { + return fileDescriptor_e05cb1c0d030febb, []int{9} +} +func (m *CrossChainParamsChange) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CrossChainParamsChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CrossChainParamsChange.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 *CrossChainParamsChange) XXX_Merge(src proto.Message) { + xxx_messageInfo_CrossChainParamsChange.Merge(m, src) +} +func (m *CrossChainParamsChange) XXX_Size() int { + return m.Size() +} +func (m *CrossChainParamsChange) XXX_DiscardUnknown() { + xxx_messageInfo_CrossChainParamsChange.DiscardUnknown(m) +} + +var xxx_messageInfo_CrossChainParamsChange proto.InternalMessageInfo + +func (m *CrossChainParamsChange) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *CrossChainParamsChange) GetValues() []string { + if m != nil { + return m.Values + } + return nil +} + +func (m *CrossChainParamsChange) GetTargets() []string { + if m != nil { + return m.Targets + } + return nil +} + func init() { proto.RegisterEnum("cosmos.gov.v1.VoteOption", VoteOption_name, VoteOption_value) proto.RegisterEnum("cosmos.gov.v1.ProposalStatus", ProposalStatus_name, ProposalStatus_value) @@ -862,92 +926,97 @@ 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((*CrossChainParamsChange)(nil), "cosmos.gov.v1.CrossChainParamsChange") } func init() { proto.RegisterFile("cosmos/gov/v1/gov.proto", fileDescriptor_e05cb1c0d030febb) } var fileDescriptor_e05cb1c0d030febb = []byte{ - // 1276 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xcf, 0x73, 0xd3, 0xc6, - 0x17, 0x8f, 0x6c, 0xd9, 0x71, 0x9e, 0x63, 0x47, 0x2c, 0xf9, 0x82, 0x12, 0x88, 0x1d, 0x3c, 0x0c, - 0x93, 0x2f, 0x3f, 0xec, 0x6f, 0xe0, 0x4b, 0x2f, 0xf4, 0xe2, 0xc4, 0xa2, 0x88, 0xa1, 0xb1, 0x2b, - 0x8b, 0x30, 0xf4, 0xa2, 0x91, 0xa3, 0xc5, 0xd9, 0xa9, 0xa5, 0x75, 0xa5, 0xb5, 0xc1, 0x7f, 0x42, - 0x6f, 0x1c, 0x3b, 0x3d, 0xf5, 0xd8, 0x63, 0x0f, 0x4c, 0xef, 0xbd, 0x71, 0x6a, 0x19, 0x2e, 0x6d, - 0x2f, 0xb4, 0x03, 0x87, 0xce, 0xf0, 0x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8d, 0x38, 0xe8, 0x59, - 0x9d, 0x65, 0xdc, 0x37, 0x76, 0x6d, 0xa3, 0xa1, 0xa9, 0xf3, 0x98, 0x77, 0xeb, 0xe6, 0x03, 0xa3, - 0xa1, 0x65, 0x76, 0x8c, 0x97, 0x6f, 0x4b, 0xca, 0xab, 0xb7, 0x25, 0xe5, 0xaf, 0xb7, 0x25, 0xe5, - 0xf9, 0xbb, 0xd2, 0xc2, 0xab, 0x77, 0xa5, 0x85, 0xdf, 0xdf, 0x95, 0x16, 0xbe, 0xbc, 0xd6, 0x25, - 0xec, 0x70, 0xd0, 0xa9, 0x1e, 0x50, 0x5f, 0x7e, 0x2e, 0xcb, 0x9f, 0x1b, 0x91, 0xf7, 0x55, 0xed, - 0x99, 0xf8, 0x17, 0x80, 0x8d, 0xfa, 0x38, 0xe2, 0xdf, 0xf7, 0x59, 0x31, 0x35, 0xb7, 0xfe, 0x09, - 0x00, 0x00, 0xff, 0xff, 0xbc, 0x24, 0x6f, 0xb5, 0x20, 0x0c, 0x00, 0x00, + // 1333 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xcf, 0x6f, 0x13, 0xc7, + 0x17, 0xcf, 0xc6, 0x1b, 0xc7, 0x7e, 0x49, 0x9c, 0x65, 0xc8, 0x37, 0x6c, 0x02, 0x71, 0x82, 0x85, + 0x50, 0xbe, 0xfc, 0xb0, 0xbf, 0x81, 0x2f, 0xbd, 0xd0, 0x8b, 0x13, 0x2f, 0x65, 0x11, 0x8d, 0xdd, + 0xf5, 0x12, 0x44, 0x55, 0x69, 0x35, 0xc9, 0x0e, 0xf6, 0x0a, 0xef, 0x8e, 0xbb, 0x33, 0x36, 0xf8, + 0x4f, 0xe8, 0x8d, 0x63, 0xd5, 0x53, 0x8f, 0x3d, 0xf6, 0x80, 0x7a, 0xef, 0x8d, 0x53, 0x8b, 0xb8, + 0xb4, 0xbd, 0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9b, 0xfa, + 0x86, 0xb6, 0x39, 0x77, 0x63, 0x75, 0xcc, 0x84, 0x2b, 0x20, 0x8e, 0x44, 0x38, 0x86, 0x64, 0x8d, + 0x48, 0x50, 0x15, 0xe6, 0x58, 0x6f, 0x3f, 0x0c, 0xb8, 0x27, 0xda, 0xcc, 0x9c, 0x51, 0x26, 0xc6, + 0xa3, 0x76, 0xd3, 0x1e, 0xdc, 0xd6, 0x9f, 0xff, 0xb9, 0xae, 0x39, 0x90, 0x90, 0x84, 0x18, 0xdd, + 0x03, 0x43, 0x65, 0xd7, 0x23, 0x91, 0x9f, 0xd8, 0xc9, 0x9e, 0xd2, 0x4e, 0x41, 0x31, 0xad, 0xc8, + 0x97, 0xb6, 0x6c, 0x58, 0xe0, 0x94, 0xe3, 0x8e, 0xa7, 0xe4, 0xe6, 0xec, 0x07, 0xd4, 0x68, 0x5e, + 0x52, 0xd3, 0x06, 0xba, 0x0f, 0x67, 0xfa, 0x94, 0x07, 0x51, 0xcb, 0x63, 0x1c, 0xc7, 0x6a, 0x7f, + 0xb9, 0x53, 0xc6, 0xb5, 0x98, 0x50, 0x9b, 0x82, 0x29, 0x03, 0xbb, 0x0b, 0x4a, 0x34, 0xdc, 0x63, + 0xfe, 0x94, 0xb6, 0x16, 0x12, 0x62, 0xba, 0xc5, 0x55, 0xd1, 0x24, 0x1c, 0xfb, 0x98, 0x63, 0x13, + 0x44, 0xdb, 0x3a, 0x87, 0x6b, 0xb4, 0x04, 0x33, 0x3c, 0xe0, 0x1d, 0x62, 0xce, 0x49, 0x45, 0xb2, + 0x40, 0x26, 0xcc, 0xb2, 0x5e, 0x18, 0xe2, 0x78, 0x60, 0xce, 0x4b, 0x79, 0xba, 0x44, 0xff, 0x87, + 0x5c, 0x32, 0x11, 0x24, 0x36, 0x17, 0x4e, 0x18, 0x81, 0x43, 0x64, 0xe9, 0x37, 0x0d, 0xe6, 0x46, + 0x7b, 0xe0, 0x2a, 0xe4, 0x07, 0x84, 0x79, 0x07,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0xe1, 0x7c, 0xc3, 0xa9, + 0x37, 0xea, 0xcd, 0xea, 0x7d, 0xaf, 0xe9, 0x56, 0xdd, 0x07, 0xcd, 0xb1, 0x98, 0x4a, 0x50, 0x1c, + 0x07, 0xd4, 0xac, 0x46, 0xbd, 0x69, 0xbb, 0x5e, 0xc3, 0x72, 0xec, 0x7a, 0xcd, 0xd0, 0xd0, 0x45, + 0x58, 0x1b, 0xc7, 0xec, 0xd5, 0x5d, 0x7b, 0xf7, 0xb3, 0x14, 0x32, 0x8d, 0x56, 0x61, 0x79, 0x1c, + 0xd2, 0xa8, 0x36, 0x9b, 0x56, 0x2d, 0x09, 0x7a, 0x5c, 0xe7, 0x58, 0xf7, 0xac, 0x1d, 0xd7, 0xaa, + 0x19, 0xfa, 0x24, 0xe6, 0x9d, 0xaa, 0x7d, 0xdf, 0xaa, 0x19, 0x33, 0xdb, 0xd6, 0xcb, 0xb7, 0x45, + 0xed, 0xd5, 0xdb, 0xa2, 0xf6, 0xd7, 0xdb, 0xa2, 0xf6, 0xfc, 0x5d, 0x71, 0xea, 0xd5, 0xbb, 0xe2, + 0xd4, 0xef, 0xef, 0x8a, 0x53, 0x5f, 0x5e, 0x6d, 0x05, 0xbc, 0xdd, 0xdb, 0x2f, 0x1f, 0xd0, 0x50, + 0x3d, 0xc6, 0xd5, 0xbf, 0xeb, 0xcc, 0x7f, 0x52, 0x79, 0x26, 0x7f, 0x60, 0xf0, 0x41, 0x97, 0x30, + 0xf1, 0xeb, 0x21, 0x2b, 0x67, 0xf2, 0xe6, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x16, 0xc8, 0x7b, + 0x06, 0x7e, 0x0c, 0x00, 0x00, } func (m *WeightedVoteOption) Marshal() (dAtA []byte, err error) { @@ -1521,6 +1590,54 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *CrossChainParamsChange) 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 *CrossChainParamsChange) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CrossChainParamsChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Targets) > 0 { + for iNdEx := len(m.Targets) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Targets[iNdEx]) + copy(dAtA[i:], m.Targets[iNdEx]) + i = encodeVarintGov(dAtA, i, uint64(len(m.Targets[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Values) > 0 { + for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Values[iNdEx]) + copy(dAtA[i:], m.Values[iNdEx]) + i = encodeVarintGov(dAtA, i, uint64(len(m.Values[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintGov(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintGov(dAtA []byte, offset int, v uint64) int { offset -= sovGov(v) base := offset @@ -1785,6 +1902,31 @@ func (m *Params) Size() (n int) { return n } +func (m *CrossChainParamsChange) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovGov(uint64(l)) + } + if len(m.Values) > 0 { + for _, s := range m.Values { + l = len(s) + n += 1 + l + sovGov(uint64(l)) + } + } + if len(m.Targets) > 0 { + for _, s := range m.Targets { + l = len(s) + n += 1 + l + sovGov(uint64(l)) + } + } + return n +} + func sovGov(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -3532,6 +3674,152 @@ func (m *Params) Unmarshal(dAtA []byte) error { } return nil } +func (m *CrossChainParamsChange) 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: CrossChainParamsChange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CrossChainParamsChange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", 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.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Values", 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.Values = append(m.Values, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Targets", 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.Targets = append(m.Targets, 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 diff --git a/x/gov/types/v1/msgs.go b/x/gov/types/v1/msgs.go index 34b03428c7..afa8d84732 100644 --- a/x/gov/types/v1/msgs.go +++ b/x/gov/types/v1/msgs.go @@ -15,8 +15,8 @@ import ( ) var ( - _, _, _, _, _, _ sdk.Msg = &MsgSubmitProposal{}, &MsgDeposit{}, &MsgVote{}, &MsgVoteWeighted{}, &MsgExecLegacyContent{}, &MsgUpdateParams{} - _, _ codectypes.UnpackInterfacesMessage = &MsgSubmitProposal{}, &MsgExecLegacyContent{} + _, _, _, _, _, _, _ sdk.Msg = &MsgSubmitProposal{}, &MsgDeposit{}, &MsgVote{}, &MsgVoteWeighted{}, &MsgExecLegacyContent{}, &MsgUpdateParams{}, &MsgUpdateCrossChainParams{} + _, _ codectypes.UnpackInterfacesMessage = &MsgSubmitProposal{}, &MsgExecLegacyContent{} ) // NewMsgSubmitProposal creates a new MsgSubmitProposal. @@ -309,3 +309,23 @@ func (msg MsgUpdateParams) GetSigners() []sdk.AccAddress { authority, _ := sdk.AccAddressFromHexUnsafe(msg.Authority) return []sdk.AccAddress{authority} } + +// ValidateBasic implements the sdk.Msg interface. +func (msg MsgUpdateCrossChainParams) ValidateBasic() error { + if _, err := sdk.AccAddressFromHexUnsafe(msg.Authority); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", err) + } + return msg.Params.ValidateBasic() +} + +// GetSignBytes returns the message bytes to sign over. +func (msg MsgUpdateCrossChainParams) GetSignBytes() []byte { + bz := codec.ModuleCdc.MustMarshalJSON(&msg) + return sdk.MustSortJSON(bz) +} + +// GetSigners returns the expected signers for a MsgUpdateCrossChainParams. +func (msg MsgUpdateCrossChainParams) GetSigners() []sdk.AccAddress { + authority, _ := sdk.AccAddressFromHexUnsafe(msg.Authority) + return []sdk.AccAddress{authority} +} diff --git a/x/gov/types/v1/tx.pb.go b/x/gov/types/v1/tx.pb.go index 4a27b2077e..7971eef0ef 100644 --- a/x/gov/types/v1/tx.pb.go +++ b/x/gov/types/v1/tx.pb.go @@ -688,6 +688,98 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo +// MsgUpdateCrossChainParams for cross chain gov +type MsgUpdateCrossChainParams struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // for cross chain param change or contract upgrade + Params CrossChainParamsChange `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateCrossChainParams) Reset() { *m = MsgUpdateCrossChainParams{} } +func (m *MsgUpdateCrossChainParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateCrossChainParams) ProtoMessage() {} +func (*MsgUpdateCrossChainParams) Descriptor() ([]byte, []int) { + return fileDescriptor_9ff8f4a63b6fc9a9, []int{12} +} +func (m *MsgUpdateCrossChainParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateCrossChainParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateCrossChainParams.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 *MsgUpdateCrossChainParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateCrossChainParams.Merge(m, src) +} +func (m *MsgUpdateCrossChainParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateCrossChainParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateCrossChainParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateCrossChainParams proto.InternalMessageInfo + +func (m *MsgUpdateCrossChainParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateCrossChainParams) GetParams() CrossChainParamsChange { + if m != nil { + return m.Params + } + return CrossChainParamsChange{} +} + +// MsgUpdateCrossChainParamsResponse defines the response structure for executing a MsgUpdateCrossChainParams message. +type MsgUpdateCrossChainParamsResponse struct { +} + +func (m *MsgUpdateCrossChainParamsResponse) Reset() { *m = MsgUpdateCrossChainParamsResponse{} } +func (m *MsgUpdateCrossChainParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateCrossChainParamsResponse) ProtoMessage() {} +func (*MsgUpdateCrossChainParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9ff8f4a63b6fc9a9, []int{13} +} +func (m *MsgUpdateCrossChainParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateCrossChainParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateCrossChainParamsResponse.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 *MsgUpdateCrossChainParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateCrossChainParamsResponse.Merge(m, src) +} +func (m *MsgUpdateCrossChainParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateCrossChainParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateCrossChainParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateCrossChainParamsResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgSubmitProposal)(nil), "cosmos.gov.v1.MsgSubmitProposal") proto.RegisterType((*MsgSubmitProposalResponse)(nil), "cosmos.gov.v1.MsgSubmitProposalResponse") @@ -701,69 +793,75 @@ func init() { proto.RegisterType((*MsgDepositResponse)(nil), "cosmos.gov.v1.MsgDepositResponse") proto.RegisterType((*MsgUpdateParams)(nil), "cosmos.gov.v1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "cosmos.gov.v1.MsgUpdateParamsResponse") + proto.RegisterType((*MsgUpdateCrossChainParams)(nil), "cosmos.gov.v1.MsgUpdateCrossChainParams") + proto.RegisterType((*MsgUpdateCrossChainParamsResponse)(nil), "cosmos.gov.v1.MsgUpdateCrossChainParamsResponse") } func init() { proto.RegisterFile("cosmos/gov/v1/tx.proto", fileDescriptor_9ff8f4a63b6fc9a9) } var fileDescriptor_9ff8f4a63b6fc9a9 = []byte{ - // 908 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xe6, 0x87, 0xdd, 0xbc, 0x40, 0xaa, 0x8c, 0xdc, 0x76, 0xbd, 0x2a, 0x9b, 0x74, 0x8b, - 0x50, 0x94, 0x90, 0x5d, 0x1c, 0x68, 0x85, 0x4c, 0x85, 0x54, 0x97, 0x0a, 0x21, 0x61, 0xa8, 0x5c, - 0x51, 0x24, 0x84, 0x14, 0x8d, 0xbd, 0xc3, 0x64, 0x45, 0x76, 0x67, 0xb5, 0x33, 0xb6, 0xe2, 0x1b, - 0xe2, 0xd8, 0x13, 0x7f, 0x06, 0xc7, 0x1c, 0x7a, 0xeb, 0x3f, 0x50, 0x38, 0x55, 0x9c, 0x38, 0x55, - 0x28, 0x11, 0x44, 0xe2, 0x9f, 0x00, 0xcd, 0x8f, 0x5d, 0xff, 0x58, 0xc7, 0xa9, 0x38, 0x70, 0xb1, - 0x76, 0xbe, 0xf7, 0xbd, 0x37, 0xef, 0xfb, 0xf6, 0xcd, 0xac, 0xe1, 0x7a, 0x8f, 0xf1, 0x98, 0xf1, - 0x80, 0xb2, 0x41, 0x30, 0x68, 0x04, 0xe2, 0xd8, 0x4f, 0x33, 0x26, 0x18, 0x7a, 0x53, 0xe3, 0x3e, - 0x65, 0x03, 0x7f, 0xd0, 0x70, 0x5c, 0x43, 0xeb, 0x62, 0x4e, 0x82, 0x41, 0xa3, 0x4b, 0x04, 0x6e, - 0x04, 0x3d, 0x16, 0x25, 0x9a, 0xee, 0xdc, 0x98, 0x2c, 0x23, 0xb3, 0x74, 0xa0, 0x46, 0x19, 0x65, - 0xea, 0x31, 0x90, 0x4f, 0x06, 0xad, 0x6b, 0xfa, 0x81, 0x0e, 0x98, 0xad, 0x4c, 0x88, 0x32, 0x46, - 0x8f, 0x48, 0xa0, 0x56, 0xdd, 0xfe, 0x77, 0x01, 0x4e, 0x86, 0x53, 0x9b, 0xc4, 0x9c, 0xca, 0x4d, - 0x62, 0x4e, 0x4d, 0x60, 0x03, 0xc7, 0x51, 0xc2, 0x02, 0xf5, 0xab, 0x21, 0xef, 0x97, 0x45, 0xd8, - 0x68, 0x73, 0xfa, 0xb8, 0xdf, 0x8d, 0x23, 0xf1, 0x28, 0x63, 0x29, 0xe3, 0xf8, 0x08, 0xbd, 0x07, - 0x57, 0x62, 0xc2, 0x39, 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, 0xf7, 0x35, 0x48, 0xc5, 0x36, 0x1f, 0xc3, 0xb2, 0xba, - 0xb8, 0xae, 0x97, 0x93, 0x24, 0xee, 0xb8, 0xb3, 0xf1, 0x22, 0xff, 0x09, 0xbc, 0x31, 0x71, 0xfa, - 0x2f, 0xe0, 0xe7, 0x71, 0xe7, 0x9d, 0xf9, 0xf1, 0xa2, 0xee, 0xa7, 0x50, 0xcd, 0x0f, 0x4e, 0xbd, - 0x9c, 0x62, 0x42, 0xce, 0xad, 0x0b, 0x43, 0xe3, 0x0d, 0x4e, 0x8c, 0xe0, 0x8c, 0x06, 0xc7, 0xe3, - 0xb3, 0x1a, 0x9c, 0x35, 0x05, 0xce, 0xca, 0x0f, 0x72, 0xce, 0x5a, 0x0f, 0x5f, 0x9c, 0xba, 0xd6, - 0xcb, 0x53, 0xd7, 0xfa, 0xe3, 0xd4, 0xb5, 0x7e, 0x3a, 0x73, 0x17, 0x5e, 0x9e, 0xb9, 0x0b, 0xbf, - 0x9f, 0xb9, 0x0b, 0xdf, 0xec, 0xd2, 0x48, 0x1c, 0xf6, 0xbb, 0x7e, 0x8f, 0xc5, 0xe6, 0xef, 0x4d, - 0x50, 0x1a, 0x3c, 0x31, 0x4c, 0x09, 0x97, 0x7f, 0xa6, 0x2a, 0xea, 0x7b, 0xf7, 0xfe, 0xbf, 0x01, - 0x00, 0x00, 0xff, 0xff, 0xc2, 0x00, 0x8f, 0x53, 0x8c, 0x09, 0x00, 0x00, + // 972 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4d, 0x6f, 0x1b, 0x45, + 0x18, 0xce, 0xe6, 0xc3, 0x6e, 0x26, 0x90, 0x2a, 0x23, 0x37, 0x5d, 0xaf, 0xca, 0x26, 0xd9, 0x00, + 0xb2, 0x12, 0xb2, 0x5b, 0x07, 0x5a, 0x21, 0x53, 0x21, 0x6a, 0x53, 0x01, 0x12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0x40, 0x51, 0x31, 0x63, 0xe6, 0x92, 0x9c, 0xc6, 0x9d, 0x8c, 0x06, 0x49, 0x43, 0x63, 0x5a, 0x24, + 0x11, 0x73, 0xc5, 0x78, 0x6b, 0x52, 0x8c, 0xd7, 0xa6, 0x8a, 0x91, 0x24, 0x77, 0xca, 0xe0, 0x66, + 0xc6, 0x94, 0x8a, 0xf3, 0xa7, 0x01, 0x40, 0x93, 0x91, 0x64, 0xee, 0xff, 0xa5, 0x2e, 0x77, 0xc1, + 0xaa, 0xbe, 0x75, 0xe8, 0xe5, 0xda, 0x8c, 0xa0, 0xf0, 0x1e, 0x28, 0xa0, 0x80, 0xf6, 0x43, 0xae, + 0xe5, 0xb9, 0xda, 0x65, 0xa5, 0x63, 0x6a, 0xfb, 0x72, 0x54, 0xd2, 0x6c, 0x42, 0x08, 0x33, 0x27, + 0x84, 0x66, 0xe6, 0x94, 0x00, 0x1c, 0xed, 0x52, 0xfa, 0xcf, 0xd4, 0xd9, 0xf8, 0x22, 0xea, 0x22, + 0x8e, 0x1f, 0xa2, 0x18, 0x05, 0x4c, 0x90, 0x19, 0xcd, 0xa7, 0x71, 0x19, 0x99, 0x14, 0x0a, 0xdf, + 0x05, 0x85, 0x48, 0x66, 0x90, 0x0a, 0xac, 0x1d, 0xde, 0xc8, 0xfc, 0xd7, 0x2a, 0xfd, 0x04, 0x11, + 0x85, 0xaf, 0xdd, 0xcd, 0xcf, 0xfc, 0xee, 0x18, 0x91, 0x93, 0xe4, 0xb9, 0xca, 0x74, 0xaa, 0xff, + 0xd7, 0x71, 0x53, 0x4a, 0xec, 0x37, 0x43, 0x5e, 0x86, 0xca, 0xd7, 0x88, 0x29, 0x63, 0x8d, 0x1e, + 0xf2, 0xc3, 0xff, 0x48, 0xf1, 0xe3, 0x0c, 0xc5, 0x37, 0x32, 0x14, 0xb3, 0x85, 0x1a, 0x3d, 0x14, + 0x12, 0x3c, 0x8d, 0xf2, 0x07, 0x79, 0xca, 0x07, 0x73, 0x29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xff, 0x13, + 0x00, 0x00, 0xff, 0xff, 0xed, 0x81, 0xf2, 0xb7, 0x09, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -794,6 +892,8 @@ type MsgClient interface { // // Since: cosmos-sdk 0.47 UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + // UpdateCrossChainParams defines a method to send IBC package to update cross-chain params + UpdateCrossChainParams(ctx context.Context, in *MsgUpdateCrossChainParams, opts ...grpc.CallOption) (*MsgUpdateCrossChainParamsResponse, error) } type msgClient struct { @@ -858,6 +958,15 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } +func (c *msgClient) UpdateCrossChainParams(ctx context.Context, in *MsgUpdateCrossChainParams, opts ...grpc.CallOption) (*MsgUpdateCrossChainParamsResponse, error) { + out := new(MsgUpdateCrossChainParamsResponse) + err := c.cc.Invoke(ctx, "/cosmos.gov.v1.Msg/UpdateCrossChainParams", 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. @@ -876,6 +985,8 @@ type MsgServer interface { // // Since: cosmos-sdk 0.47 UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + // UpdateCrossChainParams defines a method to send IBC package to update cross-chain params + UpdateCrossChainParams(context.Context, *MsgUpdateCrossChainParams) (*MsgUpdateCrossChainParamsResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -900,6 +1011,9 @@ func (*UnimplementedMsgServer) Deposit(ctx context.Context, req *MsgDeposit) (*M func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } +func (*UnimplementedMsgServer) UpdateCrossChainParams(ctx context.Context, req *MsgUpdateCrossChainParams) (*MsgUpdateCrossChainParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateCrossChainParams not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -1013,6 +1127,24 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Msg_UpdateCrossChainParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateCrossChainParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateCrossChainParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.gov.v1.Msg/UpdateCrossChainParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateCrossChainParams(ctx, req.(*MsgUpdateCrossChainParams)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.gov.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -1041,6 +1173,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, + { + MethodName: "UpdateCrossChainParams", + Handler: _Msg_UpdateCrossChainParams_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/gov/v1/tx.proto", @@ -1502,6 +1638,69 @@ func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *MsgUpdateCrossChainParams) 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 *MsgUpdateCrossChainParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateCrossChainParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + 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 *MsgUpdateCrossChainParamsResponse) 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 *MsgUpdateCrossChainParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateCrossChainParamsResponse) 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 @@ -1710,6 +1909,30 @@ func (m *MsgUpdateParamsResponse) Size() (n int) { return n } +func (m *MsgUpdateCrossChainParams) 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 = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateCrossChainParamsResponse) 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 } @@ -2968,6 +3191,171 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgUpdateCrossChainParams) 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: MsgUpdateCrossChainParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateCrossChainParams: 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 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 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 *MsgUpdateCrossChainParamsResponse) 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: MsgUpdateCrossChainParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateCrossChainParamsResponse: 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