From f431a5039cecd04c3d66f0c43b9df75b89d88037 Mon Sep 17 00:00:00 2001 From: testinginprod <98415576+testinginprod@users.noreply.github.com> Date: Tue, 9 Jan 2024 15:02:43 +0100 Subject: [PATCH] feat(accounts): Add Query to simulate a UserOperation (#18979) Co-authored-by: unknown unknown --- api/cosmos/accounts/v1/query.pulsar.go | 1529 ++++++++++++++--- api/cosmos/accounts/v1/query_grpc.pb.go | 45 +- proto/cosmos/accounts/v1/query.proto | 20 + .../e2e/accounts/account_abstraction_test.go | 41 + x/accounts/query_server.go | 24 + x/accounts/v1/query.pb.go | 522 +++++- 6 files changed, 1924 insertions(+), 257 deletions(-) diff --git a/api/cosmos/accounts/v1/query.pulsar.go b/api/cosmos/accounts/v1/query.pulsar.go index d4a0ff1370d1..73f12ef52015 100644 --- a/api/cosmos/accounts/v1/query.pulsar.go +++ b/api/cosmos/accounts/v1/query.pulsar.go @@ -2100,7 +2100,7 @@ func (x *SchemaResponse_Handler) ProtoReflect() protoreflect.Message { } func (x *SchemaResponse_Handler) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_accounts_v1_query_proto_msgTypes[6] + mi := &file_cosmos_accounts_v1_query_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3402,178 +3402,1112 @@ func (x *fastReflection_AccountTypeResponse) ProtoMethods() *protoiface.Methods } } -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/accounts/v1/query.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) +var ( + md_SimulateUserOperationRequest protoreflect.MessageDescriptor + fd_SimulateUserOperationRequest_bundler protoreflect.FieldDescriptor + fd_SimulateUserOperationRequest_user_operation protoreflect.FieldDescriptor ) -// AccountQueryRequest is the request type for the Query/AccountQuery RPC -type AccountQueryRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func init() { + file_cosmos_accounts_v1_query_proto_init() + md_SimulateUserOperationRequest = File_cosmos_accounts_v1_query_proto.Messages().ByName("SimulateUserOperationRequest") + fd_SimulateUserOperationRequest_bundler = md_SimulateUserOperationRequest.Fields().ByName("bundler") + fd_SimulateUserOperationRequest_user_operation = md_SimulateUserOperationRequest.Fields().ByName("user_operation") +} - // target defines the account to be queried. - Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` - // request defines the query message being sent to the account. - Request *anypb.Any `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"` +var _ protoreflect.Message = (*fastReflection_SimulateUserOperationRequest)(nil) + +type fastReflection_SimulateUserOperationRequest SimulateUserOperationRequest + +func (x *SimulateUserOperationRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_SimulateUserOperationRequest)(x) } -func (x *AccountQueryRequest) Reset() { - *x = AccountQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_v1_query_proto_msgTypes[0] +func (x *SimulateUserOperationRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_v1_query_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } + return mi.MessageOf(x) } -func (x *AccountQueryRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} +var _fastReflection_SimulateUserOperationRequest_messageType fastReflection_SimulateUserOperationRequest_messageType +var _ protoreflect.MessageType = fastReflection_SimulateUserOperationRequest_messageType{} -func (*AccountQueryRequest) ProtoMessage() {} +type fastReflection_SimulateUserOperationRequest_messageType struct{} -// Deprecated: Use AccountQueryRequest.ProtoReflect.Descriptor instead. -func (*AccountQueryRequest) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_v1_query_proto_rawDescGZIP(), []int{0} +func (x fastReflection_SimulateUserOperationRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_SimulateUserOperationRequest)(nil) } - -func (x *AccountQueryRequest) GetTarget() string { - if x != nil { - return x.Target - } - return "" +func (x fastReflection_SimulateUserOperationRequest_messageType) New() protoreflect.Message { + return new(fastReflection_SimulateUserOperationRequest) } - -func (x *AccountQueryRequest) GetRequest() *anypb.Any { - if x != nil { - return x.Request - } - return nil +func (x fastReflection_SimulateUserOperationRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_SimulateUserOperationRequest } -// AccountQueryResponse is the response type for the Query/AccountQuery RPC method. -type AccountQueryResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // response defines the query response of the account. - Response *anypb.Any `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_SimulateUserOperationRequest) Descriptor() protoreflect.MessageDescriptor { + return md_SimulateUserOperationRequest } -func (x *AccountQueryResponse) Reset() { - *x = AccountQueryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_v1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +// 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_SimulateUserOperationRequest) Type() protoreflect.MessageType { + return _fastReflection_SimulateUserOperationRequest_messageType } -func (x *AccountQueryResponse) String() string { - return protoimpl.X.MessageStringOf(x) +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_SimulateUserOperationRequest) New() protoreflect.Message { + return new(fastReflection_SimulateUserOperationRequest) } -func (*AccountQueryResponse) ProtoMessage() {} - -// Deprecated: Use AccountQueryResponse.ProtoReflect.Descriptor instead. -func (*AccountQueryResponse) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_v1_query_proto_rawDescGZIP(), []int{1} +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_SimulateUserOperationRequest) Interface() protoreflect.ProtoMessage { + return (*SimulateUserOperationRequest)(x) } -func (x *AccountQueryResponse) GetResponse() *anypb.Any { - if x != nil { - return x.Response +// 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_SimulateUserOperationRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Bundler != "" { + value := protoreflect.ValueOfString(x.Bundler) + if !f(fd_SimulateUserOperationRequest_bundler, value) { + return + } + } + if x.UserOperation != nil { + value := protoreflect.ValueOfMessage(x.UserOperation.ProtoReflect()) + if !f(fd_SimulateUserOperationRequest_user_operation, value) { + return + } } - return nil -} - -// SchemaResponse is the response type for the Query/Schema RPC method. -type SchemaRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // account_type defines the account type to query the schema for. - AccountType string `protobuf:"bytes,1,opt,name=account_type,json=accountType,proto3" json:"account_type,omitempty"` } -func (x *SchemaRequest) Reset() { - *x = SchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_v1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +// 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_SimulateUserOperationRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.v1.SimulateUserOperationRequest.bundler": + return x.Bundler != "" + case "cosmos.accounts.v1.SimulateUserOperationRequest.user_operation": + return x.UserOperation != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.SimulateUserOperationRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.SimulateUserOperationRequest does not contain field %s", fd.FullName())) } } -func (x *SchemaRequest) String() string { - return protoimpl.X.MessageStringOf(x) +// 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_SimulateUserOperationRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.v1.SimulateUserOperationRequest.bundler": + x.Bundler = "" + case "cosmos.accounts.v1.SimulateUserOperationRequest.user_operation": + x.UserOperation = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.SimulateUserOperationRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.SimulateUserOperationRequest does not contain field %s", fd.FullName())) + } } -func (*SchemaRequest) ProtoMessage() {} - -// Deprecated: Use SchemaRequest.ProtoReflect.Descriptor instead. -func (*SchemaRequest) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_v1_query_proto_rawDescGZIP(), []int{2} +// 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_SimulateUserOperationRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.v1.SimulateUserOperationRequest.bundler": + value := x.Bundler + return protoreflect.ValueOfString(value) + case "cosmos.accounts.v1.SimulateUserOperationRequest.user_operation": + value := x.UserOperation + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.SimulateUserOperationRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.SimulateUserOperationRequest does not contain field %s", descriptor.FullName())) + } } -func (x *SchemaRequest) GetAccountType() string { - if x != nil { - return x.AccountType +// 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_SimulateUserOperationRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.v1.SimulateUserOperationRequest.bundler": + x.Bundler = value.Interface().(string) + case "cosmos.accounts.v1.SimulateUserOperationRequest.user_operation": + x.UserOperation = value.Message().Interface().(*UserOperation) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.SimulateUserOperationRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.SimulateUserOperationRequest does not contain field %s", fd.FullName())) } - return "" } -// SchemaResponse is the response type for the Query/Schema RPC method. -type SchemaResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // init_schema defines the schema descriptor for the Init account method. - InitSchema *SchemaResponse_Handler `protobuf:"bytes,1,opt,name=init_schema,json=initSchema,proto3" json:"init_schema,omitempty"` - // execute_handlers defines the schema descriptor for the Execute account method. - ExecuteHandlers []*SchemaResponse_Handler `protobuf:"bytes,2,rep,name=execute_handlers,json=executeHandlers,proto3" json:"execute_handlers,omitempty"` - // query_handlers defines the schema descriptor for the Query account method. - QueryHandlers []*SchemaResponse_Handler `protobuf:"bytes,3,rep,name=query_handlers,json=queryHandlers,proto3" json:"query_handlers,omitempty"` +// 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_SimulateUserOperationRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.v1.SimulateUserOperationRequest.user_operation": + if x.UserOperation == nil { + x.UserOperation = new(UserOperation) + } + return protoreflect.ValueOfMessage(x.UserOperation.ProtoReflect()) + case "cosmos.accounts.v1.SimulateUserOperationRequest.bundler": + panic(fmt.Errorf("field bundler of message cosmos.accounts.v1.SimulateUserOperationRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.SimulateUserOperationRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.SimulateUserOperationRequest does not contain field %s", fd.FullName())) + } } -func (x *SchemaResponse) Reset() { - *x = SchemaResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_v1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +// 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_SimulateUserOperationRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.v1.SimulateUserOperationRequest.bundler": + return protoreflect.ValueOfString("") + case "cosmos.accounts.v1.SimulateUserOperationRequest.user_operation": + m := new(UserOperation) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.SimulateUserOperationRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.SimulateUserOperationRequest does not contain field %s", fd.FullName())) } } -func (x *SchemaResponse) String() string { - return protoimpl.X.MessageStringOf(x) +// 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_SimulateUserOperationRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.v1.SimulateUserOperationRequest", d.FullName())) + } + panic("unreachable") } -func (*SchemaResponse) ProtoMessage() {} - -// Deprecated: Use SchemaResponse.ProtoReflect.Descriptor instead. -func (*SchemaResponse) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_v1_query_proto_rawDescGZIP(), []int{3} +// 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_SimulateUserOperationRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields } -func (x *SchemaResponse) GetInitSchema() *SchemaResponse_Handler { - if x != nil { - return x.InitSchema - } - return nil +// 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_SimulateUserOperationRequest) 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_SimulateUserOperationRequest) 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_SimulateUserOperationRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*SimulateUserOperationRequest) + 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 x.UserOperation != nil { + l = options.Size(x.UserOperation) + 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().(*SimulateUserOperationRequest) + 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.UserOperation != nil { + encoded, err := options.Marshal(x.UserOperation) + 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.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().(*SimulateUserOperationRequest) + 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: SimulateUserOperationRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SimulateUserOperationRequest: 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 UserOperation", 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.UserOperation == nil { + x.UserOperation = &UserOperation{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UserOperation); 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_SimulateUserOperationResponse protoreflect.MessageDescriptor + fd_SimulateUserOperationResponse_user_operation_response protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_v1_query_proto_init() + md_SimulateUserOperationResponse = File_cosmos_accounts_v1_query_proto.Messages().ByName("SimulateUserOperationResponse") + fd_SimulateUserOperationResponse_user_operation_response = md_SimulateUserOperationResponse.Fields().ByName("user_operation_response") +} + +var _ protoreflect.Message = (*fastReflection_SimulateUserOperationResponse)(nil) + +type fastReflection_SimulateUserOperationResponse SimulateUserOperationResponse + +func (x *SimulateUserOperationResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_SimulateUserOperationResponse)(x) +} + +func (x *SimulateUserOperationResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_v1_query_proto_msgTypes[7] + 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_SimulateUserOperationResponse_messageType fastReflection_SimulateUserOperationResponse_messageType +var _ protoreflect.MessageType = fastReflection_SimulateUserOperationResponse_messageType{} + +type fastReflection_SimulateUserOperationResponse_messageType struct{} + +func (x fastReflection_SimulateUserOperationResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_SimulateUserOperationResponse)(nil) +} +func (x fastReflection_SimulateUserOperationResponse_messageType) New() protoreflect.Message { + return new(fastReflection_SimulateUserOperationResponse) +} +func (x fastReflection_SimulateUserOperationResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_SimulateUserOperationResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_SimulateUserOperationResponse) Descriptor() protoreflect.MessageDescriptor { + return md_SimulateUserOperationResponse +} + +// 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_SimulateUserOperationResponse) Type() protoreflect.MessageType { + return _fastReflection_SimulateUserOperationResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_SimulateUserOperationResponse) New() protoreflect.Message { + return new(fastReflection_SimulateUserOperationResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_SimulateUserOperationResponse) Interface() protoreflect.ProtoMessage { + return (*SimulateUserOperationResponse)(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_SimulateUserOperationResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.UserOperationResponse != nil { + value := protoreflect.ValueOfMessage(x.UserOperationResponse.ProtoReflect()) + if !f(fd_SimulateUserOperationResponse_user_operation_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_SimulateUserOperationResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.v1.SimulateUserOperationResponse.user_operation_response": + return x.UserOperationResponse != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.SimulateUserOperationResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.SimulateUserOperationResponse 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_SimulateUserOperationResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.v1.SimulateUserOperationResponse.user_operation_response": + x.UserOperationResponse = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.SimulateUserOperationResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.SimulateUserOperationResponse 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_SimulateUserOperationResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.v1.SimulateUserOperationResponse.user_operation_response": + value := x.UserOperationResponse + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.SimulateUserOperationResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.SimulateUserOperationResponse 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_SimulateUserOperationResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.v1.SimulateUserOperationResponse.user_operation_response": + x.UserOperationResponse = value.Message().Interface().(*UserOperationResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.SimulateUserOperationResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.SimulateUserOperationResponse 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_SimulateUserOperationResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.v1.SimulateUserOperationResponse.user_operation_response": + if x.UserOperationResponse == nil { + x.UserOperationResponse = new(UserOperationResponse) + } + return protoreflect.ValueOfMessage(x.UserOperationResponse.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.SimulateUserOperationResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.SimulateUserOperationResponse 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_SimulateUserOperationResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.v1.SimulateUserOperationResponse.user_operation_response": + m := new(UserOperationResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.v1.SimulateUserOperationResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.v1.SimulateUserOperationResponse 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_SimulateUserOperationResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.v1.SimulateUserOperationResponse", 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_SimulateUserOperationResponse) 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_SimulateUserOperationResponse) 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_SimulateUserOperationResponse) 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_SimulateUserOperationResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*SimulateUserOperationResponse) + 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.UserOperationResponse != nil { + l = options.Size(x.UserOperationResponse) + 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().(*SimulateUserOperationResponse) + 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.UserOperationResponse != nil { + encoded, err := options.Marshal(x.UserOperationResponse) + 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().(*SimulateUserOperationResponse) + 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: SimulateUserOperationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SimulateUserOperationResponse: 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 UserOperationResponse", 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.UserOperationResponse == nil { + x.UserOperationResponse = &UserOperationResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UserOperationResponse); 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/query.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) +) + +// AccountQueryRequest is the request type for the Query/AccountQuery RPC +type AccountQueryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // target defines the account to be queried. + Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` + // request defines the query message being sent to the account. + Request *anypb.Any `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"` +} + +func (x *AccountQueryRequest) Reset() { + *x = AccountQueryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_v1_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccountQueryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountQueryRequest) ProtoMessage() {} + +// Deprecated: Use AccountQueryRequest.ProtoReflect.Descriptor instead. +func (*AccountQueryRequest) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_v1_query_proto_rawDescGZIP(), []int{0} +} + +func (x *AccountQueryRequest) GetTarget() string { + if x != nil { + return x.Target + } + return "" +} + +func (x *AccountQueryRequest) GetRequest() *anypb.Any { + if x != nil { + return x.Request + } + return nil +} + +// AccountQueryResponse is the response type for the Query/AccountQuery RPC method. +type AccountQueryResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // response defines the query response of the account. + Response *anypb.Any `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` +} + +func (x *AccountQueryResponse) Reset() { + *x = AccountQueryResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_v1_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccountQueryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountQueryResponse) ProtoMessage() {} + +// Deprecated: Use AccountQueryResponse.ProtoReflect.Descriptor instead. +func (*AccountQueryResponse) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_v1_query_proto_rawDescGZIP(), []int{1} +} + +func (x *AccountQueryResponse) GetResponse() *anypb.Any { + if x != nil { + return x.Response + } + return nil +} + +// SchemaResponse is the response type for the Query/Schema RPC method. +type SchemaRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // account_type defines the account type to query the schema for. + AccountType string `protobuf:"bytes,1,opt,name=account_type,json=accountType,proto3" json:"account_type,omitempty"` +} + +func (x *SchemaRequest) Reset() { + *x = SchemaRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_v1_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SchemaRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SchemaRequest) ProtoMessage() {} + +// Deprecated: Use SchemaRequest.ProtoReflect.Descriptor instead. +func (*SchemaRequest) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_v1_query_proto_rawDescGZIP(), []int{2} +} + +func (x *SchemaRequest) GetAccountType() string { + if x != nil { + return x.AccountType + } + return "" +} + +// SchemaResponse is the response type for the Query/Schema RPC method. +type SchemaResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // init_schema defines the schema descriptor for the Init account method. + InitSchema *SchemaResponse_Handler `protobuf:"bytes,1,opt,name=init_schema,json=initSchema,proto3" json:"init_schema,omitempty"` + // execute_handlers defines the schema descriptor for the Execute account method. + ExecuteHandlers []*SchemaResponse_Handler `protobuf:"bytes,2,rep,name=execute_handlers,json=executeHandlers,proto3" json:"execute_handlers,omitempty"` + // query_handlers defines the schema descriptor for the Query account method. + QueryHandlers []*SchemaResponse_Handler `protobuf:"bytes,3,rep,name=query_handlers,json=queryHandlers,proto3" json:"query_handlers,omitempty"` +} + +func (x *SchemaResponse) Reset() { + *x = SchemaResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_v1_query_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SchemaResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SchemaResponse) ProtoMessage() {} + +// Deprecated: Use SchemaResponse.ProtoReflect.Descriptor instead. +func (*SchemaResponse) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_v1_query_proto_rawDescGZIP(), []int{3} +} + +func (x *SchemaResponse) GetInitSchema() *SchemaResponse_Handler { + if x != nil { + return x.InitSchema + } + return nil } func (x *SchemaResponse) GetExecuteHandlers() []*SchemaResponse_Handler { @@ -3664,6 +4598,92 @@ func (x *AccountTypeResponse) GetAccountType() string { return "" } +// SimulateUserOperationRequest is the query request used to simulate a +// UserOperation. +type SimulateUserOperationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // bundler can be filled to simulate the address of the bundler. + Bundler string `protobuf:"bytes,1,opt,name=bundler,proto3" json:"bundler,omitempty"` + // user_operation defines the user operation that we want to simulate. + // Gas limit fields are ignored. + UserOperation *UserOperation `protobuf:"bytes,2,opt,name=user_operation,json=userOperation,proto3" json:"user_operation,omitempty"` +} + +func (x *SimulateUserOperationRequest) Reset() { + *x = SimulateUserOperationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_v1_query_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SimulateUserOperationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SimulateUserOperationRequest) ProtoMessage() {} + +// Deprecated: Use SimulateUserOperationRequest.ProtoReflect.Descriptor instead. +func (*SimulateUserOperationRequest) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_v1_query_proto_rawDescGZIP(), []int{6} +} + +func (x *SimulateUserOperationRequest) GetBundler() string { + if x != nil { + return x.Bundler + } + return "" +} + +func (x *SimulateUserOperationRequest) GetUserOperation() *UserOperation { + if x != nil { + return x.UserOperation + } + return nil +} + +// SimulateUserOperationResponse is the query response returned by the simulation. +// It will populate the gas limits fields. +type SimulateUserOperationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // UserOperationResponse is the response of the simulation. + UserOperationResponse *UserOperationResponse `protobuf:"bytes,1,opt,name=user_operation_response,json=userOperationResponse,proto3" json:"user_operation_response,omitempty"` +} + +func (x *SimulateUserOperationResponse) Reset() { + *x = SimulateUserOperationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_v1_query_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SimulateUserOperationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SimulateUserOperationResponse) ProtoMessage() {} + +// Deprecated: Use SimulateUserOperationResponse.ProtoReflect.Descriptor instead. +func (*SimulateUserOperationResponse) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_v1_query_proto_rawDescGZIP(), []int{7} +} + +func (x *SimulateUserOperationResponse) GetUserOperationResponse() *UserOperationResponse { + if x != nil { + return x.UserOperationResponse + } + return nil +} + // Handler defines a schema descriptor for a handler. // Where request and response are names that can be used to lookup the // reflection descriptor. @@ -3681,7 +4701,7 @@ type SchemaResponse_Handler struct { func (x *SchemaResponse_Handler) Reset() { *x = SchemaResponse_Handler{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_v1_query_proto_msgTypes[6] + mi := &file_cosmos_accounts_v1_query_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3719,79 +4739,107 @@ var file_cosmos_accounts_v1_query_proto_rawDesc = []byte{ 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 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, 0x22, - 0x5d, 0x0a, 0x13, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2e, - 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x48, - 0x0a, 0x14, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 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, 0x32, 0x0a, 0x0d, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0xc8, 0x02, 0x0a, - 0x0e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x4b, 0x0a, 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x2c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x62, 0x73, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5d, 0x0a, + 0x13, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2e, 0x0a, 0x07, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x48, 0x0a, 0x14, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 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, 0x32, 0x0a, 0x0d, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0xc8, 0x02, 0x0a, 0x0e, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, + 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x0a, + 0x69, 0x6e, 0x69, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x55, 0x0a, 0x10, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, - 0x52, 0x0a, 0x69, 0x6e, 0x69, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x55, 0x0a, 0x10, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x6c, - 0x65, 0x72, 0x52, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, - 0x65, 0x72, 0x73, 0x12, 0x51, 0x0a, 0x0e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x68, 0x61, 0x6e, - 0x64, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, - 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x0d, 0x71, 0x75, 0x65, 0x72, 0x79, 0x48, 0x61, - 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x1a, 0x3f, 0x0a, 0x07, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, - 0x72, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x0a, 0x12, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x38, 0x0a, 0x13, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, - 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x32, 0xa1, 0x02, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x63, 0x0a, 0x0c, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x27, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x51, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x21, 0x2e, 0x63, 0x6f, 0x73, + 0x52, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, + 0x73, 0x12, 0x51, 0x0a, 0x0e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, + 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x61, + 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x0d, 0x71, 0x75, 0x65, 0x72, 0x79, 0x48, 0x61, 0x6e, 0x64, + 0x6c, 0x65, 0x72, 0x73, 0x1a, 0x3f, 0x0a, 0x07, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, + 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x0a, 0x12, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x38, 0x0a, 0x13, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, + 0x82, 0x01, 0x0a, 0x1c, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 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, 0x48, 0x0a, 0x0e, 0x75, 0x73, + 0x65, 0x72, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x82, 0x01, 0x0a, 0x1d, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, + 0x65, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x17, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, + 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x52, 0x15, 0x75, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa1, 0x03, 0x0a, 0x05, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x12, 0x63, 0x0a, 0x0c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x12, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x60, 0x0a, 0x0b, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x60, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xbe, 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, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 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, + 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7e, 0x0a, + 0x15, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x6d, 0x75, + 0x6c, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, + 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xbe, 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, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 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 ( @@ -3806,34 +4854,42 @@ func file_cosmos_accounts_v1_query_proto_rawDescGZIP() []byte { return file_cosmos_accounts_v1_query_proto_rawDescData } -var file_cosmos_accounts_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_cosmos_accounts_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_cosmos_accounts_v1_query_proto_goTypes = []interface{}{ - (*AccountQueryRequest)(nil), // 0: cosmos.accounts.v1.AccountQueryRequest - (*AccountQueryResponse)(nil), // 1: cosmos.accounts.v1.AccountQueryResponse - (*SchemaRequest)(nil), // 2: cosmos.accounts.v1.SchemaRequest - (*SchemaResponse)(nil), // 3: cosmos.accounts.v1.SchemaResponse - (*AccountTypeRequest)(nil), // 4: cosmos.accounts.v1.AccountTypeRequest - (*AccountTypeResponse)(nil), // 5: cosmos.accounts.v1.AccountTypeResponse - (*SchemaResponse_Handler)(nil), // 6: cosmos.accounts.v1.SchemaResponse.Handler - (*anypb.Any)(nil), // 7: google.protobuf.Any + (*AccountQueryRequest)(nil), // 0: cosmos.accounts.v1.AccountQueryRequest + (*AccountQueryResponse)(nil), // 1: cosmos.accounts.v1.AccountQueryResponse + (*SchemaRequest)(nil), // 2: cosmos.accounts.v1.SchemaRequest + (*SchemaResponse)(nil), // 3: cosmos.accounts.v1.SchemaResponse + (*AccountTypeRequest)(nil), // 4: cosmos.accounts.v1.AccountTypeRequest + (*AccountTypeResponse)(nil), // 5: cosmos.accounts.v1.AccountTypeResponse + (*SimulateUserOperationRequest)(nil), // 6: cosmos.accounts.v1.SimulateUserOperationRequest + (*SimulateUserOperationResponse)(nil), // 7: cosmos.accounts.v1.SimulateUserOperationResponse + (*SchemaResponse_Handler)(nil), // 8: cosmos.accounts.v1.SchemaResponse.Handler + (*anypb.Any)(nil), // 9: google.protobuf.Any + (*UserOperation)(nil), // 10: cosmos.accounts.v1.UserOperation + (*UserOperationResponse)(nil), // 11: cosmos.accounts.v1.UserOperationResponse } var file_cosmos_accounts_v1_query_proto_depIdxs = []int32{ - 7, // 0: cosmos.accounts.v1.AccountQueryRequest.request:type_name -> google.protobuf.Any - 7, // 1: cosmos.accounts.v1.AccountQueryResponse.response:type_name -> google.protobuf.Any - 6, // 2: cosmos.accounts.v1.SchemaResponse.init_schema:type_name -> cosmos.accounts.v1.SchemaResponse.Handler - 6, // 3: cosmos.accounts.v1.SchemaResponse.execute_handlers:type_name -> cosmos.accounts.v1.SchemaResponse.Handler - 6, // 4: cosmos.accounts.v1.SchemaResponse.query_handlers:type_name -> cosmos.accounts.v1.SchemaResponse.Handler - 0, // 5: cosmos.accounts.v1.Query.AccountQuery:input_type -> cosmos.accounts.v1.AccountQueryRequest - 2, // 6: cosmos.accounts.v1.Query.Schema:input_type -> cosmos.accounts.v1.SchemaRequest - 4, // 7: cosmos.accounts.v1.Query.AccountType:input_type -> cosmos.accounts.v1.AccountTypeRequest - 1, // 8: cosmos.accounts.v1.Query.AccountQuery:output_type -> cosmos.accounts.v1.AccountQueryResponse - 3, // 9: cosmos.accounts.v1.Query.Schema:output_type -> cosmos.accounts.v1.SchemaResponse - 5, // 10: cosmos.accounts.v1.Query.AccountType:output_type -> cosmos.accounts.v1.AccountTypeResponse - 8, // [8:11] is the sub-list for method output_type - 5, // [5:8] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 9, // 0: cosmos.accounts.v1.AccountQueryRequest.request:type_name -> google.protobuf.Any + 9, // 1: cosmos.accounts.v1.AccountQueryResponse.response:type_name -> google.protobuf.Any + 8, // 2: cosmos.accounts.v1.SchemaResponse.init_schema:type_name -> cosmos.accounts.v1.SchemaResponse.Handler + 8, // 3: cosmos.accounts.v1.SchemaResponse.execute_handlers:type_name -> cosmos.accounts.v1.SchemaResponse.Handler + 8, // 4: cosmos.accounts.v1.SchemaResponse.query_handlers:type_name -> cosmos.accounts.v1.SchemaResponse.Handler + 10, // 5: cosmos.accounts.v1.SimulateUserOperationRequest.user_operation:type_name -> cosmos.accounts.v1.UserOperation + 11, // 6: cosmos.accounts.v1.SimulateUserOperationResponse.user_operation_response:type_name -> cosmos.accounts.v1.UserOperationResponse + 0, // 7: cosmos.accounts.v1.Query.AccountQuery:input_type -> cosmos.accounts.v1.AccountQueryRequest + 2, // 8: cosmos.accounts.v1.Query.Schema:input_type -> cosmos.accounts.v1.SchemaRequest + 4, // 9: cosmos.accounts.v1.Query.AccountType:input_type -> cosmos.accounts.v1.AccountTypeRequest + 6, // 10: cosmos.accounts.v1.Query.SimulateUserOperation:input_type -> cosmos.accounts.v1.SimulateUserOperationRequest + 1, // 11: cosmos.accounts.v1.Query.AccountQuery:output_type -> cosmos.accounts.v1.AccountQueryResponse + 3, // 12: cosmos.accounts.v1.Query.Schema:output_type -> cosmos.accounts.v1.SchemaResponse + 5, // 13: cosmos.accounts.v1.Query.AccountType:output_type -> cosmos.accounts.v1.AccountTypeResponse + 7, // 14: cosmos.accounts.v1.Query.SimulateUserOperation:output_type -> cosmos.accounts.v1.SimulateUserOperationResponse + 11, // [11:15] is the sub-list for method output_type + 7, // [7:11] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_cosmos_accounts_v1_query_proto_init() } @@ -3841,6 +4897,7 @@ func file_cosmos_accounts_v1_query_proto_init() { if File_cosmos_accounts_v1_query_proto != nil { return } + file_cosmos_accounts_v1_account_abstraction_proto_init() if !protoimpl.UnsafeEnabled { file_cosmos_accounts_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AccountQueryRequest); i { @@ -3915,6 +4972,30 @@ func file_cosmos_accounts_v1_query_proto_init() { } } file_cosmos_accounts_v1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SimulateUserOperationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_v1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SimulateUserOperationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_v1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SchemaResponse_Handler); i { case 0: return &v.state @@ -3933,7 +5014,7 @@ func file_cosmos_accounts_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_accounts_v1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 7, + NumMessages: 9, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/accounts/v1/query_grpc.pb.go b/api/cosmos/accounts/v1/query_grpc.pb.go index e4cec71717ed..7e1b2d97e814 100644 --- a/api/cosmos/accounts/v1/query_grpc.pb.go +++ b/api/cosmos/accounts/v1/query_grpc.pb.go @@ -19,9 +19,10 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Query_AccountQuery_FullMethodName = "/cosmos.accounts.v1.Query/AccountQuery" - Query_Schema_FullMethodName = "/cosmos.accounts.v1.Query/Schema" - Query_AccountType_FullMethodName = "/cosmos.accounts.v1.Query/AccountType" + Query_AccountQuery_FullMethodName = "/cosmos.accounts.v1.Query/AccountQuery" + Query_Schema_FullMethodName = "/cosmos.accounts.v1.Query/Schema" + Query_AccountType_FullMethodName = "/cosmos.accounts.v1.Query/AccountType" + Query_SimulateUserOperation_FullMethodName = "/cosmos.accounts.v1.Query/SimulateUserOperation" ) // QueryClient is the client API for Query service. @@ -34,6 +35,8 @@ type QueryClient interface { Schema(ctx context.Context, in *SchemaRequest, opts ...grpc.CallOption) (*SchemaResponse, error) // AccountType returns the account type for an address. AccountType(ctx context.Context, in *AccountTypeRequest, opts ...grpc.CallOption) (*AccountTypeResponse, error) + // SimulateUserOperation simulates a user operation. + SimulateUserOperation(ctx context.Context, in *SimulateUserOperationRequest, opts ...grpc.CallOption) (*SimulateUserOperationResponse, error) } type queryClient struct { @@ -71,6 +74,15 @@ func (c *queryClient) AccountType(ctx context.Context, in *AccountTypeRequest, o return out, nil } +func (c *queryClient) SimulateUserOperation(ctx context.Context, in *SimulateUserOperationRequest, opts ...grpc.CallOption) (*SimulateUserOperationResponse, error) { + out := new(SimulateUserOperationResponse) + err := c.cc.Invoke(ctx, Query_SimulateUserOperation_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer // for forward compatibility @@ -81,6 +93,8 @@ type QueryServer interface { Schema(context.Context, *SchemaRequest) (*SchemaResponse, error) // AccountType returns the account type for an address. AccountType(context.Context, *AccountTypeRequest) (*AccountTypeResponse, error) + // SimulateUserOperation simulates a user operation. + SimulateUserOperation(context.Context, *SimulateUserOperationRequest) (*SimulateUserOperationResponse, error) mustEmbedUnimplementedQueryServer() } @@ -97,6 +111,9 @@ func (UnimplementedQueryServer) Schema(context.Context, *SchemaRequest) (*Schema func (UnimplementedQueryServer) AccountType(context.Context, *AccountTypeRequest) (*AccountTypeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AccountType not implemented") } +func (UnimplementedQueryServer) SimulateUserOperation(context.Context, *SimulateUserOperationRequest) (*SimulateUserOperationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SimulateUserOperation not implemented") +} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. @@ -164,6 +181,24 @@ func _Query_AccountType_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } +func _Query_SimulateUserOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SimulateUserOperationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SimulateUserOperation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_SimulateUserOperation_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SimulateUserOperation(ctx, req.(*SimulateUserOperationRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Query_ServiceDesc is the grpc.ServiceDesc for Query service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -183,6 +218,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "AccountType", Handler: _Query_AccountType_Handler, }, + { + MethodName: "SimulateUserOperation", + Handler: _Query_SimulateUserOperation_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/accounts/v1/query.proto", diff --git a/proto/cosmos/accounts/v1/query.proto b/proto/cosmos/accounts/v1/query.proto index d2b5d55ccfae..7e779d130870 100644 --- a/proto/cosmos/accounts/v1/query.proto +++ b/proto/cosmos/accounts/v1/query.proto @@ -5,6 +5,7 @@ package cosmos.accounts.v1; option go_package = "cosmossdk.io/x/accounts/v1"; import "google/protobuf/any.proto"; +import "cosmos/accounts/v1/account_abstraction.proto"; // Query defines the Query service for the x/accounts module. service Query { @@ -14,6 +15,8 @@ service Query { rpc Schema(SchemaRequest) returns (SchemaResponse) {}; // AccountType returns the account type for an address. rpc AccountType(AccountTypeRequest) returns (AccountTypeResponse) {}; + // SimulateUserOperation simulates a user operation. + rpc SimulateUserOperation(SimulateUserOperationRequest) returns (SimulateUserOperationResponse) {}; } // AccountQueryRequest is the request type for the Query/AccountQuery RPC @@ -66,3 +69,20 @@ message AccountTypeResponse { // account_type defines the account type for the address. string account_type = 1; } + +// SimulateUserOperationRequest is the query request used to simulate a +// UserOperation. +message SimulateUserOperationRequest { + // bundler can be filled to simulate the address of the bundler. + string bundler = 1; + // user_operation defines the user operation that we want to simulate. + // Gas limit fields are ignored. + UserOperation user_operation = 2; +} + +// SimulateUserOperationResponse is the query response returned by the simulation. +// It will populate the gas limits fields. +message SimulateUserOperationResponse { + // UserOperationResponse is the response of the simulation. + UserOperationResponse user_operation_response = 1; +} \ No newline at end of file diff --git a/tests/e2e/accounts/account_abstraction_test.go b/tests/e2e/accounts/account_abstraction_test.go index 5ddf5043ad61..7a04c91305f8 100644 --- a/tests/e2e/accounts/account_abstraction_test.go +++ b/tests/e2e/accounts/account_abstraction_test.go @@ -327,6 +327,47 @@ func TestAccountAbstraction(t *testing.T) { }) require.Empty(t, resp.Error) // no error }) + + t.Run("Simulate - OK", func(t *testing.T) { + queryServer := accounts.NewQueryServer(ak) + + // gas in unspecified + op := &accountsv1.UserOperation{ + Sender: aaAddrStr, + AuthenticationMethod: "secp256k1", + AuthenticationData: mockSignature, + BundlerPaymentMessages: intoAny(t, &banktypes.MsgSend{ + FromAddress: aaAddrStr, + ToAddress: bundlerAddrStr, + Amount: coins(t, "1stake"), + }), + ExecutionMessages: intoAny(t, &banktypes.MsgSend{ + FromAddress: aaAddrStr, + ToAddress: aliceAddrStr, + Amount: coins(t, "2000stake"), + }), + } + queryResp, err := queryServer.SimulateUserOperation(ctx, &accountsv1.SimulateUserOperationRequest{ + Bundler: bundlerAddrStr, + UserOperation: op, + }) + require.NoError(t, err) + + resp := queryResp.UserOperationResponse + require.Empty(t, resp.Error) // no error + require.Len(t, resp.BundlerPaymentResponses, 1) + require.Len(t, resp.ExecutionResponses, 1) + // assess gas is filled + require.NotZero(t, resp.ExecutionGasUsed) + require.NotZero(t, resp.BundlerPaymentGasUsed) + require.NotZero(t, resp.AuthenticationGasUsed) + }) + + t.Run("Simulate - Fail empty user operation", func(t *testing.T) { + queryServer := accounts.NewQueryServer(ak) + _, err := queryServer.SimulateUserOperation(ctx, &accountsv1.SimulateUserOperationRequest{}) + require.Error(t, err) + }) } func intoAny(t *testing.T, msgs ...gogoproto.Message) (anys []*codectypes.Any) { diff --git a/x/accounts/query_server.go b/x/accounts/query_server.go index cd5930fa808a..8f0ea2e79b2e 100644 --- a/x/accounts/query_server.go +++ b/x/accounts/query_server.go @@ -71,3 +71,27 @@ func (q queryServer) AccountType(ctx context.Context, request *v1.AccountTypeReq AccountType: accType, }, nil } + +const ( + SimulateAuthenticateGasLimit = 1_000_000 + SimulateBundlerPaymentGasLimit = SimulateAuthenticateGasLimit + ExecuteGasLimit = SimulateAuthenticateGasLimit +) + +func (q queryServer) SimulateUserOperation(ctx context.Context, request *v1.SimulateUserOperationRequest) (*v1.SimulateUserOperationResponse, error) { + _, err := q.k.addressCodec.StringToBytes(request.Bundler) + if err != nil { + return nil, err + } + + if request.UserOperation == nil { + return nil, fmt.Errorf("nil user operation") + } + + request.UserOperation.AuthenticationGasLimit = SimulateAuthenticateGasLimit + request.UserOperation.BundlerPaymentGasLimit = SimulateBundlerPaymentGasLimit + request.UserOperation.ExecutionGasLimit = ExecuteGasLimit + + resp := q.k.ExecuteUserOperation(ctx, request.Bundler, request.UserOperation) + return &v1.SimulateUserOperationResponse{UserOperationResponse: resp}, nil +} diff --git a/x/accounts/v1/query.pb.go b/x/accounts/v1/query.pb.go index 5e65ffc45f9a..70aa10ff7a4f 100644 --- a/x/accounts/v1/query.pb.go +++ b/x/accounts/v1/query.pb.go @@ -388,6 +388,110 @@ func (m *AccountTypeResponse) GetAccountType() string { return "" } +// SimulateUserOperationRequest is the query request used to simulate a +// UserOperation. +type SimulateUserOperationRequest struct { + // bundler can be filled to simulate the address of the bundler. + Bundler string `protobuf:"bytes,1,opt,name=bundler,proto3" json:"bundler,omitempty"` + // user_operation defines the user operation that we want to simulate. + // Gas limit fields are ignored. + UserOperation *UserOperation `protobuf:"bytes,2,opt,name=user_operation,json=userOperation,proto3" json:"user_operation,omitempty"` +} + +func (m *SimulateUserOperationRequest) Reset() { *m = SimulateUserOperationRequest{} } +func (m *SimulateUserOperationRequest) String() string { return proto.CompactTextString(m) } +func (*SimulateUserOperationRequest) ProtoMessage() {} +func (*SimulateUserOperationRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_16ad14c22e3080d2, []int{6} +} +func (m *SimulateUserOperationRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SimulateUserOperationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SimulateUserOperationRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SimulateUserOperationRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SimulateUserOperationRequest.Merge(m, src) +} +func (m *SimulateUserOperationRequest) XXX_Size() int { + return m.Size() +} +func (m *SimulateUserOperationRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SimulateUserOperationRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SimulateUserOperationRequest proto.InternalMessageInfo + +func (m *SimulateUserOperationRequest) GetBundler() string { + if m != nil { + return m.Bundler + } + return "" +} + +func (m *SimulateUserOperationRequest) GetUserOperation() *UserOperation { + if m != nil { + return m.UserOperation + } + return nil +} + +// SimulateUserOperationResponse is the query response returned by the simulation. +// It will populate the gas limits fields. +type SimulateUserOperationResponse struct { + // UserOperationResponse is the response of the simulation. + UserOperationResponse *UserOperationResponse `protobuf:"bytes,1,opt,name=user_operation_response,json=userOperationResponse,proto3" json:"user_operation_response,omitempty"` +} + +func (m *SimulateUserOperationResponse) Reset() { *m = SimulateUserOperationResponse{} } +func (m *SimulateUserOperationResponse) String() string { return proto.CompactTextString(m) } +func (*SimulateUserOperationResponse) ProtoMessage() {} +func (*SimulateUserOperationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_16ad14c22e3080d2, []int{7} +} +func (m *SimulateUserOperationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SimulateUserOperationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SimulateUserOperationResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SimulateUserOperationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SimulateUserOperationResponse.Merge(m, src) +} +func (m *SimulateUserOperationResponse) XXX_Size() int { + return m.Size() +} +func (m *SimulateUserOperationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SimulateUserOperationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SimulateUserOperationResponse proto.InternalMessageInfo + +func (m *SimulateUserOperationResponse) GetUserOperationResponse() *UserOperationResponse { + if m != nil { + return m.UserOperationResponse + } + return nil +} + func init() { proto.RegisterType((*AccountQueryRequest)(nil), "cosmos.accounts.v1.AccountQueryRequest") proto.RegisterType((*AccountQueryResponse)(nil), "cosmos.accounts.v1.AccountQueryResponse") @@ -396,41 +500,50 @@ func init() { proto.RegisterType((*SchemaResponse_Handler)(nil), "cosmos.accounts.v1.SchemaResponse.Handler") proto.RegisterType((*AccountTypeRequest)(nil), "cosmos.accounts.v1.AccountTypeRequest") proto.RegisterType((*AccountTypeResponse)(nil), "cosmos.accounts.v1.AccountTypeResponse") + proto.RegisterType((*SimulateUserOperationRequest)(nil), "cosmos.accounts.v1.SimulateUserOperationRequest") + proto.RegisterType((*SimulateUserOperationResponse)(nil), "cosmos.accounts.v1.SimulateUserOperationResponse") } func init() { proto.RegisterFile("cosmos/accounts/v1/query.proto", fileDescriptor_16ad14c22e3080d2) } var fileDescriptor_16ad14c22e3080d2 = []byte{ - // 453 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xbf, 0x8e, 0xd3, 0x40, - 0x10, 0xc6, 0x6d, 0x9f, 0x48, 0x60, 0x7c, 0x77, 0xa0, 0xe5, 0x84, 0x8c, 0x0b, 0x2b, 0xe7, 0x82, - 0x8b, 0x28, 0xd6, 0x5c, 0xa0, 0xa0, 0x43, 0xa1, 0x3a, 0x89, 0x2a, 0x06, 0x1a, 0x24, 0x14, 0x7c, - 0xf6, 0x92, 0x8b, 0xb8, 0x78, 0x1d, 0xef, 0x3a, 0x8a, 0xdf, 0x82, 0x57, 0xe0, 0x6d, 0x52, 0xa6, - 0xa4, 0x44, 0xc9, 0x8b, 0xa0, 0xec, 0x9f, 0xd8, 0x11, 0x21, 0x56, 0x3a, 0xcf, 0xce, 0xb7, 0xbf, - 0xd9, 0x99, 0x6f, 0x12, 0xf0, 0x62, 0xca, 0x26, 0x94, 0x05, 0x51, 0x1c, 0xd3, 0x22, 0xe5, 0x2c, - 0x98, 0x5d, 0x07, 0xd3, 0x82, 0xe4, 0x25, 0xce, 0x72, 0xca, 0x29, 0x42, 0x32, 0x8f, 0x75, 0x1e, - 0xcf, 0xae, 0xdd, 0xe7, 0x23, 0x4a, 0x47, 0xf7, 0x24, 0x10, 0x8a, 0xdb, 0xe2, 0x7b, 0x10, 0xa5, - 0x4a, 0xee, 0x7f, 0x85, 0xa7, 0x7d, 0xa9, 0x1c, 0x6c, 0x20, 0x21, 0x99, 0x16, 0x84, 0x71, 0xf4, - 0x0c, 0x5a, 0x3c, 0xca, 0x47, 0x84, 0x3b, 0x66, 0xc7, 0xec, 0x3e, 0x0a, 0x55, 0x84, 0x30, 0xb4, - 0x73, 0x29, 0x71, 0xac, 0x8e, 0xd9, 0xb5, 0x7b, 0x17, 0x58, 0xb2, 0xb1, 0x66, 0xe3, 0x7e, 0x5a, - 0x86, 0x5a, 0xe4, 0xdf, 0xc0, 0xc5, 0x2e, 0x9e, 0x65, 0x34, 0x65, 0x04, 0xbd, 0x82, 0x87, 0xb9, - 0xfa, 0x16, 0x15, 0xfe, 0x07, 0xda, 0xaa, 0xfc, 0x1e, 0x9c, 0x7d, 0x8c, 0xef, 0xc8, 0x24, 0xd2, - 0x4f, 0xbc, 0x84, 0x53, 0xd5, 0xe3, 0x90, 0x97, 0x19, 0x51, 0x0f, 0xb5, 0xd5, 0xd9, 0xa7, 0x32, - 0x23, 0xfe, 0xc2, 0x82, 0x73, 0x7d, 0x49, 0x15, 0xfe, 0x00, 0xf6, 0x38, 0x1d, 0xf3, 0x21, 0x13, - 0xc7, 0xaa, 0xf6, 0x4b, 0xfc, 0xef, 0xd0, 0xf0, 0xee, 0x45, 0x7c, 0x13, 0xa5, 0xc9, 0x3d, 0xc9, - 0x43, 0xd8, 0x5c, 0x97, 0x39, 0xf4, 0x19, 0x9e, 0x90, 0x39, 0x89, 0x0b, 0x4e, 0x86, 0x77, 0x32, - 0xcd, 0x1c, 0xab, 0x73, 0x72, 0x24, 0xf1, 0xb1, 0x62, 0xa8, 0x98, 0xa1, 0x01, 0x9c, 0x0b, 0x47, - 0x2b, 0xe8, 0xc9, 0xd1, 0xd0, 0x33, 0x41, 0xd0, 0x48, 0xf7, 0x1d, 0xb4, 0xd5, 0x37, 0x72, 0x2a, - 0x0b, 0xe5, 0xc8, 0x74, 0x88, 0xdc, 0x9a, 0x29, 0x96, 0x48, 0x55, 0xe3, 0xc7, 0x80, 0xfa, 0xd5, - 0x64, 0xb5, 0x07, 0x0e, 0xb4, 0xa3, 0x24, 0xc9, 0x09, 0x63, 0x9a, 0xa5, 0x42, 0xff, 0xed, 0x76, - 0xaf, 0xa4, 0x5e, 0x8d, 0xbf, 0xd9, 0xb4, 0xde, 0x2f, 0x0b, 0x1e, 0x88, 0x65, 0x41, 0x31, 0x9c, - 0xd6, 0x97, 0x07, 0x5d, 0xed, 0xeb, 0x7f, 0xcf, 0xf6, 0xba, 0xdd, 0x66, 0xa1, 0x6a, 0xcb, 0x40, - 0x03, 0x68, 0x29, 0x37, 0x2f, 0x0f, 0x8d, 0x57, 0x82, 0xfd, 0x66, 0x07, 0x7c, 0x03, 0x7d, 0x03, - 0xbb, 0xd6, 0x3b, 0x7a, 0x71, 0xe0, 0x35, 0xb5, 0x61, 0xba, 0x57, 0x8d, 0x3a, 0x5d, 0xe1, 0xfd, - 0x9b, 0xc5, 0xca, 0x33, 0x97, 0x2b, 0xcf, 0xfc, 0xb3, 0xf2, 0xcc, 0x9f, 0x6b, 0xcf, 0x58, 0xae, - 0x3d, 0xe3, 0xf7, 0xda, 0x33, 0xbe, 0xb8, 0x92, 0xc1, 0x92, 0x1f, 0x78, 0x4c, 0x83, 0x79, 0xfd, - 0x6f, 0xe2, 0xb6, 0x25, 0x7e, 0x5a, 0xaf, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x95, 0x18, 0x10, - 0x13, 0x43, 0x04, 0x00, 0x00, + // 563 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcd, 0x8e, 0x12, 0x41, + 0x10, 0x66, 0xd8, 0x08, 0x5a, 0x2c, 0x68, 0xda, 0x5d, 0xc5, 0x89, 0x4e, 0x60, 0x0e, 0x2e, 0x1a, + 0xd3, 0xb3, 0xa0, 0x07, 0x6f, 0x06, 0x4f, 0x24, 0x1e, 0x0c, 0xac, 0x7b, 0x31, 0x31, 0xd8, 0x0c, + 0x2d, 0x4b, 0x84, 0x69, 0xb6, 0x7f, 0x36, 0xcb, 0xc5, 0x83, 0x4f, 0xe0, 0x2b, 0xf8, 0x36, 0x7b, + 0xdc, 0xa3, 0x47, 0x03, 0x2f, 0x62, 0x98, 0xee, 0x86, 0x41, 0x67, 0x41, 0x6e, 0x53, 0x5d, 0x5f, + 0x7d, 0x5f, 0x75, 0xd5, 0xd7, 0x03, 0x5e, 0xc8, 0xc4, 0x98, 0x89, 0x80, 0x84, 0x21, 0x53, 0x91, + 0x14, 0xc1, 0x45, 0x3d, 0x38, 0x57, 0x94, 0x4f, 0xf1, 0x84, 0x33, 0xc9, 0x10, 0xd2, 0x79, 0x6c, + 0xf3, 0xf8, 0xa2, 0xee, 0x3e, 0x1a, 0x30, 0x36, 0x18, 0xd1, 0x20, 0x46, 0xf4, 0xd4, 0x97, 0x80, + 0x44, 0x06, 0xee, 0xbe, 0x48, 0xa1, 0x33, 0xdf, 0x5d, 0xd2, 0x13, 0x92, 0x93, 0x50, 0x0e, 0x59, + 0xa4, 0xd1, 0xfe, 0x27, 0xb8, 0xdf, 0xd4, 0xc9, 0xf6, 0x42, 0xb2, 0x43, 0xcf, 0x15, 0x15, 0x12, + 0x3d, 0x80, 0x9c, 0x24, 0x7c, 0x40, 0x65, 0xd9, 0xa9, 0x38, 0xb5, 0x3b, 0x1d, 0x13, 0x21, 0x0c, + 0x79, 0xae, 0x21, 0xe5, 0x6c, 0xc5, 0xa9, 0x15, 0x1a, 0x07, 0x58, 0x77, 0x82, 0x6d, 0x27, 0xb8, + 0x19, 0x4d, 0x3b, 0x16, 0xe4, 0xb7, 0xe0, 0x60, 0x9d, 0x5e, 0x4c, 0x58, 0x24, 0x28, 0x3a, 0x86, + 0xdb, 0xdc, 0x7c, 0xc7, 0x0a, 0x37, 0x11, 0x2d, 0x51, 0x7e, 0x03, 0x8a, 0x27, 0xe1, 0x19, 0x1d, + 0x13, 0xdb, 0x62, 0x15, 0xf6, 0xed, 0xb5, 0xe4, 0x74, 0x42, 0x4d, 0xa3, 0x05, 0x73, 0xf6, 0x61, + 0x3a, 0xa1, 0xfe, 0x55, 0x16, 0x4a, 0xb6, 0xc8, 0x08, 0xbf, 0x83, 0xc2, 0x30, 0x1a, 0xca, 0xae, + 0x88, 0x8f, 0x8d, 0xf6, 0x73, 0xfc, 0xef, 0x88, 0xf1, 0x7a, 0x21, 0x6e, 0x91, 0xa8, 0x3f, 0xa2, + 0xbc, 0x03, 0x8b, 0x72, 0x9d, 0x43, 0xa7, 0x70, 0x8f, 0x5e, 0xd2, 0x50, 0x49, 0xda, 0x3d, 0xd3, + 0x69, 0x51, 0xce, 0x56, 0xf6, 0x76, 0x64, 0xbc, 0x6b, 0x38, 0x4c, 0x2c, 0x50, 0x1b, 0x4a, 0xf1, + 0xfe, 0x57, 0xa4, 0x7b, 0x3b, 0x93, 0x16, 0x63, 0x06, 0x4b, 0xe9, 0xbe, 0x81, 0xbc, 0xf9, 0x46, + 0xe5, 0xd5, 0x0a, 0xf5, 0xc8, 0x6c, 0x88, 0xdc, 0xc4, 0x52, 0xb2, 0x71, 0x6a, 0x35, 0x7e, 0x0c, + 0xa8, 0xb9, 0x9a, 0xac, 0xdd, 0x41, 0x19, 0xf2, 0xa4, 0xdf, 0xe7, 0x54, 0x08, 0xcb, 0x65, 0x42, + 0xff, 0xf5, 0xd2, 0x57, 0x1a, 0x6f, 0xc6, 0xff, 0x1f, 0x4b, 0xfb, 0xee, 0xc0, 0xe3, 0x93, 0xe1, + 0x58, 0x8d, 0x88, 0xa4, 0xa7, 0x82, 0xf2, 0xf7, 0x13, 0xca, 0xc9, 0xc2, 0xb1, 0x09, 0xd1, 0x9e, + 0x8a, 0xef, 0x62, 0x45, 0x4d, 0x88, 0x5a, 0x50, 0x52, 0x82, 0xf2, 0x2e, 0xb3, 0x25, 0xc6, 0xa4, + 0xd5, 0xb4, 0xc1, 0xad, 0x73, 0x17, 0x55, 0x32, 0x5c, 0x34, 0xf1, 0xe4, 0x86, 0x26, 0xcc, 0x4d, + 0x08, 0x3c, 0x5c, 0xd7, 0xea, 0xfe, 0x65, 0xe8, 0x67, 0xdb, 0x45, 0x4d, 0x41, 0xe7, 0x50, 0xa5, + 0x1d, 0x37, 0x7e, 0xee, 0xc1, 0xad, 0xf8, 0xd9, 0xa0, 0x10, 0xf6, 0x93, 0xcf, 0x08, 0x1d, 0xa5, + 0x71, 0xa7, 0xbc, 0x63, 0xb7, 0xb6, 0x1d, 0x68, 0x16, 0x9c, 0x41, 0x6d, 0xc8, 0x19, 0x5f, 0x57, + 0x37, 0x19, 0x4d, 0x13, 0xfb, 0xdb, 0xbd, 0xe8, 0x67, 0xd0, 0x67, 0x28, 0x24, 0x5c, 0x80, 0x9e, + 0x6e, 0xe8, 0x26, 0x61, 0x2b, 0xf7, 0x68, 0x2b, 0x6e, 0xa9, 0xf0, 0x0d, 0x0e, 0x53, 0xf7, 0x84, + 0x8e, 0x53, 0x1b, 0xdc, 0xe0, 0x2b, 0xb7, 0xbe, 0x43, 0x85, 0xd5, 0x7f, 0xfb, 0xea, 0x6a, 0xe6, + 0x39, 0xd7, 0x33, 0xcf, 0xf9, 0x3d, 0xf3, 0x9c, 0x1f, 0x73, 0x2f, 0x73, 0x3d, 0xf7, 0x32, 0xbf, + 0xe6, 0x5e, 0xe6, 0xa3, 0xab, 0xd9, 0x44, 0xff, 0x2b, 0x1e, 0xb2, 0xe0, 0x32, 0xf9, 0x3f, 0xee, + 0xe5, 0xe2, 0x9f, 0xdc, 0xcb, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x77, 0xb6, 0x2c, 0xc3, 0xfb, + 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -451,6 +564,8 @@ type QueryClient interface { Schema(ctx context.Context, in *SchemaRequest, opts ...grpc.CallOption) (*SchemaResponse, error) // AccountType returns the account type for an address. AccountType(ctx context.Context, in *AccountTypeRequest, opts ...grpc.CallOption) (*AccountTypeResponse, error) + // SimulateUserOperation simulates a user operation. + SimulateUserOperation(ctx context.Context, in *SimulateUserOperationRequest, opts ...grpc.CallOption) (*SimulateUserOperationResponse, error) } type queryClient struct { @@ -488,6 +603,15 @@ func (c *queryClient) AccountType(ctx context.Context, in *AccountTypeRequest, o return out, nil } +func (c *queryClient) SimulateUserOperation(ctx context.Context, in *SimulateUserOperationRequest, opts ...grpc.CallOption) (*SimulateUserOperationResponse, error) { + out := new(SimulateUserOperationResponse) + err := c.cc.Invoke(ctx, "/cosmos.accounts.v1.Query/SimulateUserOperation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // AccountQuery runs an account query. @@ -496,6 +620,8 @@ type QueryServer interface { Schema(context.Context, *SchemaRequest) (*SchemaResponse, error) // AccountType returns the account type for an address. AccountType(context.Context, *AccountTypeRequest) (*AccountTypeResponse, error) + // SimulateUserOperation simulates a user operation. + SimulateUserOperation(context.Context, *SimulateUserOperationRequest) (*SimulateUserOperationResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -511,6 +637,9 @@ func (*UnimplementedQueryServer) Schema(ctx context.Context, req *SchemaRequest) func (*UnimplementedQueryServer) AccountType(ctx context.Context, req *AccountTypeRequest) (*AccountTypeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AccountType not implemented") } +func (*UnimplementedQueryServer) SimulateUserOperation(ctx context.Context, req *SimulateUserOperationRequest) (*SimulateUserOperationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SimulateUserOperation not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -570,6 +699,24 @@ func _Query_AccountType_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } +func _Query_SimulateUserOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SimulateUserOperationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SimulateUserOperation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.accounts.v1.Query/SimulateUserOperation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SimulateUserOperation(ctx, req.(*SimulateUserOperationRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.accounts.v1.Query", HandlerType: (*QueryServer)(nil), @@ -586,6 +733,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "AccountType", Handler: _Query_AccountType_Handler, }, + { + MethodName: "SimulateUserOperation", + Handler: _Query_SimulateUserOperation_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/accounts/v1/query.proto", @@ -858,6 +1009,83 @@ func (m *AccountTypeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *SimulateUserOperationRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SimulateUserOperationRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SimulateUserOperationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.UserOperation != nil { + { + size, err := m.UserOperation.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Bundler) > 0 { + i -= len(m.Bundler) + copy(dAtA[i:], m.Bundler) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Bundler))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SimulateUserOperationResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SimulateUserOperationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SimulateUserOperationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.UserOperationResponse != nil { + { + size, err := m.UserOperationResponse.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -980,6 +1208,36 @@ func (m *AccountTypeResponse) Size() (n int) { return n } +func (m *SimulateUserOperationRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Bundler) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.UserOperation != nil { + l = m.UserOperation.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *SimulateUserOperationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.UserOperationResponse != nil { + l = m.UserOperationResponse.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1704,6 +1962,210 @@ func (m *AccountTypeResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *SimulateUserOperationRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SimulateUserOperationRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SimulateUserOperationRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bundler", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bundler = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserOperation", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.UserOperation == nil { + m.UserOperation = &UserOperation{} + } + if err := m.UserOperation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SimulateUserOperationResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SimulateUserOperationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SimulateUserOperationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserOperationResponse", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.UserOperationResponse == nil { + m.UserOperationResponse = &UserOperationResponse{} + } + if err := m.UserOperationResponse.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0