From 9e57ceae0d7b61d576234d1a516f1ff9eb289d84 Mon Sep 17 00:00:00 2001 From: testinginprod <98415576+testinginprod@users.noreply.github.com> Date: Mon, 9 Dec 2024 15:50:11 +0100 Subject: [PATCH 1/2] feat(x/accounts)!: make address generation more robust and add predictable address creation (#22776) Co-authored-by: Julien Robert (cherry picked from commit ecd53f84971005018cef5e76144e4379d6e4f2e5) # Conflicts: # api/cosmos/accounts/v1/tx.pulsar.go # tests/integration/v2/auth/accounts_retro_compatibility_test.go --- api/cosmos/accounts/v1/tx.pulsar.go | 4987 +++++++++++++++++ .../integration/accounts/base_account_test.go | 2 +- tests/integration/accounts/fixture_test.go | 2 +- .../lockup/continous_lockup_test_suite.go | 2 +- .../lockup/delayed_lockup_test_suite.go | 2 +- .../lockup/periodic_lockup_test_suite.go | 2 +- .../lockup/permanent_lockup_test_suite.go | 2 +- .../accounts/multisig/test_suite.go | 2 +- tests/integration/accounts/wiring_test.go | 2 +- .../accounts_retro_compatibility_test.go | 6 +- .../auth/accounts_retro_compatibility_test.go | 185 + x/accounts/README.md | 26 + x/accounts/errors.go | 2 + x/accounts/genesis_test.go | 6 +- x/accounts/keeper.go | 39 +- x/accounts/keeper_test.go | 8 +- x/accounts/msg_server_test.go | 46 +- x/accounts/proto/cosmos/accounts/v1/tx.proto | 3 + x/accounts/v1/tx.pb.go | 146 +- 19 files changed, 5389 insertions(+), 81 deletions(-) create mode 100644 api/cosmos/accounts/v1/tx.pulsar.go create mode 100644 tests/integration/v2/auth/accounts_retro_compatibility_test.go diff --git a/api/cosmos/accounts/v1/tx.pulsar.go b/api/cosmos/accounts/v1/tx.pulsar.go new file mode 100644 index 000000000000..d019140612e6 --- /dev/null +++ b/api/cosmos/accounts/v1/tx.pulsar.go @@ -0,0 +1,4987 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package accountsv1 + +import ( + v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + _ "cosmossdk.io/api/cosmos/msg/v1" + _ "cosmossdk.io/api/cosmos/tx/v1beta1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_MsgInit_4_list)(nil) + +type _MsgInit_4_list struct { + list *[]*v1beta1.Coin +} + +func (x *_MsgInit_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgInit_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgInit_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgInit_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgInit_4_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgInit_4_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgInit_4_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgInit_4_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgInit protoreflect.MessageDescriptor + fd_MsgInit_sender protoreflect.FieldDescriptor + fd_MsgInit_account_type protoreflect.FieldDescriptor + fd_MsgInit_message protoreflect.FieldDescriptor + fd_MsgInit_funds protoreflect.FieldDescriptor + fd_MsgInit_address_seed protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_v1_tx_proto_init() + md_MsgInit = File_cosmos_accounts_v1_tx_proto.Messages().ByName("MsgInit") + fd_MsgInit_sender = md_MsgInit.Fields().ByName("sender") + fd_MsgInit_account_type = md_MsgInit.Fields().ByName("account_type") + fd_MsgInit_message = md_MsgInit.Fields().ByName("message") + fd_MsgInit_funds = md_MsgInit.Fields().ByName("funds") + fd_MsgInit_address_seed = md_MsgInit.Fields().ByName("address_seed") +} + +var _ protoreflect.Message = (*fastReflection_MsgInit)(nil) + +type fastReflection_MsgInit MsgInit + +func (x *MsgInit) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgInit)(x) +} + +func (x *MsgInit) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[0] + 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_MsgInit_messageType fastReflection_MsgInit_messageType +var _ protoreflect.MessageType = fastReflection_MsgInit_messageType{} + +type fastReflection_MsgInit_messageType struct{} + +func (x fastReflection_MsgInit_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgInit)(nil) +} +func (x fastReflection_MsgInit_messageType) New() protoreflect.Message { + return new(fastReflection_MsgInit) +} +func (x fastReflection_MsgInit_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInit +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgInit) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInit +} + +// 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_MsgInit) Type() protoreflect.MessageType { + return _fastReflection_MsgInit_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgInit) New() protoreflect.Message { + return new(fastReflection_MsgInit) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgInit) Interface() protoreflect.ProtoMessage { + return (*MsgInit)(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_MsgInit) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Sender != "" { + value := protoreflect.ValueOfString(x.Sender) + if !f(fd_MsgInit_sender, value) { + return + } + } + if x.AccountType != "" { + value := protoreflect.ValueOfString(x.AccountType) + if !f(fd_MsgInit_account_type, value) { + return + } + } + if x.Message != nil { + value := protoreflect.ValueOfMessage(x.Message.ProtoReflect()) + if !f(fd_MsgInit_message, value) { + return + } + } + if len(x.Funds) != 0 { + value := protoreflect.ValueOfList(&_MsgInit_4_list{list: &x.Funds}) + if !f(fd_MsgInit_funds, value) { + return + } + } + if len(x.AddressSeed) != 0 { + value := protoreflect.ValueOfBytes(x.AddressSeed) + if !f(fd_MsgInit_address_seed, 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_MsgInit) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgInit.sender": + return x.Sender != "" + case "cosmos.accounts.v1.MsgInit.account_type": + return x.AccountType != "" + case "cosmos.accounts.v1.MsgInit.message": + return x.Message != nil + case "cosmos.accounts.v1.MsgInit.funds": + return len(x.Funds) != 0 + case "cosmos.accounts.v1.MsgInit.address_seed": + return len(x.AddressSeed) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgInit")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgInit 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_MsgInit) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgInit.sender": + x.Sender = "" + case "cosmos.accounts.v1.MsgInit.account_type": + x.AccountType = "" + case "cosmos.accounts.v1.MsgInit.message": + x.Message = nil + case "cosmos.accounts.v1.MsgInit.funds": + x.Funds = nil + case "cosmos.accounts.v1.MsgInit.address_seed": + x.AddressSeed = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgInit")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgInit 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_MsgInit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.v1.MsgInit.sender": + value := x.Sender + return protoreflect.ValueOfString(value) + case "cosmos.accounts.v1.MsgInit.account_type": + value := x.AccountType + return protoreflect.ValueOfString(value) + case "cosmos.accounts.v1.MsgInit.message": + value := x.Message + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.accounts.v1.MsgInit.funds": + if len(x.Funds) == 0 { + return protoreflect.ValueOfList(&_MsgInit_4_list{}) + } + listValue := &_MsgInit_4_list{list: &x.Funds} + return protoreflect.ValueOfList(listValue) + case "cosmos.accounts.v1.MsgInit.address_seed": + value := x.AddressSeed + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgInit")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgInit 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_MsgInit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgInit.sender": + x.Sender = value.Interface().(string) + case "cosmos.accounts.v1.MsgInit.account_type": + x.AccountType = value.Interface().(string) + case "cosmos.accounts.v1.MsgInit.message": + x.Message = value.Message().Interface().(*anypb.Any) + case "cosmos.accounts.v1.MsgInit.funds": + lv := value.List() + clv := lv.(*_MsgInit_4_list) + x.Funds = *clv.list + case "cosmos.accounts.v1.MsgInit.address_seed": + x.AddressSeed = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgInit")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgInit 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_MsgInit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgInit.message": + if x.Message == nil { + x.Message = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.Message.ProtoReflect()) + case "cosmos.accounts.v1.MsgInit.funds": + if x.Funds == nil { + x.Funds = []*v1beta1.Coin{} + } + value := &_MsgInit_4_list{list: &x.Funds} + return protoreflect.ValueOfList(value) + case "cosmos.accounts.v1.MsgInit.sender": + panic(fmt.Errorf("field sender of message cosmos.accounts.v1.MsgInit is not mutable")) + case "cosmos.accounts.v1.MsgInit.account_type": + panic(fmt.Errorf("field account_type of message cosmos.accounts.v1.MsgInit is not mutable")) + case "cosmos.accounts.v1.MsgInit.address_seed": + panic(fmt.Errorf("field address_seed of message cosmos.accounts.v1.MsgInit is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgInit")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgInit 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_MsgInit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgInit.sender": + return protoreflect.ValueOfString("") + case "cosmos.accounts.v1.MsgInit.account_type": + return protoreflect.ValueOfString("") + case "cosmos.accounts.v1.MsgInit.message": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.accounts.v1.MsgInit.funds": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_MsgInit_4_list{list: &list}) + case "cosmos.accounts.v1.MsgInit.address_seed": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgInit")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgInit 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_MsgInit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.v1.MsgInit", 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_MsgInit) 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_MsgInit) 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_MsgInit) 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_MsgInit) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgInit) + 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.Sender) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.AccountType) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Message != nil { + l = options.Size(x.Message) + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Funds) > 0 { + for _, e := range x.Funds { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.AddressSeed) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgInit) + 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.AddressSeed) > 0 { + i -= len(x.AddressSeed) + copy(dAtA[i:], x.AddressSeed) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AddressSeed))) + i-- + dAtA[i] = 0x2a + } + if len(x.Funds) > 0 { + for iNdEx := len(x.Funds) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Funds[iNdEx]) + 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] = 0x22 + } + } + if x.Message != nil { + encoded, err := options.Marshal(x.Message) + 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] = 0x1a + } + if len(x.AccountType) > 0 { + i -= len(x.AccountType) + copy(dAtA[i:], x.AccountType) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AccountType))) + i-- + dAtA[i] = 0x12 + } + if len(x.Sender) > 0 { + i -= len(x.Sender) + copy(dAtA[i:], x.Sender) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + 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().(*MsgInit) + 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: MsgInit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInit: 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 Sender", 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.Sender = 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 AccountType", 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.AccountType = 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 Message", 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.Message == nil { + x.Message = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Message); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Funds", 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 + } + x.Funds = append(x.Funds, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Funds[len(x.Funds)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AddressSeed", wireType) + } + var byteLen 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++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + 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.AddressSeed = append(x.AddressSeed[:0], dAtA[iNdEx:postIndex]...) + if x.AddressSeed == nil { + x.AddressSeed = []byte{} + } + 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_MsgInitResponse protoreflect.MessageDescriptor + fd_MsgInitResponse_account_address protoreflect.FieldDescriptor + fd_MsgInitResponse_response protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_v1_tx_proto_init() + md_MsgInitResponse = File_cosmos_accounts_v1_tx_proto.Messages().ByName("MsgInitResponse") + fd_MsgInitResponse_account_address = md_MsgInitResponse.Fields().ByName("account_address") + fd_MsgInitResponse_response = md_MsgInitResponse.Fields().ByName("response") +} + +var _ protoreflect.Message = (*fastReflection_MsgInitResponse)(nil) + +type fastReflection_MsgInitResponse MsgInitResponse + +func (x *MsgInitResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgInitResponse)(x) +} + +func (x *MsgInitResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[1] + 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_MsgInitResponse_messageType fastReflection_MsgInitResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgInitResponse_messageType{} + +type fastReflection_MsgInitResponse_messageType struct{} + +func (x fastReflection_MsgInitResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgInitResponse)(nil) +} +func (x fastReflection_MsgInitResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgInitResponse) +} +func (x fastReflection_MsgInitResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgInitResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitResponse +} + +// 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_MsgInitResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgInitResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgInitResponse) New() protoreflect.Message { + return new(fastReflection_MsgInitResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgInitResponse) Interface() protoreflect.ProtoMessage { + return (*MsgInitResponse)(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_MsgInitResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.AccountAddress != "" { + value := protoreflect.ValueOfString(x.AccountAddress) + if !f(fd_MsgInitResponse_account_address, value) { + return + } + } + if x.Response != nil { + value := protoreflect.ValueOfMessage(x.Response.ProtoReflect()) + if !f(fd_MsgInitResponse_response, 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_MsgInitResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgInitResponse.account_address": + return x.AccountAddress != "" + case "cosmos.accounts.v1.MsgInitResponse.response": + return x.Response != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgInitResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgInitResponse 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_MsgInitResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgInitResponse.account_address": + x.AccountAddress = "" + case "cosmos.accounts.v1.MsgInitResponse.response": + x.Response = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgInitResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgInitResponse 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_MsgInitResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.v1.MsgInitResponse.account_address": + value := x.AccountAddress + return protoreflect.ValueOfString(value) + case "cosmos.accounts.v1.MsgInitResponse.response": + value := x.Response + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgInitResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgInitResponse 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_MsgInitResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgInitResponse.account_address": + x.AccountAddress = value.Interface().(string) + case "cosmos.accounts.v1.MsgInitResponse.response": + x.Response = value.Message().Interface().(*anypb.Any) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgInitResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgInitResponse 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_MsgInitResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgInitResponse.response": + if x.Response == nil { + x.Response = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.Response.ProtoReflect()) + case "cosmos.accounts.v1.MsgInitResponse.account_address": + panic(fmt.Errorf("field account_address of message cosmos.accounts.v1.MsgInitResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgInitResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgInitResponse 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_MsgInitResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgInitResponse.account_address": + return protoreflect.ValueOfString("") + case "cosmos.accounts.v1.MsgInitResponse.response": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgInitResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgInitResponse 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_MsgInitResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.v1.MsgInitResponse", 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_MsgInitResponse) 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_MsgInitResponse) 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_MsgInitResponse) 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_MsgInitResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgInitResponse) + 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.AccountAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Response != nil { + l = options.Size(x.Response) + 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().(*MsgInitResponse) + 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.Response != nil { + encoded, err := options.Marshal(x.Response) + 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.AccountAddress) > 0 { + i -= len(x.AccountAddress) + copy(dAtA[i:], x.AccountAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AccountAddress))) + 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().(*MsgInitResponse) + 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: MsgInitResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitResponse: 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 AccountAddress", 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.AccountAddress = 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 Response", 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.Response == nil { + x.Response = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Response); 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 _ protoreflect.List = (*_MsgExecute_4_list)(nil) + +type _MsgExecute_4_list struct { + list *[]*v1beta1.Coin +} + +func (x *_MsgExecute_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgExecute_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgExecute_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgExecute_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgExecute_4_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgExecute_4_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgExecute_4_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgExecute_4_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgExecute protoreflect.MessageDescriptor + fd_MsgExecute_sender protoreflect.FieldDescriptor + fd_MsgExecute_target protoreflect.FieldDescriptor + fd_MsgExecute_message protoreflect.FieldDescriptor + fd_MsgExecute_funds protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_v1_tx_proto_init() + md_MsgExecute = File_cosmos_accounts_v1_tx_proto.Messages().ByName("MsgExecute") + fd_MsgExecute_sender = md_MsgExecute.Fields().ByName("sender") + fd_MsgExecute_target = md_MsgExecute.Fields().ByName("target") + fd_MsgExecute_message = md_MsgExecute.Fields().ByName("message") + fd_MsgExecute_funds = md_MsgExecute.Fields().ByName("funds") +} + +var _ protoreflect.Message = (*fastReflection_MsgExecute)(nil) + +type fastReflection_MsgExecute MsgExecute + +func (x *MsgExecute) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgExecute)(x) +} + +func (x *MsgExecute) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[2] + 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_MsgExecute_messageType fastReflection_MsgExecute_messageType +var _ protoreflect.MessageType = fastReflection_MsgExecute_messageType{} + +type fastReflection_MsgExecute_messageType struct{} + +func (x fastReflection_MsgExecute_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgExecute)(nil) +} +func (x fastReflection_MsgExecute_messageType) New() protoreflect.Message { + return new(fastReflection_MsgExecute) +} +func (x fastReflection_MsgExecute_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgExecute +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgExecute) Descriptor() protoreflect.MessageDescriptor { + return md_MsgExecute +} + +// 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_MsgExecute) Type() protoreflect.MessageType { + return _fastReflection_MsgExecute_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgExecute) New() protoreflect.Message { + return new(fastReflection_MsgExecute) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgExecute) Interface() protoreflect.ProtoMessage { + return (*MsgExecute)(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_MsgExecute) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Sender != "" { + value := protoreflect.ValueOfString(x.Sender) + if !f(fd_MsgExecute_sender, value) { + return + } + } + if x.Target != "" { + value := protoreflect.ValueOfString(x.Target) + if !f(fd_MsgExecute_target, value) { + return + } + } + if x.Message != nil { + value := protoreflect.ValueOfMessage(x.Message.ProtoReflect()) + if !f(fd_MsgExecute_message, value) { + return + } + } + if len(x.Funds) != 0 { + value := protoreflect.ValueOfList(&_MsgExecute_4_list{list: &x.Funds}) + if !f(fd_MsgExecute_funds, 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_MsgExecute) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgExecute.sender": + return x.Sender != "" + case "cosmos.accounts.v1.MsgExecute.target": + return x.Target != "" + case "cosmos.accounts.v1.MsgExecute.message": + return x.Message != nil + case "cosmos.accounts.v1.MsgExecute.funds": + return len(x.Funds) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecute")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecute 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_MsgExecute) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgExecute.sender": + x.Sender = "" + case "cosmos.accounts.v1.MsgExecute.target": + x.Target = "" + case "cosmos.accounts.v1.MsgExecute.message": + x.Message = nil + case "cosmos.accounts.v1.MsgExecute.funds": + x.Funds = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecute")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecute 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_MsgExecute) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.v1.MsgExecute.sender": + value := x.Sender + return protoreflect.ValueOfString(value) + case "cosmos.accounts.v1.MsgExecute.target": + value := x.Target + return protoreflect.ValueOfString(value) + case "cosmos.accounts.v1.MsgExecute.message": + value := x.Message + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.accounts.v1.MsgExecute.funds": + if len(x.Funds) == 0 { + return protoreflect.ValueOfList(&_MsgExecute_4_list{}) + } + listValue := &_MsgExecute_4_list{list: &x.Funds} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecute")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecute 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_MsgExecute) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgExecute.sender": + x.Sender = value.Interface().(string) + case "cosmos.accounts.v1.MsgExecute.target": + x.Target = value.Interface().(string) + case "cosmos.accounts.v1.MsgExecute.message": + x.Message = value.Message().Interface().(*anypb.Any) + case "cosmos.accounts.v1.MsgExecute.funds": + lv := value.List() + clv := lv.(*_MsgExecute_4_list) + x.Funds = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecute")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecute 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_MsgExecute) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgExecute.message": + if x.Message == nil { + x.Message = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.Message.ProtoReflect()) + case "cosmos.accounts.v1.MsgExecute.funds": + if x.Funds == nil { + x.Funds = []*v1beta1.Coin{} + } + value := &_MsgExecute_4_list{list: &x.Funds} + return protoreflect.ValueOfList(value) + case "cosmos.accounts.v1.MsgExecute.sender": + panic(fmt.Errorf("field sender of message cosmos.accounts.v1.MsgExecute is not mutable")) + case "cosmos.accounts.v1.MsgExecute.target": + panic(fmt.Errorf("field target of message cosmos.accounts.v1.MsgExecute is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecute")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecute 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_MsgExecute) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgExecute.sender": + return protoreflect.ValueOfString("") + case "cosmos.accounts.v1.MsgExecute.target": + return protoreflect.ValueOfString("") + case "cosmos.accounts.v1.MsgExecute.message": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.accounts.v1.MsgExecute.funds": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_MsgExecute_4_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecute")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecute 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_MsgExecute) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.v1.MsgExecute", 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_MsgExecute) 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_MsgExecute) 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_MsgExecute) 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_MsgExecute) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgExecute) + 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.Sender) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Target) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Message != nil { + l = options.Size(x.Message) + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Funds) > 0 { + for _, e := range x.Funds { + l = options.Size(e) + 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().(*MsgExecute) + 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.Funds) > 0 { + for iNdEx := len(x.Funds) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Funds[iNdEx]) + 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] = 0x22 + } + } + if x.Message != nil { + encoded, err := options.Marshal(x.Message) + 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] = 0x1a + } + if len(x.Target) > 0 { + i -= len(x.Target) + copy(dAtA[i:], x.Target) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Target))) + i-- + dAtA[i] = 0x12 + } + if len(x.Sender) > 0 { + i -= len(x.Sender) + copy(dAtA[i:], x.Sender) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + 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().(*MsgExecute) + 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: MsgExecute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecute: 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 Sender", 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.Sender = 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 Target", 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.Target = 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 Message", 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.Message == nil { + x.Message = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Message); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Funds", 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 + } + x.Funds = append(x.Funds, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Funds[len(x.Funds)-1]); 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_MsgExecuteResponse protoreflect.MessageDescriptor + fd_MsgExecuteResponse_response protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_v1_tx_proto_init() + md_MsgExecuteResponse = File_cosmos_accounts_v1_tx_proto.Messages().ByName("MsgExecuteResponse") + fd_MsgExecuteResponse_response = md_MsgExecuteResponse.Fields().ByName("response") +} + +var _ protoreflect.Message = (*fastReflection_MsgExecuteResponse)(nil) + +type fastReflection_MsgExecuteResponse MsgExecuteResponse + +func (x *MsgExecuteResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgExecuteResponse)(x) +} + +func (x *MsgExecuteResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[3] + 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_MsgExecuteResponse_messageType fastReflection_MsgExecuteResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgExecuteResponse_messageType{} + +type fastReflection_MsgExecuteResponse_messageType struct{} + +func (x fastReflection_MsgExecuteResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgExecuteResponse)(nil) +} +func (x fastReflection_MsgExecuteResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgExecuteResponse) +} +func (x fastReflection_MsgExecuteResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgExecuteResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgExecuteResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgExecuteResponse +} + +// 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_MsgExecuteResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgExecuteResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgExecuteResponse) New() protoreflect.Message { + return new(fastReflection_MsgExecuteResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgExecuteResponse) Interface() protoreflect.ProtoMessage { + return (*MsgExecuteResponse)(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_MsgExecuteResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Response != nil { + value := protoreflect.ValueOfMessage(x.Response.ProtoReflect()) + if !f(fd_MsgExecuteResponse_response, 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_MsgExecuteResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgExecuteResponse.response": + return x.Response != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteResponse 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_MsgExecuteResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgExecuteResponse.response": + x.Response = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteResponse 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_MsgExecuteResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.v1.MsgExecuteResponse.response": + value := x.Response + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteResponse 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_MsgExecuteResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgExecuteResponse.response": + x.Response = value.Message().Interface().(*anypb.Any) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteResponse 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_MsgExecuteResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgExecuteResponse.response": + if x.Response == nil { + x.Response = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.Response.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteResponse 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_MsgExecuteResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgExecuteResponse.response": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteResponse 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_MsgExecuteResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.v1.MsgExecuteResponse", 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_MsgExecuteResponse) 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_MsgExecuteResponse) 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_MsgExecuteResponse) 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_MsgExecuteResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgExecuteResponse) + 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.Response != nil { + l = options.Size(x.Response) + 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().(*MsgExecuteResponse) + 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.Response != nil { + encoded, err := options.Marshal(x.Response) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgExecuteResponse) + 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: MsgExecuteResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecuteResponse: 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 Response", 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.Response == nil { + x.Response = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Response); 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 _ protoreflect.List = (*_MsgExecuteBundle_2_list)(nil) + +type _MsgExecuteBundle_2_list struct { + list *[][]byte +} + +func (x *_MsgExecuteBundle_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgExecuteBundle_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfBytes((*x.list)[i]) +} + +func (x *_MsgExecuteBundle_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_MsgExecuteBundle_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgExecuteBundle_2_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgExecuteBundle at list field Txs as it is not of Message kind")) +} + +func (x *_MsgExecuteBundle_2_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgExecuteBundle_2_list) NewElement() protoreflect.Value { + var v []byte + return protoreflect.ValueOfBytes(v) +} + +func (x *_MsgExecuteBundle_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgExecuteBundle protoreflect.MessageDescriptor + fd_MsgExecuteBundle_bundler protoreflect.FieldDescriptor + fd_MsgExecuteBundle_txs protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_v1_tx_proto_init() + md_MsgExecuteBundle = File_cosmos_accounts_v1_tx_proto.Messages().ByName("MsgExecuteBundle") + fd_MsgExecuteBundle_bundler = md_MsgExecuteBundle.Fields().ByName("bundler") + fd_MsgExecuteBundle_txs = md_MsgExecuteBundle.Fields().ByName("txs") +} + +var _ protoreflect.Message = (*fastReflection_MsgExecuteBundle)(nil) + +type fastReflection_MsgExecuteBundle MsgExecuteBundle + +func (x *MsgExecuteBundle) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgExecuteBundle)(x) +} + +func (x *MsgExecuteBundle) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[4] + 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_MsgExecuteBundle_messageType fastReflection_MsgExecuteBundle_messageType +var _ protoreflect.MessageType = fastReflection_MsgExecuteBundle_messageType{} + +type fastReflection_MsgExecuteBundle_messageType struct{} + +func (x fastReflection_MsgExecuteBundle_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgExecuteBundle)(nil) +} +func (x fastReflection_MsgExecuteBundle_messageType) New() protoreflect.Message { + return new(fastReflection_MsgExecuteBundle) +} +func (x fastReflection_MsgExecuteBundle_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgExecuteBundle +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgExecuteBundle) Descriptor() protoreflect.MessageDescriptor { + return md_MsgExecuteBundle +} + +// 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_MsgExecuteBundle) Type() protoreflect.MessageType { + return _fastReflection_MsgExecuteBundle_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgExecuteBundle) New() protoreflect.Message { + return new(fastReflection_MsgExecuteBundle) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgExecuteBundle) Interface() protoreflect.ProtoMessage { + return (*MsgExecuteBundle)(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_MsgExecuteBundle) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Bundler != "" { + value := protoreflect.ValueOfString(x.Bundler) + if !f(fd_MsgExecuteBundle_bundler, value) { + return + } + } + if len(x.Txs) != 0 { + value := protoreflect.ValueOfList(&_MsgExecuteBundle_2_list{list: &x.Txs}) + if !f(fd_MsgExecuteBundle_txs, 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_MsgExecuteBundle) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgExecuteBundle.bundler": + return x.Bundler != "" + case "cosmos.accounts.v1.MsgExecuteBundle.txs": + return len(x.Txs) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundle")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteBundle 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_MsgExecuteBundle) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgExecuteBundle.bundler": + x.Bundler = "" + case "cosmos.accounts.v1.MsgExecuteBundle.txs": + x.Txs = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundle")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteBundle 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_MsgExecuteBundle) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.v1.MsgExecuteBundle.bundler": + value := x.Bundler + return protoreflect.ValueOfString(value) + case "cosmos.accounts.v1.MsgExecuteBundle.txs": + if len(x.Txs) == 0 { + return protoreflect.ValueOfList(&_MsgExecuteBundle_2_list{}) + } + listValue := &_MsgExecuteBundle_2_list{list: &x.Txs} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundle")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteBundle 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_MsgExecuteBundle) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgExecuteBundle.bundler": + x.Bundler = value.Interface().(string) + case "cosmos.accounts.v1.MsgExecuteBundle.txs": + lv := value.List() + clv := lv.(*_MsgExecuteBundle_2_list) + x.Txs = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundle")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteBundle 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_MsgExecuteBundle) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgExecuteBundle.txs": + if x.Txs == nil { + x.Txs = [][]byte{} + } + value := &_MsgExecuteBundle_2_list{list: &x.Txs} + return protoreflect.ValueOfList(value) + case "cosmos.accounts.v1.MsgExecuteBundle.bundler": + panic(fmt.Errorf("field bundler of message cosmos.accounts.v1.MsgExecuteBundle is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundle")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteBundle 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_MsgExecuteBundle) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgExecuteBundle.bundler": + return protoreflect.ValueOfString("") + case "cosmos.accounts.v1.MsgExecuteBundle.txs": + list := [][]byte{} + return protoreflect.ValueOfList(&_MsgExecuteBundle_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundle")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteBundle 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_MsgExecuteBundle) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.v1.MsgExecuteBundle", 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_MsgExecuteBundle) 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_MsgExecuteBundle) 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_MsgExecuteBundle) 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_MsgExecuteBundle) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgExecuteBundle) + 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.Bundler) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Txs) > 0 { + for _, b := range x.Txs { + l = len(b) + 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().(*MsgExecuteBundle) + 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.Txs) > 0 { + for iNdEx := len(x.Txs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Txs[iNdEx]) + copy(dAtA[i:], x.Txs[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Txs[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.Bundler) > 0 { + i -= len(x.Bundler) + copy(dAtA[i:], x.Bundler) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bundler))) + 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().(*MsgExecuteBundle) + 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: MsgExecuteBundle: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecuteBundle: 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 Bundler", 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.Bundler = 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 Txs", wireType) + } + var byteLen 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++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + 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.Txs = append(x.Txs, make([]byte, postIndex-iNdEx)) + copy(x.Txs[len(x.Txs)-1], 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, + } +} + +var _ protoreflect.List = (*_BundledTxResponse_3_list)(nil) + +type _BundledTxResponse_3_list struct { + list *[]*anypb.Any +} + +func (x *_BundledTxResponse_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_BundledTxResponse_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_BundledTxResponse_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*anypb.Any) + (*x.list)[i] = concreteValue +} + +func (x *_BundledTxResponse_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*anypb.Any) + *x.list = append(*x.list, concreteValue) +} + +func (x *_BundledTxResponse_3_list) AppendMutable() protoreflect.Value { + v := new(anypb.Any) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_BundledTxResponse_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_BundledTxResponse_3_list) NewElement() protoreflect.Value { + v := new(anypb.Any) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_BundledTxResponse_3_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_BundledTxResponse_5_list)(nil) + +type _BundledTxResponse_5_list struct { + list *[]*anypb.Any +} + +func (x *_BundledTxResponse_5_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_BundledTxResponse_5_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_BundledTxResponse_5_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*anypb.Any) + (*x.list)[i] = concreteValue +} + +func (x *_BundledTxResponse_5_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*anypb.Any) + *x.list = append(*x.list, concreteValue) +} + +func (x *_BundledTxResponse_5_list) AppendMutable() protoreflect.Value { + v := new(anypb.Any) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_BundledTxResponse_5_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_BundledTxResponse_5_list) NewElement() protoreflect.Value { + v := new(anypb.Any) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_BundledTxResponse_5_list) IsValid() bool { + return x.list != nil +} + +var ( + md_BundledTxResponse protoreflect.MessageDescriptor + fd_BundledTxResponse_authentication_gas_used protoreflect.FieldDescriptor + fd_BundledTxResponse_bundler_payment_gas_used protoreflect.FieldDescriptor + fd_BundledTxResponse_bundler_payment_responses protoreflect.FieldDescriptor + fd_BundledTxResponse_execution_gas_used protoreflect.FieldDescriptor + fd_BundledTxResponse_execution_responses protoreflect.FieldDescriptor + fd_BundledTxResponse_error protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_v1_tx_proto_init() + md_BundledTxResponse = File_cosmos_accounts_v1_tx_proto.Messages().ByName("BundledTxResponse") + fd_BundledTxResponse_authentication_gas_used = md_BundledTxResponse.Fields().ByName("authentication_gas_used") + fd_BundledTxResponse_bundler_payment_gas_used = md_BundledTxResponse.Fields().ByName("bundler_payment_gas_used") + fd_BundledTxResponse_bundler_payment_responses = md_BundledTxResponse.Fields().ByName("bundler_payment_responses") + fd_BundledTxResponse_execution_gas_used = md_BundledTxResponse.Fields().ByName("execution_gas_used") + fd_BundledTxResponse_execution_responses = md_BundledTxResponse.Fields().ByName("execution_responses") + fd_BundledTxResponse_error = md_BundledTxResponse.Fields().ByName("error") +} + +var _ protoreflect.Message = (*fastReflection_BundledTxResponse)(nil) + +type fastReflection_BundledTxResponse BundledTxResponse + +func (x *BundledTxResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_BundledTxResponse)(x) +} + +func (x *BundledTxResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[5] + 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_BundledTxResponse_messageType fastReflection_BundledTxResponse_messageType +var _ protoreflect.MessageType = fastReflection_BundledTxResponse_messageType{} + +type fastReflection_BundledTxResponse_messageType struct{} + +func (x fastReflection_BundledTxResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_BundledTxResponse)(nil) +} +func (x fastReflection_BundledTxResponse_messageType) New() protoreflect.Message { + return new(fastReflection_BundledTxResponse) +} +func (x fastReflection_BundledTxResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_BundledTxResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_BundledTxResponse) Descriptor() protoreflect.MessageDescriptor { + return md_BundledTxResponse +} + +// 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_BundledTxResponse) Type() protoreflect.MessageType { + return _fastReflection_BundledTxResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_BundledTxResponse) New() protoreflect.Message { + return new(fastReflection_BundledTxResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_BundledTxResponse) Interface() protoreflect.ProtoMessage { + return (*BundledTxResponse)(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_BundledTxResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.AuthenticationGasUsed != uint64(0) { + value := protoreflect.ValueOfUint64(x.AuthenticationGasUsed) + if !f(fd_BundledTxResponse_authentication_gas_used, value) { + return + } + } + if x.BundlerPaymentGasUsed != uint64(0) { + value := protoreflect.ValueOfUint64(x.BundlerPaymentGasUsed) + if !f(fd_BundledTxResponse_bundler_payment_gas_used, value) { + return + } + } + if len(x.BundlerPaymentResponses) != 0 { + value := protoreflect.ValueOfList(&_BundledTxResponse_3_list{list: &x.BundlerPaymentResponses}) + if !f(fd_BundledTxResponse_bundler_payment_responses, value) { + return + } + } + if x.ExecutionGasUsed != uint64(0) { + value := protoreflect.ValueOfUint64(x.ExecutionGasUsed) + if !f(fd_BundledTxResponse_execution_gas_used, value) { + return + } + } + if len(x.ExecutionResponses) != 0 { + value := protoreflect.ValueOfList(&_BundledTxResponse_5_list{list: &x.ExecutionResponses}) + if !f(fd_BundledTxResponse_execution_responses, value) { + return + } + } + if x.Error != "" { + value := protoreflect.ValueOfString(x.Error) + if !f(fd_BundledTxResponse_error, 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_BundledTxResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.v1.BundledTxResponse.authentication_gas_used": + return x.AuthenticationGasUsed != uint64(0) + case "cosmos.accounts.v1.BundledTxResponse.bundler_payment_gas_used": + return x.BundlerPaymentGasUsed != uint64(0) + case "cosmos.accounts.v1.BundledTxResponse.bundler_payment_responses": + return len(x.BundlerPaymentResponses) != 0 + case "cosmos.accounts.v1.BundledTxResponse.execution_gas_used": + return x.ExecutionGasUsed != uint64(0) + case "cosmos.accounts.v1.BundledTxResponse.execution_responses": + return len(x.ExecutionResponses) != 0 + case "cosmos.accounts.v1.BundledTxResponse.error": + return x.Error != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.BundledTxResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.BundledTxResponse 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_BundledTxResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.v1.BundledTxResponse.authentication_gas_used": + x.AuthenticationGasUsed = uint64(0) + case "cosmos.accounts.v1.BundledTxResponse.bundler_payment_gas_used": + x.BundlerPaymentGasUsed = uint64(0) + case "cosmos.accounts.v1.BundledTxResponse.bundler_payment_responses": + x.BundlerPaymentResponses = nil + case "cosmos.accounts.v1.BundledTxResponse.execution_gas_used": + x.ExecutionGasUsed = uint64(0) + case "cosmos.accounts.v1.BundledTxResponse.execution_responses": + x.ExecutionResponses = nil + case "cosmos.accounts.v1.BundledTxResponse.error": + x.Error = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.BundledTxResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.BundledTxResponse 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_BundledTxResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.v1.BundledTxResponse.authentication_gas_used": + value := x.AuthenticationGasUsed + return protoreflect.ValueOfUint64(value) + case "cosmos.accounts.v1.BundledTxResponse.bundler_payment_gas_used": + value := x.BundlerPaymentGasUsed + return protoreflect.ValueOfUint64(value) + case "cosmos.accounts.v1.BundledTxResponse.bundler_payment_responses": + if len(x.BundlerPaymentResponses) == 0 { + return protoreflect.ValueOfList(&_BundledTxResponse_3_list{}) + } + listValue := &_BundledTxResponse_3_list{list: &x.BundlerPaymentResponses} + return protoreflect.ValueOfList(listValue) + case "cosmos.accounts.v1.BundledTxResponse.execution_gas_used": + value := x.ExecutionGasUsed + return protoreflect.ValueOfUint64(value) + case "cosmos.accounts.v1.BundledTxResponse.execution_responses": + if len(x.ExecutionResponses) == 0 { + return protoreflect.ValueOfList(&_BundledTxResponse_5_list{}) + } + listValue := &_BundledTxResponse_5_list{list: &x.ExecutionResponses} + return protoreflect.ValueOfList(listValue) + case "cosmos.accounts.v1.BundledTxResponse.error": + value := x.Error + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.BundledTxResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.BundledTxResponse 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_BundledTxResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.v1.BundledTxResponse.authentication_gas_used": + x.AuthenticationGasUsed = value.Uint() + case "cosmos.accounts.v1.BundledTxResponse.bundler_payment_gas_used": + x.BundlerPaymentGasUsed = value.Uint() + case "cosmos.accounts.v1.BundledTxResponse.bundler_payment_responses": + lv := value.List() + clv := lv.(*_BundledTxResponse_3_list) + x.BundlerPaymentResponses = *clv.list + case "cosmos.accounts.v1.BundledTxResponse.execution_gas_used": + x.ExecutionGasUsed = value.Uint() + case "cosmos.accounts.v1.BundledTxResponse.execution_responses": + lv := value.List() + clv := lv.(*_BundledTxResponse_5_list) + x.ExecutionResponses = *clv.list + case "cosmos.accounts.v1.BundledTxResponse.error": + x.Error = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.BundledTxResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.BundledTxResponse 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_BundledTxResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.v1.BundledTxResponse.bundler_payment_responses": + if x.BundlerPaymentResponses == nil { + x.BundlerPaymentResponses = []*anypb.Any{} + } + value := &_BundledTxResponse_3_list{list: &x.BundlerPaymentResponses} + return protoreflect.ValueOfList(value) + case "cosmos.accounts.v1.BundledTxResponse.execution_responses": + if x.ExecutionResponses == nil { + x.ExecutionResponses = []*anypb.Any{} + } + value := &_BundledTxResponse_5_list{list: &x.ExecutionResponses} + return protoreflect.ValueOfList(value) + case "cosmos.accounts.v1.BundledTxResponse.authentication_gas_used": + panic(fmt.Errorf("field authentication_gas_used of message cosmos.accounts.v1.BundledTxResponse is not mutable")) + case "cosmos.accounts.v1.BundledTxResponse.bundler_payment_gas_used": + panic(fmt.Errorf("field bundler_payment_gas_used of message cosmos.accounts.v1.BundledTxResponse is not mutable")) + case "cosmos.accounts.v1.BundledTxResponse.execution_gas_used": + panic(fmt.Errorf("field execution_gas_used of message cosmos.accounts.v1.BundledTxResponse is not mutable")) + case "cosmos.accounts.v1.BundledTxResponse.error": + panic(fmt.Errorf("field error of message cosmos.accounts.v1.BundledTxResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.BundledTxResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.BundledTxResponse 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_BundledTxResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.v1.BundledTxResponse.authentication_gas_used": + return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.accounts.v1.BundledTxResponse.bundler_payment_gas_used": + return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.accounts.v1.BundledTxResponse.bundler_payment_responses": + list := []*anypb.Any{} + return protoreflect.ValueOfList(&_BundledTxResponse_3_list{list: &list}) + case "cosmos.accounts.v1.BundledTxResponse.execution_gas_used": + return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.accounts.v1.BundledTxResponse.execution_responses": + list := []*anypb.Any{} + return protoreflect.ValueOfList(&_BundledTxResponse_5_list{list: &list}) + case "cosmos.accounts.v1.BundledTxResponse.error": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.BundledTxResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.BundledTxResponse 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_BundledTxResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.v1.BundledTxResponse", 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_BundledTxResponse) 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_BundledTxResponse) 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_BundledTxResponse) 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_BundledTxResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*BundledTxResponse) + 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.AuthenticationGasUsed != 0 { + n += 1 + runtime.Sov(uint64(x.AuthenticationGasUsed)) + } + if x.BundlerPaymentGasUsed != 0 { + n += 1 + runtime.Sov(uint64(x.BundlerPaymentGasUsed)) + } + if len(x.BundlerPaymentResponses) > 0 { + for _, e := range x.BundlerPaymentResponses { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.ExecutionGasUsed != 0 { + n += 1 + runtime.Sov(uint64(x.ExecutionGasUsed)) + } + if len(x.ExecutionResponses) > 0 { + for _, e := range x.ExecutionResponses { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.Error) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*BundledTxResponse) + 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.Error) > 0 { + i -= len(x.Error) + copy(dAtA[i:], x.Error) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Error))) + i-- + dAtA[i] = 0x32 + } + if len(x.ExecutionResponses) > 0 { + for iNdEx := len(x.ExecutionResponses) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.ExecutionResponses[iNdEx]) + 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] = 0x2a + } + } + if x.ExecutionGasUsed != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ExecutionGasUsed)) + i-- + dAtA[i] = 0x20 + } + if len(x.BundlerPaymentResponses) > 0 { + for iNdEx := len(x.BundlerPaymentResponses) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.BundlerPaymentResponses[iNdEx]) + 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] = 0x1a + } + } + if x.BundlerPaymentGasUsed != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.BundlerPaymentGasUsed)) + i-- + dAtA[i] = 0x10 + } + if x.AuthenticationGasUsed != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.AuthenticationGasUsed)) + i-- + dAtA[i] = 0x8 + } + 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().(*BundledTxResponse) + 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: BundledTxResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BundledTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AuthenticationGasUsed", wireType) + } + x.AuthenticationGasUsed = 0 + 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++ + x.AuthenticationGasUsed |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BundlerPaymentGasUsed", wireType) + } + x.BundlerPaymentGasUsed = 0 + 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++ + x.BundlerPaymentGasUsed |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BundlerPaymentResponses", 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 + } + x.BundlerPaymentResponses = append(x.BundlerPaymentResponses, &anypb.Any{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BundlerPaymentResponses[len(x.BundlerPaymentResponses)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExecutionGasUsed", wireType) + } + x.ExecutionGasUsed = 0 + 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++ + x.ExecutionGasUsed |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExecutionResponses", 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 + } + x.ExecutionResponses = append(x.ExecutionResponses, &anypb.Any{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ExecutionResponses[len(x.ExecutionResponses)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Error", 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.Error = 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, + } +} + +var _ protoreflect.List = (*_MsgExecuteBundleResponse_1_list)(nil) + +type _MsgExecuteBundleResponse_1_list struct { + list *[]*BundledTxResponse +} + +func (x *_MsgExecuteBundleResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgExecuteBundleResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgExecuteBundleResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*BundledTxResponse) + (*x.list)[i] = concreteValue +} + +func (x *_MsgExecuteBundleResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*BundledTxResponse) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgExecuteBundleResponse_1_list) AppendMutable() protoreflect.Value { + v := new(BundledTxResponse) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgExecuteBundleResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgExecuteBundleResponse_1_list) NewElement() protoreflect.Value { + v := new(BundledTxResponse) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgExecuteBundleResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgExecuteBundleResponse protoreflect.MessageDescriptor + fd_MsgExecuteBundleResponse_responses protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_v1_tx_proto_init() + md_MsgExecuteBundleResponse = File_cosmos_accounts_v1_tx_proto.Messages().ByName("MsgExecuteBundleResponse") + fd_MsgExecuteBundleResponse_responses = md_MsgExecuteBundleResponse.Fields().ByName("responses") +} + +var _ protoreflect.Message = (*fastReflection_MsgExecuteBundleResponse)(nil) + +type fastReflection_MsgExecuteBundleResponse MsgExecuteBundleResponse + +func (x *MsgExecuteBundleResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgExecuteBundleResponse)(x) +} + +func (x *MsgExecuteBundleResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[6] + 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_MsgExecuteBundleResponse_messageType fastReflection_MsgExecuteBundleResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgExecuteBundleResponse_messageType{} + +type fastReflection_MsgExecuteBundleResponse_messageType struct{} + +func (x fastReflection_MsgExecuteBundleResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgExecuteBundleResponse)(nil) +} +func (x fastReflection_MsgExecuteBundleResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgExecuteBundleResponse) +} +func (x fastReflection_MsgExecuteBundleResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgExecuteBundleResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgExecuteBundleResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgExecuteBundleResponse +} + +// 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_MsgExecuteBundleResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgExecuteBundleResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgExecuteBundleResponse) New() protoreflect.Message { + return new(fastReflection_MsgExecuteBundleResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgExecuteBundleResponse) Interface() protoreflect.ProtoMessage { + return (*MsgExecuteBundleResponse)(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_MsgExecuteBundleResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Responses) != 0 { + value := protoreflect.ValueOfList(&_MsgExecuteBundleResponse_1_list{list: &x.Responses}) + if !f(fd_MsgExecuteBundleResponse_responses, 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_MsgExecuteBundleResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgExecuteBundleResponse.responses": + return len(x.Responses) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundleResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteBundleResponse 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_MsgExecuteBundleResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgExecuteBundleResponse.responses": + x.Responses = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundleResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteBundleResponse 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_MsgExecuteBundleResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.v1.MsgExecuteBundleResponse.responses": + if len(x.Responses) == 0 { + return protoreflect.ValueOfList(&_MsgExecuteBundleResponse_1_list{}) + } + listValue := &_MsgExecuteBundleResponse_1_list{list: &x.Responses} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundleResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteBundleResponse 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_MsgExecuteBundleResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgExecuteBundleResponse.responses": + lv := value.List() + clv := lv.(*_MsgExecuteBundleResponse_1_list) + x.Responses = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundleResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteBundleResponse 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_MsgExecuteBundleResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgExecuteBundleResponse.responses": + if x.Responses == nil { + x.Responses = []*BundledTxResponse{} + } + value := &_MsgExecuteBundleResponse_1_list{list: &x.Responses} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundleResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteBundleResponse 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_MsgExecuteBundleResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.v1.MsgExecuteBundleResponse.responses": + list := []*BundledTxResponse{} + return protoreflect.ValueOfList(&_MsgExecuteBundleResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundleResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteBundleResponse 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_MsgExecuteBundleResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.v1.MsgExecuteBundleResponse", 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_MsgExecuteBundleResponse) 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_MsgExecuteBundleResponse) 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_MsgExecuteBundleResponse) 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_MsgExecuteBundleResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgExecuteBundleResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Responses) > 0 { + for _, e := range x.Responses { + l = options.Size(e) + 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().(*MsgExecuteBundleResponse) + 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.Responses) > 0 { + for iNdEx := len(x.Responses) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Responses[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgExecuteBundleResponse) + 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: MsgExecuteBundleResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecuteBundleResponse: 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 Responses", 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 + } + x.Responses = append(x.Responses, &BundledTxResponse{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Responses[len(x.Responses)-1]); 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, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: cosmos/accounts/v1/tx.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// MsgInit defines the Create request type for the Msg/Create RPC method. +type MsgInit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // sender is the address of the sender of this message. + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // account_type is the type of the account to be created. + AccountType string `protobuf:"bytes,2,opt,name=account_type,json=accountType,proto3" json:"account_type,omitempty"` + // message is the message to be sent to the account. + Message *anypb.Any `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` + // funds contains the coins that the account wants to + // send alongside the request. + Funds []*v1beta1.Coin `protobuf:"bytes,4,rep,name=funds,proto3" json:"funds,omitempty"` + // address_seed can be used to deterministically create the address of the account. + // If not present the address will be generated based on its associated account number. + AddressSeed []byte `protobuf:"bytes,5,opt,name=address_seed,json=addressSeed,proto3" json:"address_seed,omitempty"` +} + +func (x *MsgInit) Reset() { + *x = MsgInit{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgInit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgInit) ProtoMessage() {} + +// Deprecated: Use MsgInit.ProtoReflect.Descriptor instead. +func (*MsgInit) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_v1_tx_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgInit) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *MsgInit) GetAccountType() string { + if x != nil { + return x.AccountType + } + return "" +} + +func (x *MsgInit) GetMessage() *anypb.Any { + if x != nil { + return x.Message + } + return nil +} + +func (x *MsgInit) GetFunds() []*v1beta1.Coin { + if x != nil { + return x.Funds + } + return nil +} + +func (x *MsgInit) GetAddressSeed() []byte { + if x != nil { + return x.AddressSeed + } + return nil +} + +// MsgInitResponse defines the Create response type for the Msg/Create RPC method. +type MsgInitResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // account_address is the address of the newly created account. + AccountAddress string `protobuf:"bytes,1,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` + // response is the response returned by the account implementation. + Response *anypb.Any `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"` +} + +func (x *MsgInitResponse) Reset() { + *x = MsgInitResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgInitResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgInitResponse) ProtoMessage() {} + +// Deprecated: Use MsgInitResponse.ProtoReflect.Descriptor instead. +func (*MsgInitResponse) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_v1_tx_proto_rawDescGZIP(), []int{1} +} + +func (x *MsgInitResponse) GetAccountAddress() string { + if x != nil { + return x.AccountAddress + } + return "" +} + +func (x *MsgInitResponse) GetResponse() *anypb.Any { + if x != nil { + return x.Response + } + return nil +} + +// MsgExecute defines the Execute request type for the Msg/Execute RPC method. +type MsgExecute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // sender is the address of the sender of this message. + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // target is the address of the account to be executed. + Target string `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"` + // message is the message to be sent to the account. + Message *anypb.Any `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` + // funds contains the coins that the account wants to + // send alongside the request. + Funds []*v1beta1.Coin `protobuf:"bytes,4,rep,name=funds,proto3" json:"funds,omitempty"` +} + +func (x *MsgExecute) Reset() { + *x = MsgExecute{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgExecute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgExecute) ProtoMessage() {} + +// Deprecated: Use MsgExecute.ProtoReflect.Descriptor instead. +func (*MsgExecute) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_v1_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgExecute) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *MsgExecute) GetTarget() string { + if x != nil { + return x.Target + } + return "" +} + +func (x *MsgExecute) GetMessage() *anypb.Any { + if x != nil { + return x.Message + } + return nil +} + +func (x *MsgExecute) GetFunds() []*v1beta1.Coin { + if x != nil { + return x.Funds + } + return nil +} + +// MsgExecuteResponse defines the Execute response type for the Msg/Execute RPC method. +type MsgExecuteResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // response is the response returned by the account implementation. + Response *anypb.Any `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` +} + +func (x *MsgExecuteResponse) Reset() { + *x = MsgExecuteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgExecuteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgExecuteResponse) ProtoMessage() {} + +// Deprecated: Use MsgExecuteResponse.ProtoReflect.Descriptor instead. +func (*MsgExecuteResponse) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_v1_tx_proto_rawDescGZIP(), []int{3} +} + +func (x *MsgExecuteResponse) GetResponse() *anypb.Any { + if x != nil { + return x.Response + } + return nil +} + +// MsgExecuteBundle defines the ExecuteBundle request type for the Msg/ExecuteBundle RPC method. +type MsgExecuteBundle struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // bundler defines the entity going through the standard TX flow + // to execute one or multiple UserOperations on behalf of others. + Bundler string `protobuf:"bytes,1,opt,name=bundler,proto3" json:"bundler,omitempty"` + // txs defines the txs to execute on behalf of other users. + Txs [][]byte `protobuf:"bytes,2,rep,name=txs,proto3" json:"txs,omitempty"` +} + +func (x *MsgExecuteBundle) Reset() { + *x = MsgExecuteBundle{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgExecuteBundle) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgExecuteBundle) ProtoMessage() {} + +// Deprecated: Use MsgExecuteBundle.ProtoReflect.Descriptor instead. +func (*MsgExecuteBundle) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_v1_tx_proto_rawDescGZIP(), []int{4} +} + +func (x *MsgExecuteBundle) GetBundler() string { + if x != nil { + return x.Bundler + } + return "" +} + +func (x *MsgExecuteBundle) GetTxs() [][]byte { + if x != nil { + return x.Txs + } + return nil +} + +// BundledTxResponse defines the response of a bundled tx. +// If the operation fails the error field will be populated, the used gas fields will also be +// populated depending on when the execution stopped. Bundler payment responses will be populated +// if the execution fails. +type BundledTxResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authentication_gas_used defines the gas used for the authentication part of the UserOperation. + AuthenticationGasUsed uint64 `protobuf:"varint,1,opt,name=authentication_gas_used,json=authenticationGasUsed,proto3" json:"authentication_gas_used,omitempty"` + // bundler_payment_gas_used defines the gas used for the bundler payment part of the UserOperation. + BundlerPaymentGasUsed uint64 `protobuf:"varint,2,opt,name=bundler_payment_gas_used,json=bundlerPaymentGasUsed,proto3" json:"bundler_payment_gas_used,omitempty"` + // bundler_payment_responses defines the responses of the bundler payment messages. + // It can be empty if the bundler does not need any form of payment. + BundlerPaymentResponses []*anypb.Any `protobuf:"bytes,3,rep,name=bundler_payment_responses,json=bundlerPaymentResponses,proto3" json:"bundler_payment_responses,omitempty"` + // execution_gas_used defines the gas used for the execution part of the UserOperation. + ExecutionGasUsed uint64 `protobuf:"varint,4,opt,name=execution_gas_used,json=executionGasUsed,proto3" json:"execution_gas_used,omitempty"` + // execution_responses defines the responses of the execution messages. + ExecutionResponses []*anypb.Any `protobuf:"bytes,5,rep,name=execution_responses,json=executionResponses,proto3" json:"execution_responses,omitempty"` + // error defines the error that occurred during the execution of the UserOperation. + // If the error is not empty, the UserOperation failed. + // Other fields might be populated even if the error is not empty, for example + // if the operation fails after the authentication step, the authentication_gas_used + // field will be populated. + Error string `protobuf:"bytes,6,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *BundledTxResponse) Reset() { + *x = BundledTxResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BundledTxResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BundledTxResponse) ProtoMessage() {} + +// Deprecated: Use BundledTxResponse.ProtoReflect.Descriptor instead. +func (*BundledTxResponse) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_v1_tx_proto_rawDescGZIP(), []int{5} +} + +func (x *BundledTxResponse) GetAuthenticationGasUsed() uint64 { + if x != nil { + return x.AuthenticationGasUsed + } + return 0 +} + +func (x *BundledTxResponse) GetBundlerPaymentGasUsed() uint64 { + if x != nil { + return x.BundlerPaymentGasUsed + } + return 0 +} + +func (x *BundledTxResponse) GetBundlerPaymentResponses() []*anypb.Any { + if x != nil { + return x.BundlerPaymentResponses + } + return nil +} + +func (x *BundledTxResponse) GetExecutionGasUsed() uint64 { + if x != nil { + return x.ExecutionGasUsed + } + return 0 +} + +func (x *BundledTxResponse) GetExecutionResponses() []*anypb.Any { + if x != nil { + return x.ExecutionResponses + } + return nil +} + +func (x *BundledTxResponse) GetError() string { + if x != nil { + return x.Error + } + return "" +} + +// MsgExecuteBundleResponse defines the ExecuteBundle response type for the Msg/ExecuteBundle RPC method. +type MsgExecuteBundleResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // responses is the list of responses from the bundle txs. + Responses []*BundledTxResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` +} + +func (x *MsgExecuteBundleResponse) Reset() { + *x = MsgExecuteBundleResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgExecuteBundleResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgExecuteBundleResponse) ProtoMessage() {} + +// Deprecated: Use MsgExecuteBundleResponse.ProtoReflect.Descriptor instead. +func (*MsgExecuteBundleResponse) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_v1_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgExecuteBundleResponse) GetResponses() []*BundledTxResponse { + if x != nil { + return x.Responses + } + return nil +} + +var File_cosmos_accounts_v1_tx_proto protoreflect.FileDescriptor + +var file_cosmos_accounts_v1_tx_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, + 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, + 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x02, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x49, + 0x6e, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2e, + 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x61, + 0x0a, 0x05, 0x66, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, + 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x05, 0x66, 0x75, 0x6e, 0x64, + 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x65, + 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x65, 0x65, 0x64, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x22, 0x6c, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, + 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0xdc, 0x01, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2e, + 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x61, + 0x0a, 0x05, 0x66, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, + 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x05, 0x66, 0x75, 0x6e, 0x64, + 0x73, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x46, + 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4c, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x75, + 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x75, 0x6e, + 0x64, 0x6c, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0c, 0x52, 0x03, 0x74, 0x78, 0x73, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x62, 0x75, 0x6e, + 0x64, 0x6c, 0x65, 0x72, 0x22, 0xe1, 0x02, 0x0a, 0x11, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x64, + 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x61, 0x75, + 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x61, 0x73, + 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x61, 0x75, 0x74, + 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x61, 0x73, 0x55, 0x73, + 0x65, 0x64, 0x12, 0x37, 0x0a, 0x18, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x61, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x50, 0x61, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x47, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x50, 0x0a, 0x19, 0x62, + 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x17, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x50, 0x61, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x2c, 0x0a, + 0x12, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x75, + 0x73, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x12, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x5f, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x6e, + 0x64, 0x6c, 0x65, 0x64, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x32, 0x8e, 0x02, 0x0a, 0x03, 0x4d, 0x73, + 0x67, 0x12, 0x48, 0x0a, 0x04, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, + 0x6e, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x07, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, + 0x0a, 0x0d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, + 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x42, + 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xbb, 0x01, 0x0a, 0x16, 0x63, + 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x1e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cosmos_accounts_v1_tx_proto_rawDescOnce sync.Once + file_cosmos_accounts_v1_tx_proto_rawDescData = file_cosmos_accounts_v1_tx_proto_rawDesc +) + +func file_cosmos_accounts_v1_tx_proto_rawDescGZIP() []byte { + file_cosmos_accounts_v1_tx_proto_rawDescOnce.Do(func() { + file_cosmos_accounts_v1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_accounts_v1_tx_proto_rawDescData) + }) + return file_cosmos_accounts_v1_tx_proto_rawDescData +} + +var file_cosmos_accounts_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_cosmos_accounts_v1_tx_proto_goTypes = []interface{}{ + (*MsgInit)(nil), // 0: cosmos.accounts.v1.MsgInit + (*MsgInitResponse)(nil), // 1: cosmos.accounts.v1.MsgInitResponse + (*MsgExecute)(nil), // 2: cosmos.accounts.v1.MsgExecute + (*MsgExecuteResponse)(nil), // 3: cosmos.accounts.v1.MsgExecuteResponse + (*MsgExecuteBundle)(nil), // 4: cosmos.accounts.v1.MsgExecuteBundle + (*BundledTxResponse)(nil), // 5: cosmos.accounts.v1.BundledTxResponse + (*MsgExecuteBundleResponse)(nil), // 6: cosmos.accounts.v1.MsgExecuteBundleResponse + (*anypb.Any)(nil), // 7: google.protobuf.Any + (*v1beta1.Coin)(nil), // 8: cosmos.base.v1beta1.Coin +} +var file_cosmos_accounts_v1_tx_proto_depIdxs = []int32{ + 7, // 0: cosmos.accounts.v1.MsgInit.message:type_name -> google.protobuf.Any + 8, // 1: cosmos.accounts.v1.MsgInit.funds:type_name -> cosmos.base.v1beta1.Coin + 7, // 2: cosmos.accounts.v1.MsgInitResponse.response:type_name -> google.protobuf.Any + 7, // 3: cosmos.accounts.v1.MsgExecute.message:type_name -> google.protobuf.Any + 8, // 4: cosmos.accounts.v1.MsgExecute.funds:type_name -> cosmos.base.v1beta1.Coin + 7, // 5: cosmos.accounts.v1.MsgExecuteResponse.response:type_name -> google.protobuf.Any + 7, // 6: cosmos.accounts.v1.BundledTxResponse.bundler_payment_responses:type_name -> google.protobuf.Any + 7, // 7: cosmos.accounts.v1.BundledTxResponse.execution_responses:type_name -> google.protobuf.Any + 5, // 8: cosmos.accounts.v1.MsgExecuteBundleResponse.responses:type_name -> cosmos.accounts.v1.BundledTxResponse + 0, // 9: cosmos.accounts.v1.Msg.Init:input_type -> cosmos.accounts.v1.MsgInit + 2, // 10: cosmos.accounts.v1.Msg.Execute:input_type -> cosmos.accounts.v1.MsgExecute + 4, // 11: cosmos.accounts.v1.Msg.ExecuteBundle:input_type -> cosmos.accounts.v1.MsgExecuteBundle + 1, // 12: cosmos.accounts.v1.Msg.Init:output_type -> cosmos.accounts.v1.MsgInitResponse + 3, // 13: cosmos.accounts.v1.Msg.Execute:output_type -> cosmos.accounts.v1.MsgExecuteResponse + 6, // 14: cosmos.accounts.v1.Msg.ExecuteBundle:output_type -> cosmos.accounts.v1.MsgExecuteBundleResponse + 12, // [12:15] is the sub-list for method output_type + 9, // [9:12] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_cosmos_accounts_v1_tx_proto_init() } +func file_cosmos_accounts_v1_tx_proto_init() { + if File_cosmos_accounts_v1_tx_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_cosmos_accounts_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgInit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgInitResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgExecute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgExecuteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgExecuteBundle); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BundledTxResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgExecuteBundleResponse); 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{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_cosmos_accounts_v1_tx_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_cosmos_accounts_v1_tx_proto_goTypes, + DependencyIndexes: file_cosmos_accounts_v1_tx_proto_depIdxs, + MessageInfos: file_cosmos_accounts_v1_tx_proto_msgTypes, + }.Build() + File_cosmos_accounts_v1_tx_proto = out.File + file_cosmos_accounts_v1_tx_proto_rawDesc = nil + file_cosmos_accounts_v1_tx_proto_goTypes = nil + file_cosmos_accounts_v1_tx_proto_depIdxs = nil +} diff --git a/tests/integration/accounts/base_account_test.go b/tests/integration/accounts/base_account_test.go index 8db4cbf1a9e3..5f239d36c083 100644 --- a/tests/integration/accounts/base_account_test.go +++ b/tests/integration/accounts/base_account_test.go @@ -32,7 +32,7 @@ func TestBaseAccount(t *testing.T) { _, baseAccountAddr, err := ak.Init(ctx, "base", accCreator, &baseaccountv1.MsgInit{ PubKey: toAnyPb(t, privKey.PubKey()), - }, nil) + }, nil, nil) require.NoError(t, err) // fund base account! this will also cause an auth base account to be created diff --git a/tests/integration/accounts/fixture_test.go b/tests/integration/accounts/fixture_test.go index 1f4522f866a5..0cf55d6d9022 100644 --- a/tests/integration/accounts/fixture_test.go +++ b/tests/integration/accounts/fixture_test.go @@ -185,7 +185,7 @@ func initFixture(t *testing.T, f func(ctx context.Context, msg *account_abstract banktypes.RegisterMsgServer(router, bankkeeper.NewMsgServerImpl(bankKeeper)) // init account - _, addr, err := accountsKeeper.Init(integrationApp.Context(), "mock", []byte("system"), &gogotypes.Empty{}, nil) + _, addr, err := accountsKeeper.Init(integrationApp.Context(), "mock", []byte("system"), &gogotypes.Empty{}, nil, nil) require.NoError(t, err) fixture := &fixture{ diff --git a/tests/integration/accounts/lockup/continous_lockup_test_suite.go b/tests/integration/accounts/lockup/continous_lockup_test_suite.go index 40da6a5a9ad0..2fbc794edee9 100644 --- a/tests/integration/accounts/lockup/continous_lockup_test_suite.go +++ b/tests/integration/accounts/lockup/continous_lockup_test_suite.go @@ -34,7 +34,7 @@ func (s *IntegrationTestSuite) TestContinuousLockingAccount() { StartTime: currentTime, // end time in 1 minutes EndTime: currentTime.Add(time.Minute), - }, sdk.Coins{sdk.NewCoin("stake", math.NewInt(1000))}) + }, sdk.Coins{sdk.NewCoin("stake", math.NewInt(1000))}, nil) require.NoError(t, err) addr, err := app.AuthKeeper.AddressCodec().BytesToString(randAcc) diff --git a/tests/integration/accounts/lockup/delayed_lockup_test_suite.go b/tests/integration/accounts/lockup/delayed_lockup_test_suite.go index 09aa153a468f..ff1131403fb8 100644 --- a/tests/integration/accounts/lockup/delayed_lockup_test_suite.go +++ b/tests/integration/accounts/lockup/delayed_lockup_test_suite.go @@ -33,7 +33,7 @@ func (s *IntegrationTestSuite) TestDelayedLockingAccount() { Owner: ownerAddrStr, // end time in 1 minutes EndTime: currentTime.Add(time.Minute), - }, sdk.Coins{sdk.NewCoin("stake", math.NewInt(1000))}) + }, sdk.Coins{sdk.NewCoin("stake", math.NewInt(1000))}, nil) require.NoError(t, err) addr, err := app.AuthKeeper.AddressCodec().BytesToString(randAcc) diff --git a/tests/integration/accounts/lockup/periodic_lockup_test_suite.go b/tests/integration/accounts/lockup/periodic_lockup_test_suite.go index 1f093714f0e8..2a727bd243cc 100644 --- a/tests/integration/accounts/lockup/periodic_lockup_test_suite.go +++ b/tests/integration/accounts/lockup/periodic_lockup_test_suite.go @@ -47,7 +47,7 @@ func (s *IntegrationTestSuite) TestPeriodicLockingAccount() { Length: time.Minute, }, }, - }, sdk.Coins{sdk.NewCoin("stake", math.NewInt(1500))}) + }, sdk.Coins{sdk.NewCoin("stake", math.NewInt(1500))}, nil) require.NoError(t, err) addr, err := app.AuthKeeper.AddressCodec().BytesToString(randAcc) diff --git a/tests/integration/accounts/lockup/permanent_lockup_test_suite.go b/tests/integration/accounts/lockup/permanent_lockup_test_suite.go index e94107f668d8..1505dbac0c17 100644 --- a/tests/integration/accounts/lockup/permanent_lockup_test_suite.go +++ b/tests/integration/accounts/lockup/permanent_lockup_test_suite.go @@ -30,7 +30,7 @@ func (s *IntegrationTestSuite) TestPermanentLockingAccount() { _, accountAddr, err := app.AccountsKeeper.Init(ctx, lockupaccount.PERMANENT_LOCKING_ACCOUNT, accOwner, &types.MsgInitLockupAccount{ Owner: ownerAddrStr, - }, sdk.Coins{sdk.NewCoin("stake", math.NewInt(1000))}) + }, sdk.Coins{sdk.NewCoin("stake", math.NewInt(1000))}, nil) require.NoError(t, err) addr, err := app.AuthKeeper.AddressCodec().BytesToString(randAcc) diff --git a/tests/integration/accounts/multisig/test_suite.go b/tests/integration/accounts/multisig/test_suite.go index e22fd9ed3365..631ddb58ab4c 100644 --- a/tests/integration/accounts/multisig/test_suite.go +++ b/tests/integration/accounts/multisig/test_suite.go @@ -85,7 +85,7 @@ func (s *IntegrationTestSuite) initAccount(ctx context.Context, sender []byte, m Revote: false, EarlyExecution: true, }, - }, sdk.Coins{sdk.NewCoin("stake", math.NewInt(1000))}) + }, sdk.Coins{sdk.NewCoin("stake", math.NewInt(1000))}, nil) s.NoError(err) accountAddrStr, err := s.app.AuthKeeper.AddressCodec().BytesToString(accountAddr) diff --git a/tests/integration/accounts/wiring_test.go b/tests/integration/accounts/wiring_test.go index a60d941e49a8..3d0a8ed0b5b4 100644 --- a/tests/integration/accounts/wiring_test.go +++ b/tests/integration/accounts/wiring_test.go @@ -28,7 +28,7 @@ func TestDependencies(t *testing.T) { _, counterAddr, err := ak.Init(ctx, "counter", accCreator, &counterv1.MsgInit{ InitialValue: 0, - }, nil) + }, nil, nil) require.NoError(t, err) // test dependencies creatorInitFunds := sdk.NewCoins(sdk.NewInt64Coin("stake", 100_000)) diff --git a/tests/integration/auth/keeper/accounts_retro_compatibility_test.go b/tests/integration/auth/keeper/accounts_retro_compatibility_test.go index 8b388b41a70d..1dcc67458a28 100644 --- a/tests/integration/auth/keeper/accounts_retro_compatibility_test.go +++ b/tests/integration/auth/keeper/accounts_retro_compatibility_test.go @@ -74,7 +74,7 @@ func TestAuthToAccountsGRPCCompat(t *testing.T) { // init three accounts for n, a := range accs { - _, addr, err := f.accountsKeeper.Init(f.app.Context(), n, []byte("me"), &gogotypes.Empty{}, nil) + _, addr, err := f.accountsKeeper.Init(f.app.Context(), n, []byte("me"), &gogotypes.Empty{}, nil, nil) require.NoError(t, err) a.(*mockRetroCompatAccount).address = addr } @@ -132,10 +132,10 @@ func TestAccountsBaseAccountRetroCompat(t *testing.T) { require.NoError(t, err) // we init two accounts to have account num not be zero. - _, _, err = f.accountsKeeper.Init(f.app.Context(), "base", []byte("me"), &basev1.MsgInit{PubKey: anyPk}, nil) + _, _, err = f.accountsKeeper.Init(f.app.Context(), "base", []byte("me"), &basev1.MsgInit{PubKey: anyPk}, nil, nil) require.NoError(t, err) - _, addr, err := f.accountsKeeper.Init(f.app.Context(), "base", []byte("me"), &basev1.MsgInit{PubKey: anyPk}, nil) + _, addr, err := f.accountsKeeper.Init(f.app.Context(), "base", []byte("me"), &basev1.MsgInit{PubKey: anyPk}, nil, nil) require.NoError(t, err) // try to query it via auth diff --git a/tests/integration/v2/auth/accounts_retro_compatibility_test.go b/tests/integration/v2/auth/accounts_retro_compatibility_test.go new file mode 100644 index 000000000000..ab7c6b476c9c --- /dev/null +++ b/tests/integration/v2/auth/accounts_retro_compatibility_test.go @@ -0,0 +1,185 @@ +package auth + +import ( + "context" + "errors" + "testing" + + gogotypes "github.com/cosmos/gogoproto/types" + "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "cosmossdk.io/x/accounts/accountstd" + basev1 "cosmossdk.io/x/accounts/defaults/base/v1" + + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" +) + +var _ accountstd.Interface = mockRetroCompatAccount{} + +type mockRetroCompatAccount struct { + retroCompat *authtypes.QueryLegacyAccountResponse + address []byte +} + +var ( + valid = &mockRetroCompatAccount{ + retroCompat: &authtypes.QueryLegacyAccountResponse{ + Account: &codectypes.Any{}, + Base: &authtypes.BaseAccount{ + Address: "test", + PubKey: nil, + AccountNumber: 10, + Sequence: 20, + }, + }, + } + + noInfo = &mockRetroCompatAccount{ + retroCompat: &authtypes.QueryLegacyAccountResponse{ + Account: &codectypes.Any{}, + }, + } + noImplement = &mockRetroCompatAccount{ + retroCompat: nil, + } +) + +func newMockRetroCompatAccount(name string, acc accountstd.Interface) accountstd.AccountCreatorFunc { + return func(_ accountstd.Dependencies) (string, accountstd.Interface, error) { + _, ok := acc.(*mockRetroCompatAccount) + if !ok { + return name, nil, errors.New("invalid account type") + } + return name, acc, nil + } +} + +func ProvideMockRetroCompatAccountValid() accountstd.DepinjectAccount { + return accountstd.DepinjectAccount{MakeAccount: newMockRetroCompatAccount("valid", valid)} +} + +func ProvideMockRetroCompatAccountNoInfo() accountstd.DepinjectAccount { + return accountstd.DepinjectAccount{MakeAccount: newMockRetroCompatAccount("no_info", noInfo)} +} + +func ProvideMockRetroCompatAccountNoImplement() accountstd.DepinjectAccount { + return accountstd.DepinjectAccount{MakeAccount: newMockRetroCompatAccount("no_implement", noImplement)} +} + +func (m mockRetroCompatAccount) RegisterInitHandler(builder *accountstd.InitBuilder) { + accountstd.RegisterInitHandler(builder, func(ctx context.Context, req *gogotypes.Empty) (*gogotypes.Empty, error) { + return &gogotypes.Empty{}, nil + }) +} + +func (m mockRetroCompatAccount) RegisterExecuteHandlers(_ *accountstd.ExecuteBuilder) {} + +func (m mockRetroCompatAccount) RegisterQueryHandlers(builder *accountstd.QueryBuilder) { + if m.retroCompat == nil { + return + } + accountstd.RegisterQueryHandler(builder, func(ctx context.Context, req *authtypes.QueryLegacyAccount) (*authtypes.QueryLegacyAccountResponse, error) { + return m.retroCompat, nil + }) +} + +func TestAuthToAccountsGRPCCompat(t *testing.T) { + accs := map[string]accountstd.Interface{ + "valid": valid, + "no_info": noInfo, + "no_implement": noImplement, + } + + f := createTestSuite(t) + + // init three accounts + for n, a := range accs { + _, addr, err := f.accountsKeeper.Init(f.ctx, n, []byte("me"), &gogotypes.Empty{}, nil, nil) + require.NoError(t, err) + a.(*mockRetroCompatAccount).address = addr + } + + qs := authkeeper.NewQueryServer(f.authKeeper) + + t.Run("account supports info and account query", func(t *testing.T) { + infoResp, err := qs.AccountInfo(f.ctx, &authtypes.QueryAccountInfoRequest{ + Address: f.mustAddr(valid.address), + }) + require.NoError(t, err) + require.Equal(t, infoResp.Info, valid.retroCompat.Base) + + accountResp, err := qs.Account(f.ctx, &authtypes.QueryAccountRequest{ + Address: f.mustAddr(noInfo.address), + }) + require.NoError(t, err) + require.Equal(t, accountResp.Account, valid.retroCompat.Account) + }) + + t.Run("account only supports account query, not info", func(t *testing.T) { + _, err := qs.AccountInfo(f.ctx, &authtypes.QueryAccountInfoRequest{ + Address: f.mustAddr(noInfo.address), + }) + require.Error(t, err) + require.Equal(t, status.Code(err), codes.NotFound) + + resp, err := qs.Account(f.ctx, &authtypes.QueryAccountRequest{ + Address: f.mustAddr(noInfo.address), + }) + require.NoError(t, err) + require.Equal(t, resp.Account, valid.retroCompat.Account) + }) + + t.Run("account does not support any retro compat", func(t *testing.T) { + _, err := qs.AccountInfo(f.ctx, &authtypes.QueryAccountInfoRequest{ + Address: f.mustAddr(noImplement.address), + }) + require.Error(t, err) + require.Equal(t, status.Code(err), codes.NotFound) + + _, err = qs.Account(f.ctx, &authtypes.QueryAccountRequest{ + Address: f.mustAddr(noImplement.address), + }) + + require.Error(t, err) + require.Equal(t, status.Code(err), codes.NotFound) + }) +} + +func TestAccountsBaseAccountRetroCompat(t *testing.T) { + f := createTestSuite(t) + // init a base acc + anyPk, err := codectypes.NewAnyWithValue(secp256k1.GenPrivKey().PubKey()) + require.NoError(t, err) + + // we init two accounts. Account number should start with 4 + // since the first three accounts are fee_collector, bonded_tokens_pool, not_bonded_tokens_pool + // generated by init genesis plus one more genesis account, which make the current account number 4. + _, _, err = f.accountsKeeper.Init(f.ctx, "base", []byte("me"), &basev1.MsgInit{PubKey: anyPk}, nil, nil) + require.NoError(t, err) + + _, addr, err := f.accountsKeeper.Init(f.ctx, "base", []byte("me"), &basev1.MsgInit{PubKey: anyPk}, nil, nil) + require.NoError(t, err) + + // try to query it via auth + qs := authkeeper.NewQueryServer(f.authKeeper) + + r, err := qs.Account(f.ctx, &authtypes.QueryAccountRequest{ + Address: f.mustAddr(addr), + }) + require.NoError(t, err) + require.NotNil(t, r.Account) + + info, err := qs.AccountInfo(f.ctx, &authtypes.QueryAccountInfoRequest{ + Address: f.mustAddr(addr), + }) + require.NoError(t, err) + require.NotNil(t, info.Info) + require.Equal(t, info.Info.PubKey, anyPk) + // Account number should be 5 + require.Equal(t, info.Info.AccountNumber, uint64(5)) +} diff --git a/x/accounts/README.md b/x/accounts/README.md index de2c6717fb89..b44e9d297c1e 100644 --- a/x/accounts/README.md +++ b/x/accounts/README.md @@ -496,6 +496,32 @@ func (a Account) AuthRetroCompatibility(ctx context.Context, _ *authtypes.QueryL * Implement this handler only for account types you want to expose via x/auth gRPC methods. * The `info` field in the response can be nil if your account doesn't fit the `BaseAccount` structure. +## Address Derivation + +The x/accounts module offers two methods for deriving addresses, both ensuring non-squattability. This means each address is uniquely tied to its creator, preventing address collisions between different creators (e.g., Alice cannot create addresses that would conflict with Bob's addresses). + +### Method 1: Using Address Seeds + +When creating an account via `MsgInit`, you can provide an `address_seed`. The address is derived using: + +```bash +address = sha256(ModuleName || address_seed || creator_address) +``` + +### Method 2: Using Account Numbers +If no address seed is provided, the address is derived using: + +``` +address = sha256(ModuleName || creator_address || next_account_number) +``` + +### Address Seed Best Practices + +1. Address seeds must be unique per creator (not globally unique) +2. Reusing an address seed will cause account creation to fail +3. For programmatic account creation, use an incrementing sequence number as the address seed +4. This is particularly useful for contracts or modules that need deterministic address generation + ## Genesis ### Creating accounts on genesis diff --git a/x/accounts/errors.go b/x/accounts/errors.go index c0a55741aee2..f19551cdc13f 100644 --- a/x/accounts/errors.go +++ b/x/accounts/errors.go @@ -10,4 +10,6 @@ var ( ErrBundlerPayment = errors.New(ModuleName, 2, "bundler payment failed") // ErrExecution is returned when the execution fails. ErrExecution = errors.New(ModuleName, 3, "execution failed") + // ErrAccountAlreadyExists is returned when the account already exists in state. + ErrAccountAlreadyExists = errors.New(ModuleName, 4, "account already exists") ) diff --git a/x/accounts/genesis_test.go b/x/accounts/genesis_test.go index 14c2470d84bd..da500d8039c3 100644 --- a/x/accounts/genesis_test.go +++ b/x/accounts/genesis_test.go @@ -19,13 +19,13 @@ func TestGenesis(t *testing.T) { // we init two accounts of the same type // we set counter to 10 - _, addr1, err := k.Init(ctx, testAccountType, []byte("sender"), &types.Empty{}, nil) + _, addr1, err := k.Init(ctx, testAccountType, []byte("sender"), &types.Empty{}, nil, nil) require.NoError(t, err) _, err = k.Execute(ctx, addr1, []byte("sender"), &types.UInt64Value{Value: 10}, nil) require.NoError(t, err) // we set counter to 20 - _, addr2, err := k.Init(ctx, testAccountType, []byte("sender"), &types.Empty{}, nil) + _, addr2, err := k.Init(ctx, testAccountType, []byte("sender"), &types.Empty{}, nil, nil) require.NoError(t, err) _, err = k.Execute(ctx, addr2, []byte("sender"), &types.UInt64Value{Value: 20}, nil) require.NoError(t, err) @@ -62,7 +62,7 @@ func TestGenesis(t *testing.T) { require.Equal(t, &types.UInt64Value{Value: 20}, resp) // check initted on genesis account - addr3, err := k.makeAddress(2) + addr3, err := k.makeAddress([]byte("sender-2"), 2, nil) require.NoError(t, err) resp, err = k.Query(ctx, addr3, &types.DoubleValue{}) require.NoError(t, err) diff --git a/x/accounts/keeper.go b/x/accounts/keeper.go index cf306dab0e01..056c1c5e1e87 100644 --- a/x/accounts/keeper.go +++ b/x/accounts/keeper.go @@ -148,6 +148,7 @@ func (k Keeper) Init( creator []byte, initRequest transaction.Msg, funds sdk.Coins, + addressSeed []byte, ) (transaction.Msg, []byte, error) { // get the next account number num, err := k.AccountNumber.Next(ctx) @@ -155,7 +156,7 @@ func (k Keeper) Init( return nil, nil, err } // create address - accountAddr, err := k.makeAddress(num) + accountAddr, err := k.makeAddress(creator, num, addressSeed) if err != nil { return nil, nil, err } @@ -180,7 +181,7 @@ func (k Keeper) initFromMsg(ctx context.Context, initMsg *v1.MsgInit) (transacti } // run account creation logic - return k.Init(ctx, initMsg.AccountType, creator, msg, initMsg.Funds) + return k.Init(ctx, initMsg.AccountType, creator, msg, initMsg.Funds, initMsg.AddressSeed) } // init initializes the account, given the type, the creator the newly created account number, its address and the @@ -199,8 +200,17 @@ func (k Keeper) init( return nil, fmt.Errorf("%w: not found %s", errAccountTypeNotFound, accountType) } + // check if account exists + alreadyExists, err := k.AccountsByType.Has(ctx, accountAddr) + if err != nil { + return nil, err + } + if alreadyExists { + return nil, ErrAccountAlreadyExists + } + // send funds, if provided - err := k.maybeSendFunds(ctx, creator, accountAddr, funds) + err = k.maybeSendFunds(ctx, creator, accountAddr, funds) if err != nil { return nil, fmt.Errorf("unable to transfer funds: %w", err) } @@ -307,9 +317,26 @@ func (k Keeper) getImplementation(ctx context.Context, addr []byte) (implementat return impl, nil } -func (k Keeper) makeAddress(accNum uint64) ([]byte, error) { - // TODO: better address scheme, ref: https://github.com/cosmos/cosmos-sdk/issues/17516 - addr := sha256.Sum256(append([]byte("x/accounts"), binary.BigEndian.AppendUint64(nil, accNum)...)) +// makeAddress creates an address for the given account. +// It uses the creator address to ensure address squatting cannot happen, for example +// assuming creator sends funds to a new account X nobody can front-run that address instantiation +// unless the creator itself sends the tx. +// AddressSeed can be used to create predictable addresses, security guarantees of the above are retained. +// If address seed is not provided, the address is created using the creator and account number. +func (k Keeper) makeAddress(creator []byte, accNum uint64, addressSeed []byte) ([]byte, error) { + // in case an address seed is provided, we use it to create the address. + var seed []byte + if len(addressSeed) > 0 { + seed = append(creator, addressSeed...) + } else { + // otherwise we use the creator and account number to create the address. + seed = append(creator, binary.BigEndian.AppendUint64(nil, accNum)...) + } + + moduleAndSeed := append([]byte(ModuleName), seed...) + + addr := sha256.Sum256(moduleAndSeed) + return addr[:], nil } diff --git a/x/accounts/keeper_test.go b/x/accounts/keeper_test.go index b0532cd766c4..ba75abb37966 100644 --- a/x/accounts/keeper_test.go +++ b/x/accounts/keeper_test.go @@ -17,7 +17,7 @@ func TestKeeper_Init(t *testing.T) { t.Run("ok", func(t *testing.T) { sender := []byte("sender") - resp, addr, err := m.Init(ctx, "test", sender, &types.Empty{}, nil) + resp, addr, err := m.Init(ctx, "test", sender, &types.Empty{}, nil, nil) require.NoError(t, err) require.Equal(t, &types.Empty{}, resp) require.NotNil(t, addr) @@ -34,7 +34,7 @@ func TestKeeper_Init(t *testing.T) { }) t.Run("unknown account type", func(t *testing.T) { - _, _, err := m.Init(ctx, "unknown", []byte("sender"), &types.Empty{}, nil) + _, _, err := m.Init(ctx, "unknown", []byte("sender"), &types.Empty{}, nil, nil) require.ErrorIs(t, err, errAccountTypeNotFound) }) } @@ -44,7 +44,7 @@ func TestKeeper_Execute(t *testing.T) { // create account sender := []byte("sender") - _, accAddr, err := m.Init(ctx, "test", sender, &types.Empty{}, nil) + _, accAddr, err := m.Init(ctx, "test", sender, &types.Empty{}, nil, nil) require.NoError(t, err) t.Run("ok", func(t *testing.T) { @@ -70,7 +70,7 @@ func TestKeeper_Query(t *testing.T) { // create account sender := []byte("sender") - _, accAddr, err := m.Init(ctx, "test", sender, &types.Empty{}, nil) + _, accAddr, err := m.Init(ctx, "test", sender, &types.Empty{}, nil, nil) require.NoError(t, err) t.Run("ok", func(t *testing.T) { diff --git a/x/accounts/msg_server_test.go b/x/accounts/msg_server_test.go index 4a5c6fb87d2c..445bb7cb62cc 100644 --- a/x/accounts/msg_server_test.go +++ b/x/accounts/msg_server_test.go @@ -24,24 +24,46 @@ func TestMsgServer(t *testing.T) { Sender: "sender", AccountType: "test", Message: initMsg, + AddressSeed: []byte("seed"), }) require.NoError(t, err) require.NotNil(t, initResp) - // execute - executeMsg := &wrapperspb.StringValue{ - Value: "10", - } - executeMsgAny, err := implementation.PackAny(executeMsg) - require.NoError(t, err) + t.Run("success", func(t *testing.T) { + // execute + executeMsg := &wrapperspb.StringValue{ + Value: "10", + } + executeMsgAny, err := implementation.PackAny(executeMsg) + require.NoError(t, err) - execResp, err := s.Execute(ctx, &v1.MsgExecute{ - Sender: "sender", - Target: initResp.AccountAddress, - Message: executeMsgAny, + execResp, err := s.Execute(ctx, &v1.MsgExecute{ + Sender: "sender", + Target: initResp.AccountAddress, + Message: executeMsgAny, + }) + require.NoError(t, err) + require.NotNil(t, execResp) + }) + + t.Run("fail initting same account twice", func(t *testing.T) { + _, err := s.Init(ctx, &v1.MsgInit{ + Sender: "sender", + AccountType: "test", + Message: initMsg, + AddressSeed: []byte("seed"), + }) + require.ErrorIs(t, err, ErrAccountAlreadyExists) + }) + + t.Run("initting without seed", func(t *testing.T) { + _, err := s.Init(ctx, &v1.MsgInit{ + Sender: "sender", + AccountType: "test", + Message: initMsg, + }) + require.NoError(t, err) }) - require.NoError(t, err) - require.NotNil(t, execResp) } func TestMsgServer_BundlingDisabled(t *testing.T) { diff --git a/x/accounts/proto/cosmos/accounts/v1/tx.proto b/x/accounts/proto/cosmos/accounts/v1/tx.proto index f9f746cace11..33bb238a726a 100644 --- a/x/accounts/proto/cosmos/accounts/v1/tx.proto +++ b/x/accounts/proto/cosmos/accounts/v1/tx.proto @@ -39,6 +39,9 @@ message MsgInit { // send alongside the request. repeated cosmos.base.v1beta1.Coin funds = 4 [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false]; + // address_seed can be used to deterministically create the address of the account. + // If not present the address will be generated based on its associated account number. + bytes address_seed = 5; } // MsgInitResponse defines the Create response type for the Msg/Create RPC method. diff --git a/x/accounts/v1/tx.pb.go b/x/accounts/v1/tx.pb.go index 953167ab99a1..ea41a0d9c66c 100644 --- a/x/accounts/v1/tx.pb.go +++ b/x/accounts/v1/tx.pb.go @@ -44,6 +44,9 @@ type MsgInit struct { // funds contains the coins that the account wants to // send alongside the request. Funds github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=funds,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"funds"` + // address_seed can be used to deterministically create the address of the account. + // If not present the address will be generated based on its associated account number. + AddressSeed []byte `protobuf:"bytes,5,opt,name=address_seed,json=addressSeed,proto3" json:"address_seed,omitempty"` } func (m *MsgInit) Reset() { *m = MsgInit{} } @@ -107,6 +110,13 @@ func (m *MsgInit) GetFunds() github_com_cosmos_cosmos_sdk_types.Coins { return nil } +func (m *MsgInit) GetAddressSeed() []byte { + if m != nil { + return m.AddressSeed + } + return nil +} + // MsgInitResponse defines the Create response type for the Msg/Create RPC method. type MsgInitResponse struct { // account_address is the address of the newly created account. @@ -496,51 +506,52 @@ func init() { func init() { proto.RegisterFile("cosmos/accounts/v1/tx.proto", fileDescriptor_29c2b6d8a13d4189) } var fileDescriptor_29c2b6d8a13d4189 = []byte{ - // 690 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0xcb, 0x4e, 0xdb, 0x4c, - 0x14, 0x8e, 0x73, 0xfd, 0x39, 0xe1, 0x2f, 0x74, 0x4a, 0xc1, 0x18, 0xc9, 0xa4, 0xe9, 0x2d, 0x42, - 0xd4, 0x26, 0xb4, 0x6a, 0x25, 0x76, 0x80, 0xe8, 0x45, 0x2a, 0x12, 0x8d, 0xe8, 0xa6, 0x9b, 0xc8, - 0xb1, 0x07, 0x13, 0x41, 0x3c, 0x91, 0xcf, 0x18, 0x25, 0xbb, 0xaa, 0x0f, 0x50, 0xf5, 0x39, 0xba, - 0xe2, 0x31, 0x58, 0xb2, 0xec, 0xa2, 0xea, 0x05, 0x2a, 0xf1, 0x1a, 0x55, 0xc6, 0x33, 0x36, 0xe1, - 0x12, 0xb1, 0xec, 0x2a, 0x33, 0xf3, 0x9d, 0xf3, 0x9d, 0xf3, 0x7d, 0x27, 0x33, 0x86, 0x39, 0x97, - 0x61, 0x87, 0xa1, 0xed, 0xb8, 0x2e, 0x8b, 0x02, 0x8e, 0xf6, 0x41, 0xdd, 0xe6, 0x3d, 0xab, 0x1b, - 0x32, 0xce, 0x08, 0x89, 0x41, 0x4b, 0x81, 0xd6, 0x41, 0xdd, 0x98, 0xf5, 0x19, 0xf3, 0xf7, 0xa9, - 0x2d, 0x22, 0x5a, 0xd1, 0x8e, 0xed, 0x04, 0xfd, 0x38, 0xdc, 0x98, 0x91, 0x5c, 0x1d, 0xf4, 0x07, - 0x34, 0x1d, 0xf4, 0x25, 0x60, 0x4a, 0xa0, 0xe5, 0x20, 0xb5, 0x0f, 0xea, 0x2d, 0xca, 0x9d, 0xba, - 0xed, 0xb2, 0x76, 0x20, 0x71, 0x43, 0xe2, 0xbc, 0x97, 0xa0, 0xaa, 0x07, 0x63, 0xca, 0x67, 0x3e, - 0x13, 0x4b, 0x7b, 0xb0, 0x8a, 0x4f, 0xab, 0x7f, 0x34, 0x28, 0x6d, 0xa2, 0xff, 0x26, 0x68, 0x73, - 0x32, 0x0d, 0x45, 0xa4, 0x81, 0x47, 0x43, 0x5d, 0xab, 0x68, 0xb5, 0xb1, 0x86, 0xdc, 0x91, 0x7b, - 0x30, 0x2e, 0x1b, 0x6f, 0xf2, 0x7e, 0x97, 0xea, 0x59, 0x81, 0x96, 0xe5, 0xd9, 0x76, 0xbf, 0x4b, - 0x89, 0x05, 0xa5, 0x0e, 0x45, 0x74, 0x7c, 0xaa, 0xe7, 0x2a, 0x5a, 0xad, 0xbc, 0x3c, 0x65, 0xc5, - 0xf2, 0x2c, 0x25, 0xcf, 0x5a, 0x0d, 0xfa, 0x0d, 0x15, 0x44, 0x1c, 0x28, 0xec, 0x44, 0x81, 0x87, - 0x7a, 0xbe, 0x92, 0xab, 0x95, 0x97, 0x67, 0x2d, 0x69, 0xd0, 0x40, 0x98, 0x25, 0x5b, 0xb7, 0xd6, - 0x59, 0x3b, 0x58, 0x5b, 0x3a, 0xfa, 0x31, 0x9f, 0xf9, 0xfa, 0x73, 0xbe, 0xe6, 0xb7, 0xf9, 0x6e, - 0xd4, 0xb2, 0x5c, 0xd6, 0xb1, 0xa5, 0xca, 0xf8, 0xe7, 0x09, 0x7a, 0x7b, 0xf6, 0xa0, 0x2f, 0x14, - 0x09, 0xd8, 0x88, 0x99, 0x57, 0xca, 0x9f, 0xce, 0x0e, 0x17, 0xa4, 0x84, 0xea, 0x3e, 0x4c, 0x48, - 0x95, 0x0d, 0x8a, 0x5d, 0x16, 0x20, 0x25, 0x8f, 0x61, 0x42, 0xa9, 0x72, 0x3c, 0x2f, 0xa4, 0x88, - 0x52, 0xf6, 0x2d, 0x79, 0xbc, 0x1a, 0x9f, 0x92, 0x25, 0xf8, 0x2f, 0x94, 0x49, 0x42, 0xfa, 0x75, - 0xe2, 0x92, 0xa8, 0xea, 0x77, 0x0d, 0x60, 0x13, 0xfd, 0x8d, 0x1e, 0x75, 0x23, 0x4e, 0xaf, 0xf5, - 0x75, 0x1a, 0x8a, 0xdc, 0x09, 0x7d, 0xca, 0xa5, 0xa3, 0x72, 0xf7, 0xcf, 0x9b, 0xf9, 0x12, 0x48, - 0xaa, 0x2e, 0xf1, 0xf3, 0xbc, 0x4d, 0xda, 0x8d, 0x6c, 0x7a, 0x0b, 0x93, 0x29, 0xcf, 0x5a, 0x14, - 0x78, 0xfb, 0x94, 0xe8, 0x50, 0x6a, 0x89, 0x95, 0x32, 0x4b, 0x6d, 0xc9, 0x24, 0xe4, 0x78, 0x0f, - 0xf5, 0x6c, 0x25, 0x57, 0x1b, 0x6f, 0x0c, 0x96, 0x2b, 0xe3, 0x83, 0xa6, 0x14, 0x5e, 0xfd, 0x9d, - 0x85, 0xdb, 0x31, 0x89, 0xb7, 0xdd, 0x4b, 0xba, 0x7a, 0x0e, 0x33, 0x4e, 0xc4, 0x77, 0x69, 0xc0, - 0xdb, 0xae, 0xc3, 0xdb, 0x2c, 0x68, 0xfa, 0x0e, 0x36, 0x23, 0xa4, 0x9e, 0xe0, 0xcf, 0x37, 0xee, - 0x0e, 0xc3, 0xaf, 0x1c, 0x7c, 0x8f, 0xd4, 0x23, 0x2f, 0x40, 0x97, 0xc4, 0xcd, 0xae, 0xd3, 0xef, - 0xd0, 0x80, 0xa7, 0x89, 0xd9, 0x38, 0x51, 0xe2, 0x5b, 0x31, 0xac, 0x12, 0xb7, 0x60, 0xf6, 0x62, - 0xa2, 0x12, 0x8c, 0x7a, 0x4e, 0x0c, 0xe8, 0x6a, 0x5f, 0x66, 0x86, 0xf9, 0x94, 0x02, 0x24, 0x8b, - 0x40, 0xa8, 0xf0, 0x68, 0xa8, 0xfb, 0xbc, 0x68, 0x62, 0x32, 0x41, 0x54, 0xfd, 0x0d, 0xb8, 0x93, - 0x46, 0xa7, 0x95, 0x0b, 0x23, 0x2a, 0xa7, 0xf4, 0x69, 0xd1, 0x29, 0x28, 0xd0, 0x30, 0x64, 0xa1, - 0x5e, 0x14, 0x53, 0x88, 0x37, 0xd5, 0x26, 0xe8, 0x17, 0x27, 0x96, 0x38, 0xbd, 0x0e, 0x63, 0x69, - 0x39, 0x4d, 0x94, 0x7b, 0x68, 0x5d, 0x7e, 0xf7, 0xac, 0x4b, 0x33, 0x6a, 0xa4, 0x79, 0xcb, 0x9f, - 0xb3, 0x90, 0xdb, 0x44, 0x9f, 0xbc, 0x86, 0xbc, 0x78, 0x92, 0xe6, 0xae, 0x62, 0x90, 0x37, 0xd9, - 0xb8, 0x3f, 0x02, 0x4c, 0xda, 0x7a, 0x07, 0x25, 0x75, 0x0f, 0xcd, 0x6b, 0xe2, 0x25, 0x6e, 0x3c, - 0x1a, 0x8d, 0x27, 0x94, 0x2e, 0xfc, 0x3f, 0xfc, 0xa7, 0x7d, 0x30, 0x3a, 0x31, 0x8e, 0x32, 0x16, - 0x6f, 0x12, 0xa5, 0x8a, 0x18, 0x85, 0x8f, 0x67, 0x87, 0x0b, 0xda, 0xda, 0xb3, 0xa3, 0x13, 0x53, - 0x3b, 0x3e, 0x31, 0xb5, 0x5f, 0x27, 0xa6, 0xf6, 0xe5, 0xd4, 0xcc, 0x1c, 0x9f, 0x9a, 0x99, 0x6f, - 0xa7, 0x66, 0xe6, 0x83, 0x7c, 0xeb, 0xd1, 0xdb, 0xb3, 0xda, 0xcc, 0xee, 0x9d, 0xff, 0xf0, 0xb4, - 0x8a, 0x62, 0xbe, 0x4f, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x15, 0x7e, 0x1c, 0x2a, 0x95, 0x06, - 0x00, 0x00, + // 709 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0xcb, 0x4e, 0xdb, 0x40, + 0x14, 0x8d, 0xf3, 0x2c, 0x37, 0x69, 0xa1, 0x53, 0x0a, 0xc6, 0x48, 0x26, 0x4d, 0x5f, 0x11, 0xa2, + 0x36, 0xa1, 0x55, 0x2b, 0xb1, 0x03, 0x44, 0x1f, 0x52, 0x91, 0xa8, 0x4b, 0x37, 0xdd, 0x44, 0x8e, + 0x3d, 0x98, 0x08, 0xe2, 0x89, 0x7c, 0xc7, 0x28, 0xd9, 0x55, 0xdd, 0x74, 0x57, 0xf5, 0x3b, 0xba, + 0xe2, 0x33, 0x58, 0xb2, 0xec, 0xa2, 0xea, 0x03, 0x16, 0xfc, 0x46, 0x95, 0xf1, 0xd8, 0x26, 0x3c, + 0x22, 0x96, 0x5d, 0x65, 0x66, 0xce, 0xbd, 0xe7, 0x9e, 0x73, 0x26, 0xb6, 0x61, 0xd6, 0x61, 0xd8, + 0x61, 0x68, 0xda, 0x8e, 0xc3, 0x42, 0x9f, 0xa3, 0xb9, 0xdf, 0x30, 0x79, 0xcf, 0xe8, 0x06, 0x8c, + 0x33, 0x42, 0x22, 0xd0, 0x88, 0x41, 0x63, 0xbf, 0xa1, 0xcd, 0x78, 0x8c, 0x79, 0x7b, 0xd4, 0x14, + 0x15, 0xad, 0x70, 0xdb, 0xb4, 0xfd, 0x7e, 0x54, 0xae, 0x4d, 0x4b, 0xae, 0x0e, 0x7a, 0x03, 0x9a, + 0x0e, 0x7a, 0x12, 0xd0, 0x25, 0xd0, 0xb2, 0x91, 0x9a, 0xfb, 0x8d, 0x16, 0xe5, 0x76, 0xc3, 0x74, + 0x58, 0xdb, 0x97, 0xb8, 0x26, 0x71, 0xde, 0x4b, 0xd0, 0x58, 0x83, 0x36, 0xe9, 0x31, 0x8f, 0x89, + 0xa5, 0x39, 0x58, 0x45, 0xa7, 0xb5, 0x2f, 0x59, 0x28, 0x6d, 0xa0, 0xf7, 0xc6, 0x6f, 0x73, 0x32, + 0x05, 0x45, 0xa4, 0xbe, 0x4b, 0x03, 0x55, 0xa9, 0x2a, 0xf5, 0x31, 0x4b, 0xee, 0xc8, 0x3d, 0xa8, + 0x48, 0xe1, 0x4d, 0xde, 0xef, 0x52, 0x35, 0x2b, 0xd0, 0xb2, 0x3c, 0xdb, 0xea, 0x77, 0x29, 0x31, + 0xa0, 0xd4, 0xa1, 0x88, 0xb6, 0x47, 0xd5, 0x5c, 0x55, 0xa9, 0x97, 0x97, 0x26, 0x8d, 0xc8, 0x9e, + 0x11, 0xdb, 0x33, 0x56, 0xfc, 0xbe, 0x15, 0x17, 0x11, 0x1b, 0x0a, 0xdb, 0xa1, 0xef, 0xa2, 0x9a, + 0xaf, 0xe6, 0xea, 0xe5, 0xa5, 0x19, 0x43, 0x06, 0x34, 0x30, 0x66, 0x48, 0xe9, 0xc6, 0x1a, 0x6b, + 0xfb, 0xab, 0x8b, 0x87, 0xbf, 0xe6, 0x32, 0xdf, 0x7f, 0xcf, 0xd5, 0xbd, 0x36, 0xdf, 0x09, 0x5b, + 0x86, 0xc3, 0x3a, 0xa6, 0x74, 0x19, 0xfd, 0x3c, 0x41, 0x77, 0xd7, 0x1c, 0xe8, 0x42, 0xd1, 0x80, + 0x56, 0xc4, 0x2c, 0x54, 0xbb, 0x6e, 0x40, 0x11, 0x9b, 0x48, 0xa9, 0xab, 0x16, 0xaa, 0x4a, 0xbd, + 0x62, 0x95, 0xe5, 0xd9, 0x7b, 0x4a, 0xdd, 0xe5, 0xf2, 0xe7, 0xd3, 0x83, 0x79, 0xe9, 0xb2, 0xb6, + 0x07, 0xe3, 0x32, 0x08, 0x8b, 0x62, 0x97, 0xf9, 0x48, 0xc9, 0x63, 0x18, 0x8f, 0x8d, 0xcb, 0x36, + 0x99, 0xcc, 0x2d, 0x79, 0xbc, 0x12, 0x9d, 0x92, 0x45, 0xb8, 0x11, 0xc8, 0x26, 0x91, 0xce, 0x55, + 0xfe, 0x93, 0xaa, 0xda, 0x4f, 0x05, 0x60, 0x03, 0xbd, 0xf5, 0x1e, 0x75, 0x42, 0x4e, 0xaf, 0x8c, + 0x7e, 0x0a, 0x8a, 0xdc, 0x0e, 0x3c, 0xca, 0x65, 0xe8, 0x72, 0xf7, 0x1f, 0xe6, 0x3d, 0x1c, 0xe6, + 0x4b, 0x20, 0xa9, 0xbb, 0x24, 0xcf, 0xb3, 0x31, 0x29, 0xd7, 0x8a, 0xe9, 0x2d, 0x4c, 0xa4, 0x3c, + 0xab, 0xa1, 0xef, 0xee, 0x51, 0xa2, 0x42, 0xa9, 0x25, 0x56, 0x71, 0x58, 0xf1, 0x96, 0x4c, 0x40, + 0x8e, 0xf7, 0x50, 0xcd, 0x56, 0x73, 0xf5, 0x8a, 0x35, 0x58, 0x2e, 0x57, 0x06, 0xa2, 0x62, 0xbc, + 0xf6, 0x37, 0x0b, 0xb7, 0x23, 0x12, 0x77, 0xab, 0x97, 0xa8, 0x7a, 0x0e, 0xd3, 0x76, 0xc8, 0x77, + 0xa8, 0xcf, 0xdb, 0x8e, 0xcd, 0xdb, 0xcc, 0x6f, 0x7a, 0x36, 0x36, 0x43, 0xa4, 0xae, 0xe0, 0xcf, + 0x5b, 0x77, 0x87, 0xe1, 0x57, 0x36, 0x7e, 0x40, 0xea, 0x92, 0x17, 0xa0, 0x4a, 0xe2, 0x66, 0xd7, + 0xee, 0x77, 0xa8, 0xcf, 0xd3, 0xc6, 0x6c, 0xd4, 0x28, 0xf1, 0xcd, 0x08, 0x8e, 0x1b, 0x37, 0x61, + 0xe6, 0x7c, 0x63, 0x6c, 0x18, 0xd5, 0x9c, 0xb8, 0xa0, 0xcb, 0x73, 0x99, 0x1e, 0xe6, 0x8b, 0x1d, + 0x20, 0x59, 0x00, 0x42, 0x45, 0x46, 0x43, 0xea, 0xf3, 0x42, 0xc4, 0x44, 0x82, 0xc4, 0xf3, 0xd7, + 0xe1, 0x4e, 0x5a, 0x9d, 0x4e, 0x2e, 0x8c, 0x98, 0x9c, 0xd2, 0xa7, 0x43, 0x27, 0xa1, 0x40, 0x83, + 0x80, 0x05, 0x6a, 0x51, 0xdc, 0x42, 0xb4, 0xa9, 0x35, 0x41, 0x3d, 0x7f, 0x63, 0x49, 0xd2, 0x6b, + 0x30, 0x96, 0x8e, 0x53, 0xc4, 0xb8, 0x87, 0xc6, 0xc5, 0x57, 0xa3, 0x71, 0xe1, 0x8e, 0xac, 0xb4, + 0x6f, 0xe9, 0x6b, 0x16, 0x72, 0x1b, 0xe8, 0x91, 0xd7, 0x90, 0x17, 0x6f, 0xad, 0xd9, 0xcb, 0x18, + 0xe4, 0x93, 0xac, 0xdd, 0x1f, 0x01, 0x26, 0xb2, 0xde, 0x41, 0x29, 0x7e, 0x0e, 0xf5, 0x2b, 0xea, + 0x25, 0xae, 0x3d, 0x1a, 0x8d, 0x27, 0x94, 0x0e, 0xdc, 0x1c, 0xfe, 0xd3, 0x3e, 0x18, 0xdd, 0x18, + 0x55, 0x69, 0x0b, 0xd7, 0xa9, 0x8a, 0x87, 0x68, 0x85, 0x4f, 0xa7, 0x07, 0xf3, 0xca, 0xea, 0xb3, + 0xc3, 0x63, 0x5d, 0x39, 0x3a, 0xd6, 0x95, 0x3f, 0xc7, 0xba, 0xf2, 0xed, 0x44, 0xcf, 0x1c, 0x9d, + 0xe8, 0x99, 0x1f, 0x27, 0x7a, 0xe6, 0xa3, 0xfc, 0x1c, 0xa0, 0xbb, 0x6b, 0xb4, 0x99, 0xd9, 0x3b, + 0xfb, 0x6d, 0x6a, 0x15, 0xc5, 0xfd, 0x3e, 0xfd, 0x17, 0x00, 0x00, 0xff, 0xff, 0x53, 0x6a, 0x24, + 0xdc, 0xb8, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -724,6 +735,13 @@ func (m *MsgInit) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.AddressSeed) > 0 { + i -= len(m.AddressSeed) + copy(dAtA[i:], m.AddressSeed) + i = encodeVarintTx(dAtA, i, uint64(len(m.AddressSeed))) + i-- + dAtA[i] = 0x2a + } if len(m.Funds) > 0 { for iNdEx := len(m.Funds) - 1; iNdEx >= 0; iNdEx-- { { @@ -1091,6 +1109,10 @@ func (m *MsgInit) Size() (n int) { n += 1 + l + sovTx(uint64(l)) } } + l = len(m.AddressSeed) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -1388,6 +1410,40 @@ func (m *MsgInit) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AddressSeed", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AddressSeed = append(m.AddressSeed[:0], dAtA[iNdEx:postIndex]...) + if m.AddressSeed == nil { + m.AddressSeed = []byte{} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) From 169aa00371ea59c94eb5621195279e8a8786a020 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Mon, 9 Dec 2024 16:38:12 +0100 Subject: [PATCH 2/2] conflicts --- api/cosmos/accounts/v1/tx.pulsar.go | 4987 ----------------- .../auth/accounts_retro_compatibility_test.go | 185 - 2 files changed, 5172 deletions(-) delete mode 100644 api/cosmos/accounts/v1/tx.pulsar.go delete mode 100644 tests/integration/v2/auth/accounts_retro_compatibility_test.go diff --git a/api/cosmos/accounts/v1/tx.pulsar.go b/api/cosmos/accounts/v1/tx.pulsar.go deleted file mode 100644 index d019140612e6..000000000000 --- a/api/cosmos/accounts/v1/tx.pulsar.go +++ /dev/null @@ -1,4987 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package accountsv1 - -import ( - v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" - _ "cosmossdk.io/api/cosmos/msg/v1" - _ "cosmossdk.io/api/cosmos/tx/v1beta1" - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_MsgInit_4_list)(nil) - -type _MsgInit_4_list struct { - list *[]*v1beta1.Coin -} - -func (x *_MsgInit_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgInit_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgInit_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_MsgInit_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgInit_4_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgInit_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgInit_4_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgInit_4_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgInit protoreflect.MessageDescriptor - fd_MsgInit_sender protoreflect.FieldDescriptor - fd_MsgInit_account_type protoreflect.FieldDescriptor - fd_MsgInit_message protoreflect.FieldDescriptor - fd_MsgInit_funds protoreflect.FieldDescriptor - fd_MsgInit_address_seed protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_accounts_v1_tx_proto_init() - md_MsgInit = File_cosmos_accounts_v1_tx_proto.Messages().ByName("MsgInit") - fd_MsgInit_sender = md_MsgInit.Fields().ByName("sender") - fd_MsgInit_account_type = md_MsgInit.Fields().ByName("account_type") - fd_MsgInit_message = md_MsgInit.Fields().ByName("message") - fd_MsgInit_funds = md_MsgInit.Fields().ByName("funds") - fd_MsgInit_address_seed = md_MsgInit.Fields().ByName("address_seed") -} - -var _ protoreflect.Message = (*fastReflection_MsgInit)(nil) - -type fastReflection_MsgInit MsgInit - -func (x *MsgInit) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgInit)(x) -} - -func (x *MsgInit) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[0] - 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_MsgInit_messageType fastReflection_MsgInit_messageType -var _ protoreflect.MessageType = fastReflection_MsgInit_messageType{} - -type fastReflection_MsgInit_messageType struct{} - -func (x fastReflection_MsgInit_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgInit)(nil) -} -func (x fastReflection_MsgInit_messageType) New() protoreflect.Message { - return new(fastReflection_MsgInit) -} -func (x fastReflection_MsgInit_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgInit -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgInit) Descriptor() protoreflect.MessageDescriptor { - return md_MsgInit -} - -// 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_MsgInit) Type() protoreflect.MessageType { - return _fastReflection_MsgInit_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgInit) New() protoreflect.Message { - return new(fastReflection_MsgInit) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgInit) Interface() protoreflect.ProtoMessage { - return (*MsgInit)(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_MsgInit) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Sender != "" { - value := protoreflect.ValueOfString(x.Sender) - if !f(fd_MsgInit_sender, value) { - return - } - } - if x.AccountType != "" { - value := protoreflect.ValueOfString(x.AccountType) - if !f(fd_MsgInit_account_type, value) { - return - } - } - if x.Message != nil { - value := protoreflect.ValueOfMessage(x.Message.ProtoReflect()) - if !f(fd_MsgInit_message, value) { - return - } - } - if len(x.Funds) != 0 { - value := protoreflect.ValueOfList(&_MsgInit_4_list{list: &x.Funds}) - if !f(fd_MsgInit_funds, value) { - return - } - } - if len(x.AddressSeed) != 0 { - value := protoreflect.ValueOfBytes(x.AddressSeed) - if !f(fd_MsgInit_address_seed, 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_MsgInit) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgInit.sender": - return x.Sender != "" - case "cosmos.accounts.v1.MsgInit.account_type": - return x.AccountType != "" - case "cosmos.accounts.v1.MsgInit.message": - return x.Message != nil - case "cosmos.accounts.v1.MsgInit.funds": - return len(x.Funds) != 0 - case "cosmos.accounts.v1.MsgInit.address_seed": - return len(x.AddressSeed) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgInit")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgInit 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_MsgInit) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgInit.sender": - x.Sender = "" - case "cosmos.accounts.v1.MsgInit.account_type": - x.AccountType = "" - case "cosmos.accounts.v1.MsgInit.message": - x.Message = nil - case "cosmos.accounts.v1.MsgInit.funds": - x.Funds = nil - case "cosmos.accounts.v1.MsgInit.address_seed": - x.AddressSeed = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgInit")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgInit 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_MsgInit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.accounts.v1.MsgInit.sender": - value := x.Sender - return protoreflect.ValueOfString(value) - case "cosmos.accounts.v1.MsgInit.account_type": - value := x.AccountType - return protoreflect.ValueOfString(value) - case "cosmos.accounts.v1.MsgInit.message": - value := x.Message - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.accounts.v1.MsgInit.funds": - if len(x.Funds) == 0 { - return protoreflect.ValueOfList(&_MsgInit_4_list{}) - } - listValue := &_MsgInit_4_list{list: &x.Funds} - return protoreflect.ValueOfList(listValue) - case "cosmos.accounts.v1.MsgInit.address_seed": - value := x.AddressSeed - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgInit")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgInit 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_MsgInit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgInit.sender": - x.Sender = value.Interface().(string) - case "cosmos.accounts.v1.MsgInit.account_type": - x.AccountType = value.Interface().(string) - case "cosmos.accounts.v1.MsgInit.message": - x.Message = value.Message().Interface().(*anypb.Any) - case "cosmos.accounts.v1.MsgInit.funds": - lv := value.List() - clv := lv.(*_MsgInit_4_list) - x.Funds = *clv.list - case "cosmos.accounts.v1.MsgInit.address_seed": - x.AddressSeed = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgInit")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgInit 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_MsgInit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgInit.message": - if x.Message == nil { - x.Message = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Message.ProtoReflect()) - case "cosmos.accounts.v1.MsgInit.funds": - if x.Funds == nil { - x.Funds = []*v1beta1.Coin{} - } - value := &_MsgInit_4_list{list: &x.Funds} - return protoreflect.ValueOfList(value) - case "cosmos.accounts.v1.MsgInit.sender": - panic(fmt.Errorf("field sender of message cosmos.accounts.v1.MsgInit is not mutable")) - case "cosmos.accounts.v1.MsgInit.account_type": - panic(fmt.Errorf("field account_type of message cosmos.accounts.v1.MsgInit is not mutable")) - case "cosmos.accounts.v1.MsgInit.address_seed": - panic(fmt.Errorf("field address_seed of message cosmos.accounts.v1.MsgInit is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgInit")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgInit 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_MsgInit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgInit.sender": - return protoreflect.ValueOfString("") - case "cosmos.accounts.v1.MsgInit.account_type": - return protoreflect.ValueOfString("") - case "cosmos.accounts.v1.MsgInit.message": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.accounts.v1.MsgInit.funds": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_MsgInit_4_list{list: &list}) - case "cosmos.accounts.v1.MsgInit.address_seed": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgInit")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgInit 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_MsgInit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.v1.MsgInit", 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_MsgInit) 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_MsgInit) 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_MsgInit) 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_MsgInit) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgInit) - 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.Sender) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.AccountType) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Message != nil { - l = options.Size(x.Message) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Funds) > 0 { - for _, e := range x.Funds { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.AddressSeed) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgInit) - 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.AddressSeed) > 0 { - i -= len(x.AddressSeed) - copy(dAtA[i:], x.AddressSeed) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AddressSeed))) - i-- - dAtA[i] = 0x2a - } - if len(x.Funds) > 0 { - for iNdEx := len(x.Funds) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Funds[iNdEx]) - 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] = 0x22 - } - } - if x.Message != nil { - encoded, err := options.Marshal(x.Message) - 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] = 0x1a - } - if len(x.AccountType) > 0 { - i -= len(x.AccountType) - copy(dAtA[i:], x.AccountType) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AccountType))) - i-- - dAtA[i] = 0x12 - } - if len(x.Sender) > 0 { - i -= len(x.Sender) - copy(dAtA[i:], x.Sender) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) - 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().(*MsgInit) - 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: MsgInit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInit: 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 Sender", 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.Sender = 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 AccountType", 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.AccountType = 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 Message", 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.Message == nil { - x.Message = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Message); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Funds", 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 - } - x.Funds = append(x.Funds, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Funds[len(x.Funds)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AddressSeed", wireType) - } - var byteLen 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++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - 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.AddressSeed = append(x.AddressSeed[:0], dAtA[iNdEx:postIndex]...) - if x.AddressSeed == nil { - x.AddressSeed = []byte{} - } - 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_MsgInitResponse protoreflect.MessageDescriptor - fd_MsgInitResponse_account_address protoreflect.FieldDescriptor - fd_MsgInitResponse_response protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_accounts_v1_tx_proto_init() - md_MsgInitResponse = File_cosmos_accounts_v1_tx_proto.Messages().ByName("MsgInitResponse") - fd_MsgInitResponse_account_address = md_MsgInitResponse.Fields().ByName("account_address") - fd_MsgInitResponse_response = md_MsgInitResponse.Fields().ByName("response") -} - -var _ protoreflect.Message = (*fastReflection_MsgInitResponse)(nil) - -type fastReflection_MsgInitResponse MsgInitResponse - -func (x *MsgInitResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgInitResponse)(x) -} - -func (x *MsgInitResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[1] - 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_MsgInitResponse_messageType fastReflection_MsgInitResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgInitResponse_messageType{} - -type fastReflection_MsgInitResponse_messageType struct{} - -func (x fastReflection_MsgInitResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgInitResponse)(nil) -} -func (x fastReflection_MsgInitResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgInitResponse) -} -func (x fastReflection_MsgInitResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgInitResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgInitResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgInitResponse -} - -// 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_MsgInitResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgInitResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgInitResponse) New() protoreflect.Message { - return new(fastReflection_MsgInitResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgInitResponse) Interface() protoreflect.ProtoMessage { - return (*MsgInitResponse)(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_MsgInitResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.AccountAddress != "" { - value := protoreflect.ValueOfString(x.AccountAddress) - if !f(fd_MsgInitResponse_account_address, value) { - return - } - } - if x.Response != nil { - value := protoreflect.ValueOfMessage(x.Response.ProtoReflect()) - if !f(fd_MsgInitResponse_response, 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_MsgInitResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgInitResponse.account_address": - return x.AccountAddress != "" - case "cosmos.accounts.v1.MsgInitResponse.response": - return x.Response != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgInitResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgInitResponse 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_MsgInitResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgInitResponse.account_address": - x.AccountAddress = "" - case "cosmos.accounts.v1.MsgInitResponse.response": - x.Response = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgInitResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgInitResponse 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_MsgInitResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.accounts.v1.MsgInitResponse.account_address": - value := x.AccountAddress - return protoreflect.ValueOfString(value) - case "cosmos.accounts.v1.MsgInitResponse.response": - value := x.Response - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgInitResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgInitResponse 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_MsgInitResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgInitResponse.account_address": - x.AccountAddress = value.Interface().(string) - case "cosmos.accounts.v1.MsgInitResponse.response": - x.Response = value.Message().Interface().(*anypb.Any) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgInitResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgInitResponse 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_MsgInitResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgInitResponse.response": - if x.Response == nil { - x.Response = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Response.ProtoReflect()) - case "cosmos.accounts.v1.MsgInitResponse.account_address": - panic(fmt.Errorf("field account_address of message cosmos.accounts.v1.MsgInitResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgInitResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgInitResponse 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_MsgInitResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgInitResponse.account_address": - return protoreflect.ValueOfString("") - case "cosmos.accounts.v1.MsgInitResponse.response": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgInitResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgInitResponse 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_MsgInitResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.v1.MsgInitResponse", 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_MsgInitResponse) 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_MsgInitResponse) 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_MsgInitResponse) 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_MsgInitResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgInitResponse) - 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.AccountAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Response != nil { - l = options.Size(x.Response) - 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().(*MsgInitResponse) - 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.Response != nil { - encoded, err := options.Marshal(x.Response) - 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.AccountAddress) > 0 { - i -= len(x.AccountAddress) - copy(dAtA[i:], x.AccountAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AccountAddress))) - 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().(*MsgInitResponse) - 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: MsgInitResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitResponse: 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 AccountAddress", 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.AccountAddress = 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 Response", 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.Response == nil { - x.Response = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Response); 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 _ protoreflect.List = (*_MsgExecute_4_list)(nil) - -type _MsgExecute_4_list struct { - list *[]*v1beta1.Coin -} - -func (x *_MsgExecute_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgExecute_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgExecute_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_MsgExecute_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgExecute_4_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgExecute_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgExecute_4_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgExecute_4_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgExecute protoreflect.MessageDescriptor - fd_MsgExecute_sender protoreflect.FieldDescriptor - fd_MsgExecute_target protoreflect.FieldDescriptor - fd_MsgExecute_message protoreflect.FieldDescriptor - fd_MsgExecute_funds protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_accounts_v1_tx_proto_init() - md_MsgExecute = File_cosmos_accounts_v1_tx_proto.Messages().ByName("MsgExecute") - fd_MsgExecute_sender = md_MsgExecute.Fields().ByName("sender") - fd_MsgExecute_target = md_MsgExecute.Fields().ByName("target") - fd_MsgExecute_message = md_MsgExecute.Fields().ByName("message") - fd_MsgExecute_funds = md_MsgExecute.Fields().ByName("funds") -} - -var _ protoreflect.Message = (*fastReflection_MsgExecute)(nil) - -type fastReflection_MsgExecute MsgExecute - -func (x *MsgExecute) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgExecute)(x) -} - -func (x *MsgExecute) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[2] - 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_MsgExecute_messageType fastReflection_MsgExecute_messageType -var _ protoreflect.MessageType = fastReflection_MsgExecute_messageType{} - -type fastReflection_MsgExecute_messageType struct{} - -func (x fastReflection_MsgExecute_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgExecute)(nil) -} -func (x fastReflection_MsgExecute_messageType) New() protoreflect.Message { - return new(fastReflection_MsgExecute) -} -func (x fastReflection_MsgExecute_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExecute -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgExecute) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExecute -} - -// 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_MsgExecute) Type() protoreflect.MessageType { - return _fastReflection_MsgExecute_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgExecute) New() protoreflect.Message { - return new(fastReflection_MsgExecute) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgExecute) Interface() protoreflect.ProtoMessage { - return (*MsgExecute)(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_MsgExecute) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Sender != "" { - value := protoreflect.ValueOfString(x.Sender) - if !f(fd_MsgExecute_sender, value) { - return - } - } - if x.Target != "" { - value := protoreflect.ValueOfString(x.Target) - if !f(fd_MsgExecute_target, value) { - return - } - } - if x.Message != nil { - value := protoreflect.ValueOfMessage(x.Message.ProtoReflect()) - if !f(fd_MsgExecute_message, value) { - return - } - } - if len(x.Funds) != 0 { - value := protoreflect.ValueOfList(&_MsgExecute_4_list{list: &x.Funds}) - if !f(fd_MsgExecute_funds, 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_MsgExecute) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgExecute.sender": - return x.Sender != "" - case "cosmos.accounts.v1.MsgExecute.target": - return x.Target != "" - case "cosmos.accounts.v1.MsgExecute.message": - return x.Message != nil - case "cosmos.accounts.v1.MsgExecute.funds": - return len(x.Funds) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecute")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecute 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_MsgExecute) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgExecute.sender": - x.Sender = "" - case "cosmos.accounts.v1.MsgExecute.target": - x.Target = "" - case "cosmos.accounts.v1.MsgExecute.message": - x.Message = nil - case "cosmos.accounts.v1.MsgExecute.funds": - x.Funds = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecute")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecute 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_MsgExecute) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.accounts.v1.MsgExecute.sender": - value := x.Sender - return protoreflect.ValueOfString(value) - case "cosmos.accounts.v1.MsgExecute.target": - value := x.Target - return protoreflect.ValueOfString(value) - case "cosmos.accounts.v1.MsgExecute.message": - value := x.Message - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.accounts.v1.MsgExecute.funds": - if len(x.Funds) == 0 { - return protoreflect.ValueOfList(&_MsgExecute_4_list{}) - } - listValue := &_MsgExecute_4_list{list: &x.Funds} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecute")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecute 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_MsgExecute) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgExecute.sender": - x.Sender = value.Interface().(string) - case "cosmos.accounts.v1.MsgExecute.target": - x.Target = value.Interface().(string) - case "cosmos.accounts.v1.MsgExecute.message": - x.Message = value.Message().Interface().(*anypb.Any) - case "cosmos.accounts.v1.MsgExecute.funds": - lv := value.List() - clv := lv.(*_MsgExecute_4_list) - x.Funds = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecute")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecute 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_MsgExecute) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgExecute.message": - if x.Message == nil { - x.Message = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Message.ProtoReflect()) - case "cosmos.accounts.v1.MsgExecute.funds": - if x.Funds == nil { - x.Funds = []*v1beta1.Coin{} - } - value := &_MsgExecute_4_list{list: &x.Funds} - return protoreflect.ValueOfList(value) - case "cosmos.accounts.v1.MsgExecute.sender": - panic(fmt.Errorf("field sender of message cosmos.accounts.v1.MsgExecute is not mutable")) - case "cosmos.accounts.v1.MsgExecute.target": - panic(fmt.Errorf("field target of message cosmos.accounts.v1.MsgExecute is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecute")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecute 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_MsgExecute) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgExecute.sender": - return protoreflect.ValueOfString("") - case "cosmos.accounts.v1.MsgExecute.target": - return protoreflect.ValueOfString("") - case "cosmos.accounts.v1.MsgExecute.message": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.accounts.v1.MsgExecute.funds": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_MsgExecute_4_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecute")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecute 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_MsgExecute) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.v1.MsgExecute", 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_MsgExecute) 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_MsgExecute) 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_MsgExecute) 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_MsgExecute) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgExecute) - 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.Sender) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Target) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Message != nil { - l = options.Size(x.Message) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Funds) > 0 { - for _, e := range x.Funds { - l = options.Size(e) - 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().(*MsgExecute) - 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.Funds) > 0 { - for iNdEx := len(x.Funds) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Funds[iNdEx]) - 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] = 0x22 - } - } - if x.Message != nil { - encoded, err := options.Marshal(x.Message) - 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] = 0x1a - } - if len(x.Target) > 0 { - i -= len(x.Target) - copy(dAtA[i:], x.Target) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Target))) - i-- - dAtA[i] = 0x12 - } - if len(x.Sender) > 0 { - i -= len(x.Sender) - copy(dAtA[i:], x.Sender) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) - 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().(*MsgExecute) - 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: MsgExecute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecute: 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 Sender", 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.Sender = 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 Target", 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.Target = 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 Message", 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.Message == nil { - x.Message = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Message); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Funds", 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 - } - x.Funds = append(x.Funds, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Funds[len(x.Funds)-1]); 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_MsgExecuteResponse protoreflect.MessageDescriptor - fd_MsgExecuteResponse_response protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_accounts_v1_tx_proto_init() - md_MsgExecuteResponse = File_cosmos_accounts_v1_tx_proto.Messages().ByName("MsgExecuteResponse") - fd_MsgExecuteResponse_response = md_MsgExecuteResponse.Fields().ByName("response") -} - -var _ protoreflect.Message = (*fastReflection_MsgExecuteResponse)(nil) - -type fastReflection_MsgExecuteResponse MsgExecuteResponse - -func (x *MsgExecuteResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgExecuteResponse)(x) -} - -func (x *MsgExecuteResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[3] - 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_MsgExecuteResponse_messageType fastReflection_MsgExecuteResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgExecuteResponse_messageType{} - -type fastReflection_MsgExecuteResponse_messageType struct{} - -func (x fastReflection_MsgExecuteResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgExecuteResponse)(nil) -} -func (x fastReflection_MsgExecuteResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgExecuteResponse) -} -func (x fastReflection_MsgExecuteResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExecuteResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgExecuteResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExecuteResponse -} - -// 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_MsgExecuteResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgExecuteResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgExecuteResponse) New() protoreflect.Message { - return new(fastReflection_MsgExecuteResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgExecuteResponse) Interface() protoreflect.ProtoMessage { - return (*MsgExecuteResponse)(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_MsgExecuteResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Response != nil { - value := protoreflect.ValueOfMessage(x.Response.ProtoReflect()) - if !f(fd_MsgExecuteResponse_response, 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_MsgExecuteResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgExecuteResponse.response": - return x.Response != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteResponse 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_MsgExecuteResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgExecuteResponse.response": - x.Response = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteResponse 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_MsgExecuteResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.accounts.v1.MsgExecuteResponse.response": - value := x.Response - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteResponse 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_MsgExecuteResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgExecuteResponse.response": - x.Response = value.Message().Interface().(*anypb.Any) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteResponse 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_MsgExecuteResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgExecuteResponse.response": - if x.Response == nil { - x.Response = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Response.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteResponse 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_MsgExecuteResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgExecuteResponse.response": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteResponse 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_MsgExecuteResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.v1.MsgExecuteResponse", 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_MsgExecuteResponse) 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_MsgExecuteResponse) 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_MsgExecuteResponse) 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_MsgExecuteResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgExecuteResponse) - 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.Response != nil { - l = options.Size(x.Response) - 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().(*MsgExecuteResponse) - 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.Response != nil { - encoded, err := options.Marshal(x.Response) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgExecuteResponse) - 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: MsgExecuteResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecuteResponse: 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 Response", 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.Response == nil { - x.Response = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Response); 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 _ protoreflect.List = (*_MsgExecuteBundle_2_list)(nil) - -type _MsgExecuteBundle_2_list struct { - list *[][]byte -} - -func (x *_MsgExecuteBundle_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgExecuteBundle_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBytes((*x.list)[i]) -} - -func (x *_MsgExecuteBundle_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_MsgExecuteBundle_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgExecuteBundle_2_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message MsgExecuteBundle at list field Txs as it is not of Message kind")) -} - -func (x *_MsgExecuteBundle_2_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_MsgExecuteBundle_2_list) NewElement() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) -} - -func (x *_MsgExecuteBundle_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgExecuteBundle protoreflect.MessageDescriptor - fd_MsgExecuteBundle_bundler protoreflect.FieldDescriptor - fd_MsgExecuteBundle_txs protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_accounts_v1_tx_proto_init() - md_MsgExecuteBundle = File_cosmos_accounts_v1_tx_proto.Messages().ByName("MsgExecuteBundle") - fd_MsgExecuteBundle_bundler = md_MsgExecuteBundle.Fields().ByName("bundler") - fd_MsgExecuteBundle_txs = md_MsgExecuteBundle.Fields().ByName("txs") -} - -var _ protoreflect.Message = (*fastReflection_MsgExecuteBundle)(nil) - -type fastReflection_MsgExecuteBundle MsgExecuteBundle - -func (x *MsgExecuteBundle) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgExecuteBundle)(x) -} - -func (x *MsgExecuteBundle) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[4] - 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_MsgExecuteBundle_messageType fastReflection_MsgExecuteBundle_messageType -var _ protoreflect.MessageType = fastReflection_MsgExecuteBundle_messageType{} - -type fastReflection_MsgExecuteBundle_messageType struct{} - -func (x fastReflection_MsgExecuteBundle_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgExecuteBundle)(nil) -} -func (x fastReflection_MsgExecuteBundle_messageType) New() protoreflect.Message { - return new(fastReflection_MsgExecuteBundle) -} -func (x fastReflection_MsgExecuteBundle_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExecuteBundle -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgExecuteBundle) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExecuteBundle -} - -// 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_MsgExecuteBundle) Type() protoreflect.MessageType { - return _fastReflection_MsgExecuteBundle_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgExecuteBundle) New() protoreflect.Message { - return new(fastReflection_MsgExecuteBundle) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgExecuteBundle) Interface() protoreflect.ProtoMessage { - return (*MsgExecuteBundle)(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_MsgExecuteBundle) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Bundler != "" { - value := protoreflect.ValueOfString(x.Bundler) - if !f(fd_MsgExecuteBundle_bundler, value) { - return - } - } - if len(x.Txs) != 0 { - value := protoreflect.ValueOfList(&_MsgExecuteBundle_2_list{list: &x.Txs}) - if !f(fd_MsgExecuteBundle_txs, 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_MsgExecuteBundle) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgExecuteBundle.bundler": - return x.Bundler != "" - case "cosmos.accounts.v1.MsgExecuteBundle.txs": - return len(x.Txs) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundle")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteBundle 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_MsgExecuteBundle) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgExecuteBundle.bundler": - x.Bundler = "" - case "cosmos.accounts.v1.MsgExecuteBundle.txs": - x.Txs = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundle")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteBundle 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_MsgExecuteBundle) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.accounts.v1.MsgExecuteBundle.bundler": - value := x.Bundler - return protoreflect.ValueOfString(value) - case "cosmos.accounts.v1.MsgExecuteBundle.txs": - if len(x.Txs) == 0 { - return protoreflect.ValueOfList(&_MsgExecuteBundle_2_list{}) - } - listValue := &_MsgExecuteBundle_2_list{list: &x.Txs} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundle")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteBundle 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_MsgExecuteBundle) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgExecuteBundle.bundler": - x.Bundler = value.Interface().(string) - case "cosmos.accounts.v1.MsgExecuteBundle.txs": - lv := value.List() - clv := lv.(*_MsgExecuteBundle_2_list) - x.Txs = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundle")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteBundle 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_MsgExecuteBundle) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgExecuteBundle.txs": - if x.Txs == nil { - x.Txs = [][]byte{} - } - value := &_MsgExecuteBundle_2_list{list: &x.Txs} - return protoreflect.ValueOfList(value) - case "cosmos.accounts.v1.MsgExecuteBundle.bundler": - panic(fmt.Errorf("field bundler of message cosmos.accounts.v1.MsgExecuteBundle is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundle")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteBundle 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_MsgExecuteBundle) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgExecuteBundle.bundler": - return protoreflect.ValueOfString("") - case "cosmos.accounts.v1.MsgExecuteBundle.txs": - list := [][]byte{} - return protoreflect.ValueOfList(&_MsgExecuteBundle_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundle")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteBundle 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_MsgExecuteBundle) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.v1.MsgExecuteBundle", 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_MsgExecuteBundle) 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_MsgExecuteBundle) 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_MsgExecuteBundle) 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_MsgExecuteBundle) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgExecuteBundle) - 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.Bundler) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Txs) > 0 { - for _, b := range x.Txs { - l = len(b) - 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().(*MsgExecuteBundle) - 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.Txs) > 0 { - for iNdEx := len(x.Txs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Txs[iNdEx]) - copy(dAtA[i:], x.Txs[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Txs[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Bundler) > 0 { - i -= len(x.Bundler) - copy(dAtA[i:], x.Bundler) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bundler))) - 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().(*MsgExecuteBundle) - 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: MsgExecuteBundle: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecuteBundle: 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 Bundler", 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.Bundler = 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 Txs", wireType) - } - var byteLen 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++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - 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.Txs = append(x.Txs, make([]byte, postIndex-iNdEx)) - copy(x.Txs[len(x.Txs)-1], 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, - } -} - -var _ protoreflect.List = (*_BundledTxResponse_3_list)(nil) - -type _BundledTxResponse_3_list struct { - list *[]*anypb.Any -} - -func (x *_BundledTxResponse_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_BundledTxResponse_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_BundledTxResponse_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_BundledTxResponse_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_BundledTxResponse_3_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_BundledTxResponse_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_BundledTxResponse_3_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_BundledTxResponse_3_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_BundledTxResponse_5_list)(nil) - -type _BundledTxResponse_5_list struct { - list *[]*anypb.Any -} - -func (x *_BundledTxResponse_5_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_BundledTxResponse_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_BundledTxResponse_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_BundledTxResponse_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_BundledTxResponse_5_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_BundledTxResponse_5_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_BundledTxResponse_5_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_BundledTxResponse_5_list) IsValid() bool { - return x.list != nil -} - -var ( - md_BundledTxResponse protoreflect.MessageDescriptor - fd_BundledTxResponse_authentication_gas_used protoreflect.FieldDescriptor - fd_BundledTxResponse_bundler_payment_gas_used protoreflect.FieldDescriptor - fd_BundledTxResponse_bundler_payment_responses protoreflect.FieldDescriptor - fd_BundledTxResponse_execution_gas_used protoreflect.FieldDescriptor - fd_BundledTxResponse_execution_responses protoreflect.FieldDescriptor - fd_BundledTxResponse_error protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_accounts_v1_tx_proto_init() - md_BundledTxResponse = File_cosmos_accounts_v1_tx_proto.Messages().ByName("BundledTxResponse") - fd_BundledTxResponse_authentication_gas_used = md_BundledTxResponse.Fields().ByName("authentication_gas_used") - fd_BundledTxResponse_bundler_payment_gas_used = md_BundledTxResponse.Fields().ByName("bundler_payment_gas_used") - fd_BundledTxResponse_bundler_payment_responses = md_BundledTxResponse.Fields().ByName("bundler_payment_responses") - fd_BundledTxResponse_execution_gas_used = md_BundledTxResponse.Fields().ByName("execution_gas_used") - fd_BundledTxResponse_execution_responses = md_BundledTxResponse.Fields().ByName("execution_responses") - fd_BundledTxResponse_error = md_BundledTxResponse.Fields().ByName("error") -} - -var _ protoreflect.Message = (*fastReflection_BundledTxResponse)(nil) - -type fastReflection_BundledTxResponse BundledTxResponse - -func (x *BundledTxResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_BundledTxResponse)(x) -} - -func (x *BundledTxResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[5] - 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_BundledTxResponse_messageType fastReflection_BundledTxResponse_messageType -var _ protoreflect.MessageType = fastReflection_BundledTxResponse_messageType{} - -type fastReflection_BundledTxResponse_messageType struct{} - -func (x fastReflection_BundledTxResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_BundledTxResponse)(nil) -} -func (x fastReflection_BundledTxResponse_messageType) New() protoreflect.Message { - return new(fastReflection_BundledTxResponse) -} -func (x fastReflection_BundledTxResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_BundledTxResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_BundledTxResponse) Descriptor() protoreflect.MessageDescriptor { - return md_BundledTxResponse -} - -// 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_BundledTxResponse) Type() protoreflect.MessageType { - return _fastReflection_BundledTxResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_BundledTxResponse) New() protoreflect.Message { - return new(fastReflection_BundledTxResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_BundledTxResponse) Interface() protoreflect.ProtoMessage { - return (*BundledTxResponse)(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_BundledTxResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.AuthenticationGasUsed != uint64(0) { - value := protoreflect.ValueOfUint64(x.AuthenticationGasUsed) - if !f(fd_BundledTxResponse_authentication_gas_used, value) { - return - } - } - if x.BundlerPaymentGasUsed != uint64(0) { - value := protoreflect.ValueOfUint64(x.BundlerPaymentGasUsed) - if !f(fd_BundledTxResponse_bundler_payment_gas_used, value) { - return - } - } - if len(x.BundlerPaymentResponses) != 0 { - value := protoreflect.ValueOfList(&_BundledTxResponse_3_list{list: &x.BundlerPaymentResponses}) - if !f(fd_BundledTxResponse_bundler_payment_responses, value) { - return - } - } - if x.ExecutionGasUsed != uint64(0) { - value := protoreflect.ValueOfUint64(x.ExecutionGasUsed) - if !f(fd_BundledTxResponse_execution_gas_used, value) { - return - } - } - if len(x.ExecutionResponses) != 0 { - value := protoreflect.ValueOfList(&_BundledTxResponse_5_list{list: &x.ExecutionResponses}) - if !f(fd_BundledTxResponse_execution_responses, value) { - return - } - } - if x.Error != "" { - value := protoreflect.ValueOfString(x.Error) - if !f(fd_BundledTxResponse_error, 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_BundledTxResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.accounts.v1.BundledTxResponse.authentication_gas_used": - return x.AuthenticationGasUsed != uint64(0) - case "cosmos.accounts.v1.BundledTxResponse.bundler_payment_gas_used": - return x.BundlerPaymentGasUsed != uint64(0) - case "cosmos.accounts.v1.BundledTxResponse.bundler_payment_responses": - return len(x.BundlerPaymentResponses) != 0 - case "cosmos.accounts.v1.BundledTxResponse.execution_gas_used": - return x.ExecutionGasUsed != uint64(0) - case "cosmos.accounts.v1.BundledTxResponse.execution_responses": - return len(x.ExecutionResponses) != 0 - case "cosmos.accounts.v1.BundledTxResponse.error": - return x.Error != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.BundledTxResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.BundledTxResponse 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_BundledTxResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.accounts.v1.BundledTxResponse.authentication_gas_used": - x.AuthenticationGasUsed = uint64(0) - case "cosmos.accounts.v1.BundledTxResponse.bundler_payment_gas_used": - x.BundlerPaymentGasUsed = uint64(0) - case "cosmos.accounts.v1.BundledTxResponse.bundler_payment_responses": - x.BundlerPaymentResponses = nil - case "cosmos.accounts.v1.BundledTxResponse.execution_gas_used": - x.ExecutionGasUsed = uint64(0) - case "cosmos.accounts.v1.BundledTxResponse.execution_responses": - x.ExecutionResponses = nil - case "cosmos.accounts.v1.BundledTxResponse.error": - x.Error = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.BundledTxResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.BundledTxResponse 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_BundledTxResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.accounts.v1.BundledTxResponse.authentication_gas_used": - value := x.AuthenticationGasUsed - return protoreflect.ValueOfUint64(value) - case "cosmos.accounts.v1.BundledTxResponse.bundler_payment_gas_used": - value := x.BundlerPaymentGasUsed - return protoreflect.ValueOfUint64(value) - case "cosmos.accounts.v1.BundledTxResponse.bundler_payment_responses": - if len(x.BundlerPaymentResponses) == 0 { - return protoreflect.ValueOfList(&_BundledTxResponse_3_list{}) - } - listValue := &_BundledTxResponse_3_list{list: &x.BundlerPaymentResponses} - return protoreflect.ValueOfList(listValue) - case "cosmos.accounts.v1.BundledTxResponse.execution_gas_used": - value := x.ExecutionGasUsed - return protoreflect.ValueOfUint64(value) - case "cosmos.accounts.v1.BundledTxResponse.execution_responses": - if len(x.ExecutionResponses) == 0 { - return protoreflect.ValueOfList(&_BundledTxResponse_5_list{}) - } - listValue := &_BundledTxResponse_5_list{list: &x.ExecutionResponses} - return protoreflect.ValueOfList(listValue) - case "cosmos.accounts.v1.BundledTxResponse.error": - value := x.Error - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.BundledTxResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.BundledTxResponse 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_BundledTxResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.accounts.v1.BundledTxResponse.authentication_gas_used": - x.AuthenticationGasUsed = value.Uint() - case "cosmos.accounts.v1.BundledTxResponse.bundler_payment_gas_used": - x.BundlerPaymentGasUsed = value.Uint() - case "cosmos.accounts.v1.BundledTxResponse.bundler_payment_responses": - lv := value.List() - clv := lv.(*_BundledTxResponse_3_list) - x.BundlerPaymentResponses = *clv.list - case "cosmos.accounts.v1.BundledTxResponse.execution_gas_used": - x.ExecutionGasUsed = value.Uint() - case "cosmos.accounts.v1.BundledTxResponse.execution_responses": - lv := value.List() - clv := lv.(*_BundledTxResponse_5_list) - x.ExecutionResponses = *clv.list - case "cosmos.accounts.v1.BundledTxResponse.error": - x.Error = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.BundledTxResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.BundledTxResponse 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_BundledTxResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.v1.BundledTxResponse.bundler_payment_responses": - if x.BundlerPaymentResponses == nil { - x.BundlerPaymentResponses = []*anypb.Any{} - } - value := &_BundledTxResponse_3_list{list: &x.BundlerPaymentResponses} - return protoreflect.ValueOfList(value) - case "cosmos.accounts.v1.BundledTxResponse.execution_responses": - if x.ExecutionResponses == nil { - x.ExecutionResponses = []*anypb.Any{} - } - value := &_BundledTxResponse_5_list{list: &x.ExecutionResponses} - return protoreflect.ValueOfList(value) - case "cosmos.accounts.v1.BundledTxResponse.authentication_gas_used": - panic(fmt.Errorf("field authentication_gas_used of message cosmos.accounts.v1.BundledTxResponse is not mutable")) - case "cosmos.accounts.v1.BundledTxResponse.bundler_payment_gas_used": - panic(fmt.Errorf("field bundler_payment_gas_used of message cosmos.accounts.v1.BundledTxResponse is not mutable")) - case "cosmos.accounts.v1.BundledTxResponse.execution_gas_used": - panic(fmt.Errorf("field execution_gas_used of message cosmos.accounts.v1.BundledTxResponse is not mutable")) - case "cosmos.accounts.v1.BundledTxResponse.error": - panic(fmt.Errorf("field error of message cosmos.accounts.v1.BundledTxResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.BundledTxResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.BundledTxResponse 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_BundledTxResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.v1.BundledTxResponse.authentication_gas_used": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.accounts.v1.BundledTxResponse.bundler_payment_gas_used": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.accounts.v1.BundledTxResponse.bundler_payment_responses": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_BundledTxResponse_3_list{list: &list}) - case "cosmos.accounts.v1.BundledTxResponse.execution_gas_used": - return protoreflect.ValueOfUint64(uint64(0)) - case "cosmos.accounts.v1.BundledTxResponse.execution_responses": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_BundledTxResponse_5_list{list: &list}) - case "cosmos.accounts.v1.BundledTxResponse.error": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.BundledTxResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.BundledTxResponse 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_BundledTxResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.v1.BundledTxResponse", 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_BundledTxResponse) 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_BundledTxResponse) 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_BundledTxResponse) 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_BundledTxResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*BundledTxResponse) - 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.AuthenticationGasUsed != 0 { - n += 1 + runtime.Sov(uint64(x.AuthenticationGasUsed)) - } - if x.BundlerPaymentGasUsed != 0 { - n += 1 + runtime.Sov(uint64(x.BundlerPaymentGasUsed)) - } - if len(x.BundlerPaymentResponses) > 0 { - for _, e := range x.BundlerPaymentResponses { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.ExecutionGasUsed != 0 { - n += 1 + runtime.Sov(uint64(x.ExecutionGasUsed)) - } - if len(x.ExecutionResponses) > 0 { - for _, e := range x.ExecutionResponses { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.Error) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*BundledTxResponse) - 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.Error) > 0 { - i -= len(x.Error) - copy(dAtA[i:], x.Error) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Error))) - i-- - dAtA[i] = 0x32 - } - if len(x.ExecutionResponses) > 0 { - for iNdEx := len(x.ExecutionResponses) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.ExecutionResponses[iNdEx]) - 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] = 0x2a - } - } - if x.ExecutionGasUsed != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ExecutionGasUsed)) - i-- - dAtA[i] = 0x20 - } - if len(x.BundlerPaymentResponses) > 0 { - for iNdEx := len(x.BundlerPaymentResponses) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.BundlerPaymentResponses[iNdEx]) - 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] = 0x1a - } - } - if x.BundlerPaymentGasUsed != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.BundlerPaymentGasUsed)) - i-- - dAtA[i] = 0x10 - } - if x.AuthenticationGasUsed != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.AuthenticationGasUsed)) - i-- - dAtA[i] = 0x8 - } - 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().(*BundledTxResponse) - 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: BundledTxResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BundledTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AuthenticationGasUsed", wireType) - } - x.AuthenticationGasUsed = 0 - 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++ - x.AuthenticationGasUsed |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BundlerPaymentGasUsed", wireType) - } - x.BundlerPaymentGasUsed = 0 - 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++ - x.BundlerPaymentGasUsed |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BundlerPaymentResponses", 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 - } - x.BundlerPaymentResponses = append(x.BundlerPaymentResponses, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BundlerPaymentResponses[len(x.BundlerPaymentResponses)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExecutionGasUsed", wireType) - } - x.ExecutionGasUsed = 0 - 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++ - x.ExecutionGasUsed |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExecutionResponses", 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 - } - x.ExecutionResponses = append(x.ExecutionResponses, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ExecutionResponses[len(x.ExecutionResponses)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Error", 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.Error = 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, - } -} - -var _ protoreflect.List = (*_MsgExecuteBundleResponse_1_list)(nil) - -type _MsgExecuteBundleResponse_1_list struct { - list *[]*BundledTxResponse -} - -func (x *_MsgExecuteBundleResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgExecuteBundleResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgExecuteBundleResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*BundledTxResponse) - (*x.list)[i] = concreteValue -} - -func (x *_MsgExecuteBundleResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*BundledTxResponse) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgExecuteBundleResponse_1_list) AppendMutable() protoreflect.Value { - v := new(BundledTxResponse) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgExecuteBundleResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgExecuteBundleResponse_1_list) NewElement() protoreflect.Value { - v := new(BundledTxResponse) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgExecuteBundleResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgExecuteBundleResponse protoreflect.MessageDescriptor - fd_MsgExecuteBundleResponse_responses protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_accounts_v1_tx_proto_init() - md_MsgExecuteBundleResponse = File_cosmos_accounts_v1_tx_proto.Messages().ByName("MsgExecuteBundleResponse") - fd_MsgExecuteBundleResponse_responses = md_MsgExecuteBundleResponse.Fields().ByName("responses") -} - -var _ protoreflect.Message = (*fastReflection_MsgExecuteBundleResponse)(nil) - -type fastReflection_MsgExecuteBundleResponse MsgExecuteBundleResponse - -func (x *MsgExecuteBundleResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgExecuteBundleResponse)(x) -} - -func (x *MsgExecuteBundleResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[6] - 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_MsgExecuteBundleResponse_messageType fastReflection_MsgExecuteBundleResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgExecuteBundleResponse_messageType{} - -type fastReflection_MsgExecuteBundleResponse_messageType struct{} - -func (x fastReflection_MsgExecuteBundleResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgExecuteBundleResponse)(nil) -} -func (x fastReflection_MsgExecuteBundleResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgExecuteBundleResponse) -} -func (x fastReflection_MsgExecuteBundleResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExecuteBundleResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgExecuteBundleResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExecuteBundleResponse -} - -// 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_MsgExecuteBundleResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgExecuteBundleResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgExecuteBundleResponse) New() protoreflect.Message { - return new(fastReflection_MsgExecuteBundleResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgExecuteBundleResponse) Interface() protoreflect.ProtoMessage { - return (*MsgExecuteBundleResponse)(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_MsgExecuteBundleResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Responses) != 0 { - value := protoreflect.ValueOfList(&_MsgExecuteBundleResponse_1_list{list: &x.Responses}) - if !f(fd_MsgExecuteBundleResponse_responses, 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_MsgExecuteBundleResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgExecuteBundleResponse.responses": - return len(x.Responses) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundleResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteBundleResponse 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_MsgExecuteBundleResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgExecuteBundleResponse.responses": - x.Responses = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundleResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteBundleResponse 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_MsgExecuteBundleResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.accounts.v1.MsgExecuteBundleResponse.responses": - if len(x.Responses) == 0 { - return protoreflect.ValueOfList(&_MsgExecuteBundleResponse_1_list{}) - } - listValue := &_MsgExecuteBundleResponse_1_list{list: &x.Responses} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundleResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteBundleResponse 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_MsgExecuteBundleResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgExecuteBundleResponse.responses": - lv := value.List() - clv := lv.(*_MsgExecuteBundleResponse_1_list) - x.Responses = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundleResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteBundleResponse 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_MsgExecuteBundleResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgExecuteBundleResponse.responses": - if x.Responses == nil { - x.Responses = []*BundledTxResponse{} - } - value := &_MsgExecuteBundleResponse_1_list{list: &x.Responses} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundleResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteBundleResponse 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_MsgExecuteBundleResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.v1.MsgExecuteBundleResponse.responses": - list := []*BundledTxResponse{} - return protoreflect.ValueOfList(&_MsgExecuteBundleResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.MsgExecuteBundleResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.v1.MsgExecuteBundleResponse 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_MsgExecuteBundleResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.v1.MsgExecuteBundleResponse", 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_MsgExecuteBundleResponse) 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_MsgExecuteBundleResponse) 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_MsgExecuteBundleResponse) 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_MsgExecuteBundleResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgExecuteBundleResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Responses) > 0 { - for _, e := range x.Responses { - l = options.Size(e) - 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().(*MsgExecuteBundleResponse) - 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.Responses) > 0 { - for iNdEx := len(x.Responses) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Responses[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgExecuteBundleResponse) - 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: MsgExecuteBundleResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecuteBundleResponse: 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 Responses", 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 - } - x.Responses = append(x.Responses, &BundledTxResponse{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Responses[len(x.Responses)-1]); 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, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/accounts/v1/tx.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// MsgInit defines the Create request type for the Msg/Create RPC method. -type MsgInit struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // sender is the address of the sender of this message. - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - // account_type is the type of the account to be created. - AccountType string `protobuf:"bytes,2,opt,name=account_type,json=accountType,proto3" json:"account_type,omitempty"` - // message is the message to be sent to the account. - Message *anypb.Any `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` - // funds contains the coins that the account wants to - // send alongside the request. - Funds []*v1beta1.Coin `protobuf:"bytes,4,rep,name=funds,proto3" json:"funds,omitempty"` - // address_seed can be used to deterministically create the address of the account. - // If not present the address will be generated based on its associated account number. - AddressSeed []byte `protobuf:"bytes,5,opt,name=address_seed,json=addressSeed,proto3" json:"address_seed,omitempty"` -} - -func (x *MsgInit) Reset() { - *x = MsgInit{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgInit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgInit) ProtoMessage() {} - -// Deprecated: Use MsgInit.ProtoReflect.Descriptor instead. -func (*MsgInit) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_v1_tx_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgInit) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -func (x *MsgInit) GetAccountType() string { - if x != nil { - return x.AccountType - } - return "" -} - -func (x *MsgInit) GetMessage() *anypb.Any { - if x != nil { - return x.Message - } - return nil -} - -func (x *MsgInit) GetFunds() []*v1beta1.Coin { - if x != nil { - return x.Funds - } - return nil -} - -func (x *MsgInit) GetAddressSeed() []byte { - if x != nil { - return x.AddressSeed - } - return nil -} - -// MsgInitResponse defines the Create response type for the Msg/Create RPC method. -type MsgInitResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // account_address is the address of the newly created account. - AccountAddress string `protobuf:"bytes,1,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` - // response is the response returned by the account implementation. - Response *anypb.Any `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"` -} - -func (x *MsgInitResponse) Reset() { - *x = MsgInitResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgInitResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgInitResponse) ProtoMessage() {} - -// Deprecated: Use MsgInitResponse.ProtoReflect.Descriptor instead. -func (*MsgInitResponse) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_v1_tx_proto_rawDescGZIP(), []int{1} -} - -func (x *MsgInitResponse) GetAccountAddress() string { - if x != nil { - return x.AccountAddress - } - return "" -} - -func (x *MsgInitResponse) GetResponse() *anypb.Any { - if x != nil { - return x.Response - } - return nil -} - -// MsgExecute defines the Execute request type for the Msg/Execute RPC method. -type MsgExecute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // sender is the address of the sender of this message. - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - // target is the address of the account to be executed. - Target string `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"` - // message is the message to be sent to the account. - Message *anypb.Any `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` - // funds contains the coins that the account wants to - // send alongside the request. - Funds []*v1beta1.Coin `protobuf:"bytes,4,rep,name=funds,proto3" json:"funds,omitempty"` -} - -func (x *MsgExecute) Reset() { - *x = MsgExecute{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgExecute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgExecute) ProtoMessage() {} - -// Deprecated: Use MsgExecute.ProtoReflect.Descriptor instead. -func (*MsgExecute) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_v1_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgExecute) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -func (x *MsgExecute) GetTarget() string { - if x != nil { - return x.Target - } - return "" -} - -func (x *MsgExecute) GetMessage() *anypb.Any { - if x != nil { - return x.Message - } - return nil -} - -func (x *MsgExecute) GetFunds() []*v1beta1.Coin { - if x != nil { - return x.Funds - } - return nil -} - -// MsgExecuteResponse defines the Execute response type for the Msg/Execute RPC method. -type MsgExecuteResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // response is the response returned by the account implementation. - Response *anypb.Any `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` -} - -func (x *MsgExecuteResponse) Reset() { - *x = MsgExecuteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgExecuteResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgExecuteResponse) ProtoMessage() {} - -// Deprecated: Use MsgExecuteResponse.ProtoReflect.Descriptor instead. -func (*MsgExecuteResponse) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_v1_tx_proto_rawDescGZIP(), []int{3} -} - -func (x *MsgExecuteResponse) GetResponse() *anypb.Any { - if x != nil { - return x.Response - } - return nil -} - -// MsgExecuteBundle defines the ExecuteBundle request type for the Msg/ExecuteBundle RPC method. -type MsgExecuteBundle struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // bundler defines the entity going through the standard TX flow - // to execute one or multiple UserOperations on behalf of others. - Bundler string `protobuf:"bytes,1,opt,name=bundler,proto3" json:"bundler,omitempty"` - // txs defines the txs to execute on behalf of other users. - Txs [][]byte `protobuf:"bytes,2,rep,name=txs,proto3" json:"txs,omitempty"` -} - -func (x *MsgExecuteBundle) Reset() { - *x = MsgExecuteBundle{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgExecuteBundle) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgExecuteBundle) ProtoMessage() {} - -// Deprecated: Use MsgExecuteBundle.ProtoReflect.Descriptor instead. -func (*MsgExecuteBundle) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_v1_tx_proto_rawDescGZIP(), []int{4} -} - -func (x *MsgExecuteBundle) GetBundler() string { - if x != nil { - return x.Bundler - } - return "" -} - -func (x *MsgExecuteBundle) GetTxs() [][]byte { - if x != nil { - return x.Txs - } - return nil -} - -// BundledTxResponse defines the response of a bundled tx. -// If the operation fails the error field will be populated, the used gas fields will also be -// populated depending on when the execution stopped. Bundler payment responses will be populated -// if the execution fails. -type BundledTxResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authentication_gas_used defines the gas used for the authentication part of the UserOperation. - AuthenticationGasUsed uint64 `protobuf:"varint,1,opt,name=authentication_gas_used,json=authenticationGasUsed,proto3" json:"authentication_gas_used,omitempty"` - // bundler_payment_gas_used defines the gas used for the bundler payment part of the UserOperation. - BundlerPaymentGasUsed uint64 `protobuf:"varint,2,opt,name=bundler_payment_gas_used,json=bundlerPaymentGasUsed,proto3" json:"bundler_payment_gas_used,omitempty"` - // bundler_payment_responses defines the responses of the bundler payment messages. - // It can be empty if the bundler does not need any form of payment. - BundlerPaymentResponses []*anypb.Any `protobuf:"bytes,3,rep,name=bundler_payment_responses,json=bundlerPaymentResponses,proto3" json:"bundler_payment_responses,omitempty"` - // execution_gas_used defines the gas used for the execution part of the UserOperation. - ExecutionGasUsed uint64 `protobuf:"varint,4,opt,name=execution_gas_used,json=executionGasUsed,proto3" json:"execution_gas_used,omitempty"` - // execution_responses defines the responses of the execution messages. - ExecutionResponses []*anypb.Any `protobuf:"bytes,5,rep,name=execution_responses,json=executionResponses,proto3" json:"execution_responses,omitempty"` - // error defines the error that occurred during the execution of the UserOperation. - // If the error is not empty, the UserOperation failed. - // Other fields might be populated even if the error is not empty, for example - // if the operation fails after the authentication step, the authentication_gas_used - // field will be populated. - Error string `protobuf:"bytes,6,opt,name=error,proto3" json:"error,omitempty"` -} - -func (x *BundledTxResponse) Reset() { - *x = BundledTxResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BundledTxResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BundledTxResponse) ProtoMessage() {} - -// Deprecated: Use BundledTxResponse.ProtoReflect.Descriptor instead. -func (*BundledTxResponse) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_v1_tx_proto_rawDescGZIP(), []int{5} -} - -func (x *BundledTxResponse) GetAuthenticationGasUsed() uint64 { - if x != nil { - return x.AuthenticationGasUsed - } - return 0 -} - -func (x *BundledTxResponse) GetBundlerPaymentGasUsed() uint64 { - if x != nil { - return x.BundlerPaymentGasUsed - } - return 0 -} - -func (x *BundledTxResponse) GetBundlerPaymentResponses() []*anypb.Any { - if x != nil { - return x.BundlerPaymentResponses - } - return nil -} - -func (x *BundledTxResponse) GetExecutionGasUsed() uint64 { - if x != nil { - return x.ExecutionGasUsed - } - return 0 -} - -func (x *BundledTxResponse) GetExecutionResponses() []*anypb.Any { - if x != nil { - return x.ExecutionResponses - } - return nil -} - -func (x *BundledTxResponse) GetError() string { - if x != nil { - return x.Error - } - return "" -} - -// MsgExecuteBundleResponse defines the ExecuteBundle response type for the Msg/ExecuteBundle RPC method. -type MsgExecuteBundleResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // responses is the list of responses from the bundle txs. - Responses []*BundledTxResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` -} - -func (x *MsgExecuteBundleResponse) Reset() { - *x = MsgExecuteBundleResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_v1_tx_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgExecuteBundleResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgExecuteBundleResponse) ProtoMessage() {} - -// Deprecated: Use MsgExecuteBundleResponse.ProtoReflect.Descriptor instead. -func (*MsgExecuteBundleResponse) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_v1_tx_proto_rawDescGZIP(), []int{6} -} - -func (x *MsgExecuteBundleResponse) GetResponses() []*BundledTxResponse { - if x != nil { - return x.Responses - } - return nil -} - -var File_cosmos_accounts_v1_tx_proto protoreflect.FileDescriptor - -var file_cosmos_accounts_v1_tx_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, - 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, - 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, - 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x02, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x49, - 0x6e, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2e, - 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x61, - 0x0a, 0x05, 0x66, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, - 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x05, 0x66, 0x75, 0x6e, 0x64, - 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x65, - 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x53, 0x65, 0x65, 0x64, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x22, 0x6c, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, - 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0xdc, 0x01, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2e, - 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x61, - 0x0a, 0x05, 0x66, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, - 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x05, 0x66, 0x75, 0x6e, 0x64, - 0x73, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x46, - 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4c, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x75, - 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x75, 0x6e, - 0x64, 0x6c, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0c, 0x52, 0x03, 0x74, 0x78, 0x73, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x62, 0x75, 0x6e, - 0x64, 0x6c, 0x65, 0x72, 0x22, 0xe1, 0x02, 0x0a, 0x11, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x64, - 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x61, 0x75, - 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x61, 0x73, - 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x61, 0x75, 0x74, - 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x61, 0x73, 0x55, 0x73, - 0x65, 0x64, 0x12, 0x37, 0x0a, 0x18, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x61, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x50, 0x61, 0x79, - 0x6d, 0x65, 0x6e, 0x74, 0x47, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x50, 0x0a, 0x19, 0x62, - 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x17, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x50, 0x61, 0x79, - 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x2c, 0x0a, - 0x12, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x75, - 0x73, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x45, 0x0a, 0x13, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x12, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x5f, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x6e, - 0x64, 0x6c, 0x65, 0x64, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x32, 0x8e, 0x02, 0x0a, 0x03, 0x4d, 0x73, - 0x67, 0x12, 0x48, 0x0a, 0x04, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, - 0x6e, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x07, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, - 0x0a, 0x0d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, - 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x42, - 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xbb, 0x01, 0x0a, 0x16, 0x63, - 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x56, 0x31, - 0xe2, 0x02, 0x1e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_accounts_v1_tx_proto_rawDescOnce sync.Once - file_cosmos_accounts_v1_tx_proto_rawDescData = file_cosmos_accounts_v1_tx_proto_rawDesc -) - -func file_cosmos_accounts_v1_tx_proto_rawDescGZIP() []byte { - file_cosmos_accounts_v1_tx_proto_rawDescOnce.Do(func() { - file_cosmos_accounts_v1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_accounts_v1_tx_proto_rawDescData) - }) - return file_cosmos_accounts_v1_tx_proto_rawDescData -} - -var file_cosmos_accounts_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_cosmos_accounts_v1_tx_proto_goTypes = []interface{}{ - (*MsgInit)(nil), // 0: cosmos.accounts.v1.MsgInit - (*MsgInitResponse)(nil), // 1: cosmos.accounts.v1.MsgInitResponse - (*MsgExecute)(nil), // 2: cosmos.accounts.v1.MsgExecute - (*MsgExecuteResponse)(nil), // 3: cosmos.accounts.v1.MsgExecuteResponse - (*MsgExecuteBundle)(nil), // 4: cosmos.accounts.v1.MsgExecuteBundle - (*BundledTxResponse)(nil), // 5: cosmos.accounts.v1.BundledTxResponse - (*MsgExecuteBundleResponse)(nil), // 6: cosmos.accounts.v1.MsgExecuteBundleResponse - (*anypb.Any)(nil), // 7: google.protobuf.Any - (*v1beta1.Coin)(nil), // 8: cosmos.base.v1beta1.Coin -} -var file_cosmos_accounts_v1_tx_proto_depIdxs = []int32{ - 7, // 0: cosmos.accounts.v1.MsgInit.message:type_name -> google.protobuf.Any - 8, // 1: cosmos.accounts.v1.MsgInit.funds:type_name -> cosmos.base.v1beta1.Coin - 7, // 2: cosmos.accounts.v1.MsgInitResponse.response:type_name -> google.protobuf.Any - 7, // 3: cosmos.accounts.v1.MsgExecute.message:type_name -> google.protobuf.Any - 8, // 4: cosmos.accounts.v1.MsgExecute.funds:type_name -> cosmos.base.v1beta1.Coin - 7, // 5: cosmos.accounts.v1.MsgExecuteResponse.response:type_name -> google.protobuf.Any - 7, // 6: cosmos.accounts.v1.BundledTxResponse.bundler_payment_responses:type_name -> google.protobuf.Any - 7, // 7: cosmos.accounts.v1.BundledTxResponse.execution_responses:type_name -> google.protobuf.Any - 5, // 8: cosmos.accounts.v1.MsgExecuteBundleResponse.responses:type_name -> cosmos.accounts.v1.BundledTxResponse - 0, // 9: cosmos.accounts.v1.Msg.Init:input_type -> cosmos.accounts.v1.MsgInit - 2, // 10: cosmos.accounts.v1.Msg.Execute:input_type -> cosmos.accounts.v1.MsgExecute - 4, // 11: cosmos.accounts.v1.Msg.ExecuteBundle:input_type -> cosmos.accounts.v1.MsgExecuteBundle - 1, // 12: cosmos.accounts.v1.Msg.Init:output_type -> cosmos.accounts.v1.MsgInitResponse - 3, // 13: cosmos.accounts.v1.Msg.Execute:output_type -> cosmos.accounts.v1.MsgExecuteResponse - 6, // 14: cosmos.accounts.v1.Msg.ExecuteBundle:output_type -> cosmos.accounts.v1.MsgExecuteBundleResponse - 12, // [12:15] is the sub-list for method output_type - 9, // [9:12] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name -} - -func init() { file_cosmos_accounts_v1_tx_proto_init() } -func file_cosmos_accounts_v1_tx_proto_init() { - if File_cosmos_accounts_v1_tx_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_accounts_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgInit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_accounts_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgInitResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_accounts_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgExecute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_accounts_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgExecuteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_accounts_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgExecuteBundle); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_accounts_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BundledTxResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_accounts_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgExecuteBundleResponse); 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{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_accounts_v1_tx_proto_rawDesc, - NumEnums: 0, - NumMessages: 7, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_accounts_v1_tx_proto_goTypes, - DependencyIndexes: file_cosmos_accounts_v1_tx_proto_depIdxs, - MessageInfos: file_cosmos_accounts_v1_tx_proto_msgTypes, - }.Build() - File_cosmos_accounts_v1_tx_proto = out.File - file_cosmos_accounts_v1_tx_proto_rawDesc = nil - file_cosmos_accounts_v1_tx_proto_goTypes = nil - file_cosmos_accounts_v1_tx_proto_depIdxs = nil -} diff --git a/tests/integration/v2/auth/accounts_retro_compatibility_test.go b/tests/integration/v2/auth/accounts_retro_compatibility_test.go deleted file mode 100644 index ab7c6b476c9c..000000000000 --- a/tests/integration/v2/auth/accounts_retro_compatibility_test.go +++ /dev/null @@ -1,185 +0,0 @@ -package auth - -import ( - "context" - "errors" - "testing" - - gogotypes "github.com/cosmos/gogoproto/types" - "github.com/stretchr/testify/require" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - "cosmossdk.io/x/accounts/accountstd" - basev1 "cosmossdk.io/x/accounts/defaults/base/v1" - - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" -) - -var _ accountstd.Interface = mockRetroCompatAccount{} - -type mockRetroCompatAccount struct { - retroCompat *authtypes.QueryLegacyAccountResponse - address []byte -} - -var ( - valid = &mockRetroCompatAccount{ - retroCompat: &authtypes.QueryLegacyAccountResponse{ - Account: &codectypes.Any{}, - Base: &authtypes.BaseAccount{ - Address: "test", - PubKey: nil, - AccountNumber: 10, - Sequence: 20, - }, - }, - } - - noInfo = &mockRetroCompatAccount{ - retroCompat: &authtypes.QueryLegacyAccountResponse{ - Account: &codectypes.Any{}, - }, - } - noImplement = &mockRetroCompatAccount{ - retroCompat: nil, - } -) - -func newMockRetroCompatAccount(name string, acc accountstd.Interface) accountstd.AccountCreatorFunc { - return func(_ accountstd.Dependencies) (string, accountstd.Interface, error) { - _, ok := acc.(*mockRetroCompatAccount) - if !ok { - return name, nil, errors.New("invalid account type") - } - return name, acc, nil - } -} - -func ProvideMockRetroCompatAccountValid() accountstd.DepinjectAccount { - return accountstd.DepinjectAccount{MakeAccount: newMockRetroCompatAccount("valid", valid)} -} - -func ProvideMockRetroCompatAccountNoInfo() accountstd.DepinjectAccount { - return accountstd.DepinjectAccount{MakeAccount: newMockRetroCompatAccount("no_info", noInfo)} -} - -func ProvideMockRetroCompatAccountNoImplement() accountstd.DepinjectAccount { - return accountstd.DepinjectAccount{MakeAccount: newMockRetroCompatAccount("no_implement", noImplement)} -} - -func (m mockRetroCompatAccount) RegisterInitHandler(builder *accountstd.InitBuilder) { - accountstd.RegisterInitHandler(builder, func(ctx context.Context, req *gogotypes.Empty) (*gogotypes.Empty, error) { - return &gogotypes.Empty{}, nil - }) -} - -func (m mockRetroCompatAccount) RegisterExecuteHandlers(_ *accountstd.ExecuteBuilder) {} - -func (m mockRetroCompatAccount) RegisterQueryHandlers(builder *accountstd.QueryBuilder) { - if m.retroCompat == nil { - return - } - accountstd.RegisterQueryHandler(builder, func(ctx context.Context, req *authtypes.QueryLegacyAccount) (*authtypes.QueryLegacyAccountResponse, error) { - return m.retroCompat, nil - }) -} - -func TestAuthToAccountsGRPCCompat(t *testing.T) { - accs := map[string]accountstd.Interface{ - "valid": valid, - "no_info": noInfo, - "no_implement": noImplement, - } - - f := createTestSuite(t) - - // init three accounts - for n, a := range accs { - _, addr, err := f.accountsKeeper.Init(f.ctx, n, []byte("me"), &gogotypes.Empty{}, nil, nil) - require.NoError(t, err) - a.(*mockRetroCompatAccount).address = addr - } - - qs := authkeeper.NewQueryServer(f.authKeeper) - - t.Run("account supports info and account query", func(t *testing.T) { - infoResp, err := qs.AccountInfo(f.ctx, &authtypes.QueryAccountInfoRequest{ - Address: f.mustAddr(valid.address), - }) - require.NoError(t, err) - require.Equal(t, infoResp.Info, valid.retroCompat.Base) - - accountResp, err := qs.Account(f.ctx, &authtypes.QueryAccountRequest{ - Address: f.mustAddr(noInfo.address), - }) - require.NoError(t, err) - require.Equal(t, accountResp.Account, valid.retroCompat.Account) - }) - - t.Run("account only supports account query, not info", func(t *testing.T) { - _, err := qs.AccountInfo(f.ctx, &authtypes.QueryAccountInfoRequest{ - Address: f.mustAddr(noInfo.address), - }) - require.Error(t, err) - require.Equal(t, status.Code(err), codes.NotFound) - - resp, err := qs.Account(f.ctx, &authtypes.QueryAccountRequest{ - Address: f.mustAddr(noInfo.address), - }) - require.NoError(t, err) - require.Equal(t, resp.Account, valid.retroCompat.Account) - }) - - t.Run("account does not support any retro compat", func(t *testing.T) { - _, err := qs.AccountInfo(f.ctx, &authtypes.QueryAccountInfoRequest{ - Address: f.mustAddr(noImplement.address), - }) - require.Error(t, err) - require.Equal(t, status.Code(err), codes.NotFound) - - _, err = qs.Account(f.ctx, &authtypes.QueryAccountRequest{ - Address: f.mustAddr(noImplement.address), - }) - - require.Error(t, err) - require.Equal(t, status.Code(err), codes.NotFound) - }) -} - -func TestAccountsBaseAccountRetroCompat(t *testing.T) { - f := createTestSuite(t) - // init a base acc - anyPk, err := codectypes.NewAnyWithValue(secp256k1.GenPrivKey().PubKey()) - require.NoError(t, err) - - // we init two accounts. Account number should start with 4 - // since the first three accounts are fee_collector, bonded_tokens_pool, not_bonded_tokens_pool - // generated by init genesis plus one more genesis account, which make the current account number 4. - _, _, err = f.accountsKeeper.Init(f.ctx, "base", []byte("me"), &basev1.MsgInit{PubKey: anyPk}, nil, nil) - require.NoError(t, err) - - _, addr, err := f.accountsKeeper.Init(f.ctx, "base", []byte("me"), &basev1.MsgInit{PubKey: anyPk}, nil, nil) - require.NoError(t, err) - - // try to query it via auth - qs := authkeeper.NewQueryServer(f.authKeeper) - - r, err := qs.Account(f.ctx, &authtypes.QueryAccountRequest{ - Address: f.mustAddr(addr), - }) - require.NoError(t, err) - require.NotNil(t, r.Account) - - info, err := qs.AccountInfo(f.ctx, &authtypes.QueryAccountInfoRequest{ - Address: f.mustAddr(addr), - }) - require.NoError(t, err) - require.NotNil(t, info.Info) - require.Equal(t, info.Info.PubKey, anyPk) - // Account number should be 5 - require.Equal(t, info.Info.AccountNumber, uint64(5)) -}