From 81bbd022402ee0cee1e7d3fb581c3a0fed172212 Mon Sep 17 00:00:00 2001 From: beer-1 <147697694+beer-1@users.noreply.github.com> Date: Tue, 9 Apr 2024 19:05:48 +0900 Subject: [PATCH] add cli --- api/minievm/evm/v1/auth.pulsar.go | 614 +++++++++- api/minievm/evm/v1/query.pulsar.go | 1313 +++++++++++++++----- api/minievm/evm/v1/tx.pulsar.go | 1339 +++++++++++++++++++-- api/minievm/evm/v1/tx_grpc.pb.go | 43 +- proto/minievm/evm/v1/query.proto | 15 +- x/evm/autocli.go | 88 ++ x/evm/client/cli/flags.go | 23 + x/evm/client/cli/query.go | 108 ++ x/evm/client/cli/tx.go | 200 +++ x/evm/config/config.go | 32 - x/evm/contracts/counter/Counter.go | 2 +- x/evm/contracts/i_cosmos/ICosmos.go | 44 +- x/evm/contracts/i_cosmos/ICosmos.sol | 11 +- x/evm/keeper/context_test.go | 128 -- x/evm/keeper/precompiles.go | 9 +- x/evm/keeper/precompiles_test.go | 201 ++++ x/evm/keeper/query_server.go | 10 +- x/evm/keeper/query_server_test.go | 2 +- x/evm/module.go | 11 +- x/evm/precompiles/cosmos/contract.go | 52 +- x/evm/precompiles/cosmos/contract_test.go | 119 +- x/evm/precompiles/cosmos/types.go | 21 + x/evm/types/denom.go | 6 +- x/evm/types/query.pb.go | 422 +++++-- 24 files changed, 4166 insertions(+), 647 deletions(-) create mode 100644 x/evm/client/cli/flags.go create mode 100644 x/evm/client/cli/query.go create mode 100644 x/evm/client/cli/tx.go create mode 100644 x/evm/keeper/precompiles_test.go diff --git a/api/minievm/evm/v1/auth.pulsar.go b/api/minievm/evm/v1/auth.pulsar.go index 724f89b..cdc3a06 100644 --- a/api/minievm/evm/v1/auth.pulsar.go +++ b/api/minievm/evm/v1/auth.pulsar.go @@ -450,6 +450,505 @@ func (x *fastReflection_ContractAccount) ProtoMethods() *protoiface.Methods { } } +var ( + md_ShorthandAccount protoreflect.MessageDescriptor + fd_ShorthandAccount_base_account protoreflect.FieldDescriptor + fd_ShorthandAccount_original_address protoreflect.FieldDescriptor +) + +func init() { + file_minievm_evm_v1_auth_proto_init() + md_ShorthandAccount = File_minievm_evm_v1_auth_proto.Messages().ByName("ShorthandAccount") + fd_ShorthandAccount_base_account = md_ShorthandAccount.Fields().ByName("base_account") + fd_ShorthandAccount_original_address = md_ShorthandAccount.Fields().ByName("original_address") +} + +var _ protoreflect.Message = (*fastReflection_ShorthandAccount)(nil) + +type fastReflection_ShorthandAccount ShorthandAccount + +func (x *ShorthandAccount) ProtoReflect() protoreflect.Message { + return (*fastReflection_ShorthandAccount)(x) +} + +func (x *ShorthandAccount) slowProtoReflect() protoreflect.Message { + mi := &file_minievm_evm_v1_auth_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ShorthandAccount_messageType fastReflection_ShorthandAccount_messageType +var _ protoreflect.MessageType = fastReflection_ShorthandAccount_messageType{} + +type fastReflection_ShorthandAccount_messageType struct{} + +func (x fastReflection_ShorthandAccount_messageType) Zero() protoreflect.Message { + return (*fastReflection_ShorthandAccount)(nil) +} +func (x fastReflection_ShorthandAccount_messageType) New() protoreflect.Message { + return new(fastReflection_ShorthandAccount) +} +func (x fastReflection_ShorthandAccount_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ShorthandAccount +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ShorthandAccount) Descriptor() protoreflect.MessageDescriptor { + return md_ShorthandAccount +} + +// 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_ShorthandAccount) Type() protoreflect.MessageType { + return _fastReflection_ShorthandAccount_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ShorthandAccount) New() protoreflect.Message { + return new(fastReflection_ShorthandAccount) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ShorthandAccount) Interface() protoreflect.ProtoMessage { + return (*ShorthandAccount)(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_ShorthandAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.BaseAccount != nil { + value := protoreflect.ValueOfMessage(x.BaseAccount.ProtoReflect()) + if !f(fd_ShorthandAccount_base_account, value) { + return + } + } + if x.OriginalAddress != "" { + value := protoreflect.ValueOfString(x.OriginalAddress) + if !f(fd_ShorthandAccount_original_address, 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_ShorthandAccount) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "minievm.evm.v1.ShorthandAccount.base_account": + return x.BaseAccount != nil + case "minievm.evm.v1.ShorthandAccount.original_address": + return x.OriginalAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.ShorthandAccount")) + } + panic(fmt.Errorf("message minievm.evm.v1.ShorthandAccount 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_ShorthandAccount) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "minievm.evm.v1.ShorthandAccount.base_account": + x.BaseAccount = nil + case "minievm.evm.v1.ShorthandAccount.original_address": + x.OriginalAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.ShorthandAccount")) + } + panic(fmt.Errorf("message minievm.evm.v1.ShorthandAccount 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_ShorthandAccount) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "minievm.evm.v1.ShorthandAccount.base_account": + value := x.BaseAccount + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "minievm.evm.v1.ShorthandAccount.original_address": + value := x.OriginalAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.ShorthandAccount")) + } + panic(fmt.Errorf("message minievm.evm.v1.ShorthandAccount 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_ShorthandAccount) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "minievm.evm.v1.ShorthandAccount.base_account": + x.BaseAccount = value.Message().Interface().(*v1beta1.BaseAccount) + case "minievm.evm.v1.ShorthandAccount.original_address": + x.OriginalAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.ShorthandAccount")) + } + panic(fmt.Errorf("message minievm.evm.v1.ShorthandAccount 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_ShorthandAccount) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "minievm.evm.v1.ShorthandAccount.base_account": + if x.BaseAccount == nil { + x.BaseAccount = new(v1beta1.BaseAccount) + } + return protoreflect.ValueOfMessage(x.BaseAccount.ProtoReflect()) + case "minievm.evm.v1.ShorthandAccount.original_address": + panic(fmt.Errorf("field original_address of message minievm.evm.v1.ShorthandAccount is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.ShorthandAccount")) + } + panic(fmt.Errorf("message minievm.evm.v1.ShorthandAccount 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_ShorthandAccount) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "minievm.evm.v1.ShorthandAccount.base_account": + m := new(v1beta1.BaseAccount) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "minievm.evm.v1.ShorthandAccount.original_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.ShorthandAccount")) + } + panic(fmt.Errorf("message minievm.evm.v1.ShorthandAccount 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_ShorthandAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in minievm.evm.v1.ShorthandAccount", 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_ShorthandAccount) 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_ShorthandAccount) 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_ShorthandAccount) 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_ShorthandAccount) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ShorthandAccount) + 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.BaseAccount != nil { + l = options.Size(x.BaseAccount) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.OriginalAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ShorthandAccount) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.OriginalAddress) > 0 { + i -= len(x.OriginalAddress) + copy(dAtA[i:], x.OriginalAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginalAddress))) + i-- + dAtA[i] = 0x12 + } + if x.BaseAccount != nil { + encoded, err := options.Marshal(x.BaseAccount) + 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().(*ShorthandAccount) + 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: ShorthandAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ShorthandAccount: 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 BaseAccount", 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.BaseAccount == nil { + x.BaseAccount = &v1beta1.BaseAccount{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BaseAccount); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OriginalAddress", 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.OriginalAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -463,7 +962,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// ContractAccount defines an account for contract account. +// ContractAccount defines an account of contract. type ContractAccount struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -499,6 +998,54 @@ func (x *ContractAccount) GetBaseAccount() *v1beta1.BaseAccount { return nil } +// ShorthandAccount defines an account of shorthand address +// which is used to store the original long address (32bytes). +// +// Also it is used to check the existence of the account before +// creating a new account. +type ShorthandAccount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BaseAccount *v1beta1.BaseAccount `protobuf:"bytes,1,opt,name=base_account,json=baseAccount,proto3" json:"base_account,omitempty"` + OriginalAddress string `protobuf:"bytes,2,opt,name=original_address,json=originalAddress,proto3" json:"original_address,omitempty"` +} + +func (x *ShorthandAccount) Reset() { + *x = ShorthandAccount{} + if protoimpl.UnsafeEnabled { + mi := &file_minievm_evm_v1_auth_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ShorthandAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ShorthandAccount) ProtoMessage() {} + +// Deprecated: Use ShorthandAccount.ProtoReflect.Descriptor instead. +func (*ShorthandAccount) Descriptor() ([]byte, []int) { + return file_minievm_evm_v1_auth_proto_rawDescGZIP(), []int{1} +} + +func (x *ShorthandAccount) GetBaseAccount() *v1beta1.BaseAccount { + if x != nil { + return x.BaseAccount + } + return nil +} + +func (x *ShorthandAccount) GetOriginalAddress() string { + if x != nil { + return x.OriginalAddress + } + return "" +} + var File_minievm_evm_v1_auth_proto protoreflect.FileDescriptor var file_minievm_evm_v1_auth_proto_rawDesc = []byte{ @@ -517,17 +1064,28 @@ var file_minievm_evm_v1_auth_proto_rawDesc = []byte{ 0x04, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x0b, 0x62, 0x61, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x1c, 0x88, 0xa0, 0x1f, 0x00, 0x8a, 0xe7, 0xb0, 0x2a, 0x13, 0x65, 0x76, 0x6d, 0x2f, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x42, 0xa0, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, - 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, - 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2f, 0x65, - 0x76, 0x6d, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x76, 0x6d, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x45, - 0x58, 0xaa, 0x02, 0x0e, 0x4d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x45, 0x76, 0x6d, 0x2e, - 0x56, 0x31, 0xca, 0x02, 0x0e, 0x4d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x5c, 0x45, 0x76, 0x6d, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1a, 0x4d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x5c, 0x45, 0x76, - 0x6d, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x10, 0x4d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x3a, 0x3a, 0x45, 0x76, 0x6d, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0xa7, 0x01, 0x0a, 0x10, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x68, 0x61, 0x6e, 0x64, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x0c, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x04, 0xd0, + 0xde, 0x1f, 0x01, 0x52, 0x0b, 0x62, 0x61, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x29, 0x0a, 0x10, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x1d, 0x88, 0xa0, 0x1f, + 0x00, 0x8a, 0xe7, 0xb0, 0x2a, 0x14, 0x65, 0x76, 0x6d, 0x2f, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x68, + 0x61, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0xa0, 0x01, 0x0a, 0x12, 0x63, + 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, + 0x31, 0x42, 0x09, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x25, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x76, 0x31, 0x3b, + 0x65, 0x76, 0x6d, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x45, 0x58, 0xaa, 0x02, 0x0e, 0x4d, 0x69, + 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x45, 0x76, 0x6d, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0e, 0x4d, + 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x5c, 0x45, 0x76, 0x6d, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1a, + 0x4d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x5c, 0x45, 0x76, 0x6d, 0x5c, 0x56, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x4d, 0x69, 0x6e, + 0x69, 0x65, 0x76, 0x6d, 0x3a, 0x3a, 0x45, 0x76, 0x6d, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -542,18 +1100,20 @@ func file_minievm_evm_v1_auth_proto_rawDescGZIP() []byte { return file_minievm_evm_v1_auth_proto_rawDescData } -var file_minievm_evm_v1_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_minievm_evm_v1_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_minievm_evm_v1_auth_proto_goTypes = []interface{}{ (*ContractAccount)(nil), // 0: minievm.evm.v1.ContractAccount - (*v1beta1.BaseAccount)(nil), // 1: cosmos.auth.v1beta1.BaseAccount + (*ShorthandAccount)(nil), // 1: minievm.evm.v1.ShorthandAccount + (*v1beta1.BaseAccount)(nil), // 2: cosmos.auth.v1beta1.BaseAccount } var file_minievm_evm_v1_auth_proto_depIdxs = []int32{ - 1, // 0: minievm.evm.v1.ContractAccount.base_account:type_name -> cosmos.auth.v1beta1.BaseAccount - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 2, // 0: minievm.evm.v1.ContractAccount.base_account:type_name -> cosmos.auth.v1beta1.BaseAccount + 2, // 1: minievm.evm.v1.ShorthandAccount.base_account:type_name -> cosmos.auth.v1beta1.BaseAccount + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_minievm_evm_v1_auth_proto_init() } @@ -574,6 +1134,18 @@ func file_minievm_evm_v1_auth_proto_init() { return nil } } + file_minievm_evm_v1_auth_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ShorthandAccount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -581,7 +1153,7 @@ func file_minievm_evm_v1_auth_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_minievm_evm_v1_auth_proto_rawDesc, NumEnums: 0, - NumMessages: 1, + NumMessages: 2, NumExtensions: 0, NumServices: 0, }, diff --git a/api/minievm/evm/v1/query.pulsar.go b/api/minievm/evm/v1/query.pulsar.go index cb32d79..99cf8be 100644 --- a/api/minievm/evm/v1/query.pulsar.go +++ b/api/minievm/evm/v1/query.pulsar.go @@ -511,8 +511,8 @@ func (x *fastReflection_QueryCodeResponse) Interface() protoreflect.ProtoMessage // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryCodeResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Code) != 0 { - value := protoreflect.ValueOfBytes(x.Code) + if x.Code != "" { + value := protoreflect.ValueOfString(x.Code) if !f(fd_QueryCodeResponse_code, value) { return } @@ -533,7 +533,7 @@ func (x *fastReflection_QueryCodeResponse) Range(f func(protoreflect.FieldDescri func (x *fastReflection_QueryCodeResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "minievm.evm.v1.QueryCodeResponse.code": - return len(x.Code) != 0 + return x.Code != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.QueryCodeResponse")) @@ -551,7 +551,7 @@ func (x *fastReflection_QueryCodeResponse) Has(fd protoreflect.FieldDescriptor) func (x *fastReflection_QueryCodeResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "minievm.evm.v1.QueryCodeResponse.code": - x.Code = nil + x.Code = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.QueryCodeResponse")) @@ -570,7 +570,7 @@ func (x *fastReflection_QueryCodeResponse) Get(descriptor protoreflect.FieldDesc switch descriptor.FullName() { case "minievm.evm.v1.QueryCodeResponse.code": value := x.Code - return protoreflect.ValueOfBytes(value) + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.QueryCodeResponse")) @@ -592,7 +592,7 @@ func (x *fastReflection_QueryCodeResponse) Get(descriptor protoreflect.FieldDesc func (x *fastReflection_QueryCodeResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "minievm.evm.v1.QueryCodeResponse.code": - x.Code = value.Bytes() + x.Code = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.QueryCodeResponse")) @@ -629,7 +629,7 @@ func (x *fastReflection_QueryCodeResponse) Mutable(fd protoreflect.FieldDescript func (x *fastReflection_QueryCodeResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "minievm.evm.v1.QueryCodeResponse.code": - return protoreflect.ValueOfBytes(nil) + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.QueryCodeResponse")) @@ -792,7 +792,7 @@ func (x *fastReflection_QueryCodeResponse) ProtoMethods() *protoiface.Methods { if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -802,25 +802,23 @@ func (x *fastReflection_QueryCodeResponse) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + byteLen + 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.Code = append(x.Code[:0], dAtA[iNdEx:postIndex]...) - if x.Code == nil { - x.Code = []byte{} - } + x.Code = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1766,7 +1764,7 @@ var ( fd_QueryCallRequest_sender protoreflect.FieldDescriptor fd_QueryCallRequest_contract_addr protoreflect.FieldDescriptor fd_QueryCallRequest_input protoreflect.FieldDescriptor - fd_QueryCallRequest_with_trace protoreflect.FieldDescriptor + fd_QueryCallRequest_trace_options protoreflect.FieldDescriptor ) func init() { @@ -1775,7 +1773,7 @@ func init() { fd_QueryCallRequest_sender = md_QueryCallRequest.Fields().ByName("sender") fd_QueryCallRequest_contract_addr = md_QueryCallRequest.Fields().ByName("contract_addr") fd_QueryCallRequest_input = md_QueryCallRequest.Fields().ByName("input") - fd_QueryCallRequest_with_trace = md_QueryCallRequest.Fields().ByName("with_trace") + fd_QueryCallRequest_trace_options = md_QueryCallRequest.Fields().ByName("trace_options") } var _ protoreflect.Message = (*fastReflection_QueryCallRequest)(nil) @@ -1861,9 +1859,9 @@ func (x *fastReflection_QueryCallRequest) Range(f func(protoreflect.FieldDescrip return } } - if x.WithTrace != false { - value := protoreflect.ValueOfBool(x.WithTrace) - if !f(fd_QueryCallRequest_with_trace, value) { + if x.TraceOptions != nil { + value := protoreflect.ValueOfMessage(x.TraceOptions.ProtoReflect()) + if !f(fd_QueryCallRequest_trace_options, value) { return } } @@ -1888,8 +1886,8 @@ func (x *fastReflection_QueryCallRequest) Has(fd protoreflect.FieldDescriptor) b return x.ContractAddr != "" case "minievm.evm.v1.QueryCallRequest.input": return x.Input != "" - case "minievm.evm.v1.QueryCallRequest.with_trace": - return x.WithTrace != false + case "minievm.evm.v1.QueryCallRequest.trace_options": + return x.TraceOptions != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.QueryCallRequest")) @@ -1912,8 +1910,8 @@ func (x *fastReflection_QueryCallRequest) Clear(fd protoreflect.FieldDescriptor) x.ContractAddr = "" case "minievm.evm.v1.QueryCallRequest.input": x.Input = "" - case "minievm.evm.v1.QueryCallRequest.with_trace": - x.WithTrace = false + case "minievm.evm.v1.QueryCallRequest.trace_options": + x.TraceOptions = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.QueryCallRequest")) @@ -1939,9 +1937,9 @@ func (x *fastReflection_QueryCallRequest) Get(descriptor protoreflect.FieldDescr case "minievm.evm.v1.QueryCallRequest.input": value := x.Input return protoreflect.ValueOfString(value) - case "minievm.evm.v1.QueryCallRequest.with_trace": - value := x.WithTrace - return protoreflect.ValueOfBool(value) + case "minievm.evm.v1.QueryCallRequest.trace_options": + value := x.TraceOptions + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.QueryCallRequest")) @@ -1968,8 +1966,8 @@ func (x *fastReflection_QueryCallRequest) Set(fd protoreflect.FieldDescriptor, v x.ContractAddr = value.Interface().(string) case "minievm.evm.v1.QueryCallRequest.input": x.Input = value.Interface().(string) - case "minievm.evm.v1.QueryCallRequest.with_trace": - x.WithTrace = value.Bool() + case "minievm.evm.v1.QueryCallRequest.trace_options": + x.TraceOptions = value.Message().Interface().(*TraceOptions) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.QueryCallRequest")) @@ -1990,14 +1988,17 @@ func (x *fastReflection_QueryCallRequest) Set(fd protoreflect.FieldDescriptor, v // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryCallRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "minievm.evm.v1.QueryCallRequest.trace_options": + if x.TraceOptions == nil { + x.TraceOptions = new(TraceOptions) + } + return protoreflect.ValueOfMessage(x.TraceOptions.ProtoReflect()) case "minievm.evm.v1.QueryCallRequest.sender": panic(fmt.Errorf("field sender of message minievm.evm.v1.QueryCallRequest is not mutable")) case "minievm.evm.v1.QueryCallRequest.contract_addr": panic(fmt.Errorf("field contract_addr of message minievm.evm.v1.QueryCallRequest is not mutable")) case "minievm.evm.v1.QueryCallRequest.input": panic(fmt.Errorf("field input of message minievm.evm.v1.QueryCallRequest is not mutable")) - case "minievm.evm.v1.QueryCallRequest.with_trace": - panic(fmt.Errorf("field with_trace of message minievm.evm.v1.QueryCallRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.QueryCallRequest")) @@ -2017,8 +2018,9 @@ func (x *fastReflection_QueryCallRequest) NewField(fd protoreflect.FieldDescript return protoreflect.ValueOfString("") case "minievm.evm.v1.QueryCallRequest.input": return protoreflect.ValueOfString("") - case "minievm.evm.v1.QueryCallRequest.with_trace": - return protoreflect.ValueOfBool(false) + case "minievm.evm.v1.QueryCallRequest.trace_options": + m := new(TraceOptions) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.QueryCallRequest")) @@ -2088,19 +2090,639 @@ func (x *fastReflection_QueryCallRequest) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Sender) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + l = len(x.Sender) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ContractAddr) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Input) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.TraceOptions != nil { + l = options.Size(x.TraceOptions) + 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().(*QueryCallRequest) + 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.TraceOptions != nil { + encoded, err := options.Marshal(x.TraceOptions) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + if len(x.Input) > 0 { + i -= len(x.Input) + copy(dAtA[i:], x.Input) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Input))) + i-- + dAtA[i] = 0x1a + } + if len(x.ContractAddr) > 0 { + i -= len(x.ContractAddr) + copy(dAtA[i:], x.ContractAddr) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ContractAddr))) + i-- + dAtA[i] = 0x12 + } + if len(x.Sender) > 0 { + i -= len(x.Sender) + copy(dAtA[i:], x.Sender) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryCallRequest) + 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: QueryCallRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCallRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ContractAddr", 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.ContractAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Input", 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.Input = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TraceOptions", 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.TraceOptions == nil { + x.TraceOptions = &TraceOptions{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TraceOptions); 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_TraceOptions protoreflect.MessageDescriptor + fd_TraceOptions_with_memory protoreflect.FieldDescriptor + fd_TraceOptions_with_stack protoreflect.FieldDescriptor + fd_TraceOptions_with_storage protoreflect.FieldDescriptor + fd_TraceOptions_with_return_data protoreflect.FieldDescriptor +) + +func init() { + file_minievm_evm_v1_query_proto_init() + md_TraceOptions = File_minievm_evm_v1_query_proto.Messages().ByName("TraceOptions") + fd_TraceOptions_with_memory = md_TraceOptions.Fields().ByName("with_memory") + fd_TraceOptions_with_stack = md_TraceOptions.Fields().ByName("with_stack") + fd_TraceOptions_with_storage = md_TraceOptions.Fields().ByName("with_storage") + fd_TraceOptions_with_return_data = md_TraceOptions.Fields().ByName("with_return_data") +} + +var _ protoreflect.Message = (*fastReflection_TraceOptions)(nil) + +type fastReflection_TraceOptions TraceOptions + +func (x *TraceOptions) ProtoReflect() protoreflect.Message { + return (*fastReflection_TraceOptions)(x) +} + +func (x *TraceOptions) slowProtoReflect() protoreflect.Message { + mi := &file_minievm_evm_v1_query_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_TraceOptions_messageType fastReflection_TraceOptions_messageType +var _ protoreflect.MessageType = fastReflection_TraceOptions_messageType{} + +type fastReflection_TraceOptions_messageType struct{} + +func (x fastReflection_TraceOptions_messageType) Zero() protoreflect.Message { + return (*fastReflection_TraceOptions)(nil) +} +func (x fastReflection_TraceOptions_messageType) New() protoreflect.Message { + return new(fastReflection_TraceOptions) +} +func (x fastReflection_TraceOptions_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_TraceOptions +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_TraceOptions) Descriptor() protoreflect.MessageDescriptor { + return md_TraceOptions +} + +// 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_TraceOptions) Type() protoreflect.MessageType { + return _fastReflection_TraceOptions_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_TraceOptions) New() protoreflect.Message { + return new(fastReflection_TraceOptions) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_TraceOptions) Interface() protoreflect.ProtoMessage { + return (*TraceOptions)(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_TraceOptions) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.WithMemory != false { + value := protoreflect.ValueOfBool(x.WithMemory) + if !f(fd_TraceOptions_with_memory, value) { + return + } + } + if x.WithStack != false { + value := protoreflect.ValueOfBool(x.WithStack) + if !f(fd_TraceOptions_with_stack, value) { + return + } + } + if x.WithStorage != false { + value := protoreflect.ValueOfBool(x.WithStorage) + if !f(fd_TraceOptions_with_storage, value) { + return + } + } + if x.WithReturnData != false { + value := protoreflect.ValueOfBool(x.WithReturnData) + if !f(fd_TraceOptions_with_return_data, 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_TraceOptions) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "minievm.evm.v1.TraceOptions.with_memory": + return x.WithMemory != false + case "minievm.evm.v1.TraceOptions.with_stack": + return x.WithStack != false + case "minievm.evm.v1.TraceOptions.with_storage": + return x.WithStorage != false + case "minievm.evm.v1.TraceOptions.with_return_data": + return x.WithReturnData != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.TraceOptions")) + } + panic(fmt.Errorf("message minievm.evm.v1.TraceOptions 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_TraceOptions) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "minievm.evm.v1.TraceOptions.with_memory": + x.WithMemory = false + case "minievm.evm.v1.TraceOptions.with_stack": + x.WithStack = false + case "minievm.evm.v1.TraceOptions.with_storage": + x.WithStorage = false + case "minievm.evm.v1.TraceOptions.with_return_data": + x.WithReturnData = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.TraceOptions")) + } + panic(fmt.Errorf("message minievm.evm.v1.TraceOptions 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_TraceOptions) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "minievm.evm.v1.TraceOptions.with_memory": + value := x.WithMemory + return protoreflect.ValueOfBool(value) + case "minievm.evm.v1.TraceOptions.with_stack": + value := x.WithStack + return protoreflect.ValueOfBool(value) + case "minievm.evm.v1.TraceOptions.with_storage": + value := x.WithStorage + return protoreflect.ValueOfBool(value) + case "minievm.evm.v1.TraceOptions.with_return_data": + value := x.WithReturnData + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.TraceOptions")) + } + panic(fmt.Errorf("message minievm.evm.v1.TraceOptions 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_TraceOptions) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "minievm.evm.v1.TraceOptions.with_memory": + x.WithMemory = value.Bool() + case "minievm.evm.v1.TraceOptions.with_stack": + x.WithStack = value.Bool() + case "minievm.evm.v1.TraceOptions.with_storage": + x.WithStorage = value.Bool() + case "minievm.evm.v1.TraceOptions.with_return_data": + x.WithReturnData = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.TraceOptions")) + } + panic(fmt.Errorf("message minievm.evm.v1.TraceOptions 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_TraceOptions) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "minievm.evm.v1.TraceOptions.with_memory": + panic(fmt.Errorf("field with_memory of message minievm.evm.v1.TraceOptions is not mutable")) + case "minievm.evm.v1.TraceOptions.with_stack": + panic(fmt.Errorf("field with_stack of message minievm.evm.v1.TraceOptions is not mutable")) + case "minievm.evm.v1.TraceOptions.with_storage": + panic(fmt.Errorf("field with_storage of message minievm.evm.v1.TraceOptions is not mutable")) + case "minievm.evm.v1.TraceOptions.with_return_data": + panic(fmt.Errorf("field with_return_data of message minievm.evm.v1.TraceOptions is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.TraceOptions")) + } + panic(fmt.Errorf("message minievm.evm.v1.TraceOptions 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_TraceOptions) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "minievm.evm.v1.TraceOptions.with_memory": + return protoreflect.ValueOfBool(false) + case "minievm.evm.v1.TraceOptions.with_stack": + return protoreflect.ValueOfBool(false) + case "minievm.evm.v1.TraceOptions.with_storage": + return protoreflect.ValueOfBool(false) + case "minievm.evm.v1.TraceOptions.with_return_data": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.TraceOptions")) + } + panic(fmt.Errorf("message minievm.evm.v1.TraceOptions 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_TraceOptions) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in minievm.evm.v1.TraceOptions", 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_TraceOptions) 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_TraceOptions) 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_TraceOptions) 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_TraceOptions) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*TraceOptions) + 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.WithMemory { + n += 2 } - l = len(x.ContractAddr) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if x.WithStack { + n += 2 } - l = len(x.Input) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if x.WithStorage { + n += 2 } - if x.WithTrace { + if x.WithReturnData { n += 2 } if x.unknownFields != nil { @@ -2113,7 +2735,7 @@ func (x *fastReflection_QueryCallRequest) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryCallRequest) + x := input.Message.Interface().(*TraceOptions) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2132,9 +2754,9 @@ func (x *fastReflection_QueryCallRequest) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.WithTrace { + if x.WithReturnData { i-- - if x.WithTrace { + if x.WithReturnData { dAtA[i] = 1 } else { dAtA[i] = 0 @@ -2142,26 +2764,35 @@ func (x *fastReflection_QueryCallRequest) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x20 } - if len(x.Input) > 0 { - i -= len(x.Input) - copy(dAtA[i:], x.Input) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Input))) + if x.WithStorage { i-- - dAtA[i] = 0x1a + if x.WithStorage { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 } - if len(x.ContractAddr) > 0 { - i -= len(x.ContractAddr) - copy(dAtA[i:], x.ContractAddr) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ContractAddr))) + if x.WithStack { i-- - dAtA[i] = 0x12 + if x.WithStack { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 } - if len(x.Sender) > 0 { - i -= len(x.Sender) - copy(dAtA[i:], x.Sender) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + if x.WithMemory { i-- - dAtA[i] = 0xa + if x.WithMemory { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -2174,7 +2805,7 @@ func (x *fastReflection_QueryCallRequest) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryCallRequest) + x := input.Message.Interface().(*TraceOptions) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2206,17 +2837,17 @@ func (x *fastReflection_QueryCallRequest) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCallRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TraceOptions: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCallRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TraceOptions: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field WithMemory", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2226,29 +2857,17 @@ func (x *fastReflection_QueryCallRequest) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + x.WithMemory = bool(v != 0) case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ContractAddr", wireType) + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field WithStack", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2258,29 +2877,17 @@ func (x *fastReflection_QueryCallRequest) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(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.ContractAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + x.WithStack = bool(v != 0) case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Input", wireType) + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field WithStorage", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2290,27 +2897,15 @@ func (x *fastReflection_QueryCallRequest) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(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.Input = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + x.WithStorage = bool(v != 0) case 4: if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field WithTrace", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field WithReturnData", wireType) } var v int for shift := uint(0); ; shift += 7 { @@ -2327,7 +2922,7 @@ func (x *fastReflection_QueryCallRequest) ProtoMethods() *protoiface.Methods { break } } - x.WithTrace = bool(v != 0) + x.WithReturnData = bool(v != 0) default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2420,6 +3015,7 @@ var ( fd_QueryCallResponse_used_gas protoreflect.FieldDescriptor fd_QueryCallResponse_logs protoreflect.FieldDescriptor fd_QueryCallResponse_trace_output protoreflect.FieldDescriptor + fd_QueryCallResponse_error protoreflect.FieldDescriptor ) func init() { @@ -2429,6 +3025,7 @@ func init() { fd_QueryCallResponse_used_gas = md_QueryCallResponse.Fields().ByName("used_gas") fd_QueryCallResponse_logs = md_QueryCallResponse.Fields().ByName("logs") fd_QueryCallResponse_trace_output = md_QueryCallResponse.Fields().ByName("trace_output") + fd_QueryCallResponse_error = md_QueryCallResponse.Fields().ByName("error") } var _ protoreflect.Message = (*fastReflection_QueryCallResponse)(nil) @@ -2440,7 +3037,7 @@ func (x *QueryCallResponse) ProtoReflect() protoreflect.Message { } func (x *QueryCallResponse) slowProtoReflect() protoreflect.Message { - mi := &file_minievm_evm_v1_query_proto_msgTypes[5] + mi := &file_minievm_evm_v1_query_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2520,6 +3117,12 @@ func (x *fastReflection_QueryCallResponse) Range(f func(protoreflect.FieldDescri return } } + if x.Error != "" { + value := protoreflect.ValueOfString(x.Error) + if !f(fd_QueryCallResponse_error, value) { + return + } + } } // Has reports whether a field is populated. @@ -2543,6 +3146,8 @@ func (x *fastReflection_QueryCallResponse) Has(fd protoreflect.FieldDescriptor) return len(x.Logs) != 0 case "minievm.evm.v1.QueryCallResponse.trace_output": return x.TraceOutput != "" + case "minievm.evm.v1.QueryCallResponse.error": + return x.Error != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.QueryCallResponse")) @@ -2567,6 +3172,8 @@ func (x *fastReflection_QueryCallResponse) Clear(fd protoreflect.FieldDescriptor x.Logs = nil case "minievm.evm.v1.QueryCallResponse.trace_output": x.TraceOutput = "" + case "minievm.evm.v1.QueryCallResponse.error": + x.Error = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.QueryCallResponse")) @@ -2598,6 +3205,9 @@ func (x *fastReflection_QueryCallResponse) Get(descriptor protoreflect.FieldDesc case "minievm.evm.v1.QueryCallResponse.trace_output": value := x.TraceOutput return protoreflect.ValueOfString(value) + case "minievm.evm.v1.QueryCallResponse.error": + value := x.Error + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.QueryCallResponse")) @@ -2628,6 +3238,8 @@ func (x *fastReflection_QueryCallResponse) Set(fd protoreflect.FieldDescriptor, x.Logs = *clv.list case "minievm.evm.v1.QueryCallResponse.trace_output": x.TraceOutput = value.Interface().(string) + case "minievm.evm.v1.QueryCallResponse.error": + x.Error = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.QueryCallResponse")) @@ -2660,6 +3272,8 @@ func (x *fastReflection_QueryCallResponse) Mutable(fd protoreflect.FieldDescript panic(fmt.Errorf("field used_gas of message minievm.evm.v1.QueryCallResponse is not mutable")) case "minievm.evm.v1.QueryCallResponse.trace_output": panic(fmt.Errorf("field trace_output of message minievm.evm.v1.QueryCallResponse is not mutable")) + case "minievm.evm.v1.QueryCallResponse.error": + panic(fmt.Errorf("field error of message minievm.evm.v1.QueryCallResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.QueryCallResponse")) @@ -2682,6 +3296,8 @@ func (x *fastReflection_QueryCallResponse) NewField(fd protoreflect.FieldDescrip return protoreflect.ValueOfList(&_QueryCallResponse_3_list{list: &list}) case "minievm.evm.v1.QueryCallResponse.trace_output": return protoreflect.ValueOfString("") + case "minievm.evm.v1.QueryCallResponse.error": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.QueryCallResponse")) @@ -2768,6 +3384,10 @@ func (x *fastReflection_QueryCallResponse) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.Error) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -2797,6 +3417,13 @@ func (x *fastReflection_QueryCallResponse) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.Error) > 0 { + i -= len(x.Error) + copy(dAtA[i:], x.Error) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Error))) + i-- + dAtA[i] = 0x2a + } if len(x.TraceOutput) > 0 { i -= len(x.TraceOutput) copy(dAtA[i:], x.TraceOutput) @@ -2998,6 +3625,38 @@ func (x *fastReflection_QueryCallResponse) ProtoMethods() *protoiface.Methods { } x.TraceOutput = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Error = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -3053,7 +3712,7 @@ func (x *QueryContractAddrByDenomRequest) ProtoReflect() protoreflect.Message { } func (x *QueryContractAddrByDenomRequest) slowProtoReflect() protoreflect.Message { - mi := &file_minievm_evm_v1_query_proto_msgTypes[6] + mi := &file_minievm_evm_v1_query_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3473,7 +4132,7 @@ func (x *QueryContractAddrByDenomResponse) ProtoReflect() protoreflect.Message { } func (x *QueryContractAddrByDenomResponse) slowProtoReflect() protoreflect.Message { - mi := &file_minievm_evm_v1_query_proto_msgTypes[7] + mi := &file_minievm_evm_v1_query_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3893,7 +4552,7 @@ func (x *QueryDenomRequest) ProtoReflect() protoreflect.Message { } func (x *QueryDenomRequest) slowProtoReflect() protoreflect.Message { - mi := &file_minievm_evm_v1_query_proto_msgTypes[8] + mi := &file_minievm_evm_v1_query_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4313,7 +4972,7 @@ func (x *QueryDenomResponse) ProtoReflect() protoreflect.Message { } func (x *QueryDenomResponse) slowProtoReflect() protoreflect.Message { - mi := &file_minievm_evm_v1_query_proto_msgTypes[9] + mi := &file_minievm_evm_v1_query_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4731,7 +5390,7 @@ func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_minievm_evm_v1_query_proto_msgTypes[10] + mi := &file_minievm_evm_v1_query_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5089,7 +5748,7 @@ func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_minievm_evm_v1_query_proto_msgTypes[11] + mi := &file_minievm_evm_v1_query_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5562,7 +6221,7 @@ type QueryCodeResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Code []byte `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` + Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` } func (x *QueryCodeResponse) Reset() { @@ -5585,11 +6244,11 @@ func (*QueryCodeResponse) Descriptor() ([]byte, []int) { return file_minievm_evm_v1_query_proto_rawDescGZIP(), []int{1} } -func (x *QueryCodeResponse) GetCode() []byte { +func (x *QueryCodeResponse) GetCode() string { if x != nil { return x.Code } - return nil + return "" } // QueryStateRequest is the request type for the Query/State RPC @@ -5599,7 +6258,7 @@ type QueryStateRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // It can be cosmos address or hex encoded address (0x prefixed). + // It can be cosmos address or hex encoded address. ContractAddr string `protobuf:"bytes,1,opt,name=contract_addr,json=contractAddr,proto3" json:"contract_addr,omitempty"` // hex encoded hash string Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` @@ -5686,12 +6345,13 @@ type QueryCallRequest struct { // sender address Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - // It can be cosmos address or hex encoded address (0x prefixed). + // It can be cosmos address or hex encoded address. ContractAddr string `protobuf:"bytes,2,opt,name=contract_addr,json=contractAddr,proto3" json:"contract_addr,omitempty"` // hex encoded call input Input string `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"` // whether to trace the call - WithTrace bool `protobuf:"varint,4,opt,name=with_trace,json=withTrace,proto3" json:"with_trace,omitempty"` + // `nil` means no trace + TraceOptions *TraceOptions `protobuf:"bytes,4,opt,name=trace_options,json=traceOptions,proto3" json:"trace_options,omitempty"` } func (x *QueryCallRequest) Reset() { @@ -5735,9 +6395,73 @@ func (x *QueryCallRequest) GetInput() string { return "" } -func (x *QueryCallRequest) GetWithTrace() bool { +func (x *QueryCallRequest) GetTraceOptions() *TraceOptions { + if x != nil { + return x.TraceOptions + } + return nil +} + +// TraceOption is the option for tracing +type TraceOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // whether to trace memory + WithMemory bool `protobuf:"varint,1,opt,name=with_memory,json=withMemory,proto3" json:"with_memory,omitempty"` + // whether to trace stack + WithStack bool `protobuf:"varint,2,opt,name=with_stack,json=withStack,proto3" json:"with_stack,omitempty"` + // wtether to trace storage + WithStorage bool `protobuf:"varint,3,opt,name=with_storage,json=withStorage,proto3" json:"with_storage,omitempty"` + // whether to return data trace + WithReturnData bool `protobuf:"varint,4,opt,name=with_return_data,json=withReturnData,proto3" json:"with_return_data,omitempty"` +} + +func (x *TraceOptions) Reset() { + *x = TraceOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_minievm_evm_v1_query_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TraceOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TraceOptions) ProtoMessage() {} + +// Deprecated: Use TraceOptions.ProtoReflect.Descriptor instead. +func (*TraceOptions) Descriptor() ([]byte, []int) { + return file_minievm_evm_v1_query_proto_rawDescGZIP(), []int{5} +} + +func (x *TraceOptions) GetWithMemory() bool { + if x != nil { + return x.WithMemory + } + return false +} + +func (x *TraceOptions) GetWithStack() bool { + if x != nil { + return x.WithStack + } + return false +} + +func (x *TraceOptions) GetWithStorage() bool { + if x != nil { + return x.WithStorage + } + return false +} + +func (x *TraceOptions) GetWithReturnData() bool { if x != nil { - return x.WithTrace + return x.WithReturnData } return false } @@ -5754,12 +6478,13 @@ type QueryCallResponse struct { UsedGas uint64 `protobuf:"varint,2,opt,name=used_gas,json=usedGas,proto3" json:"used_gas,omitempty"` Logs []*Log `protobuf:"bytes,3,rep,name=logs,proto3" json:"logs,omitempty"` TraceOutput string `protobuf:"bytes,4,opt,name=trace_output,json=traceOutput,proto3" json:"trace_output,omitempty"` + Error string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"` } func (x *QueryCallResponse) Reset() { *x = QueryCallResponse{} if protoimpl.UnsafeEnabled { - mi := &file_minievm_evm_v1_query_proto_msgTypes[5] + mi := &file_minievm_evm_v1_query_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5773,7 +6498,7 @@ func (*QueryCallResponse) ProtoMessage() {} // Deprecated: Use QueryCallResponse.ProtoReflect.Descriptor instead. func (*QueryCallResponse) Descriptor() ([]byte, []int) { - return file_minievm_evm_v1_query_proto_rawDescGZIP(), []int{5} + return file_minievm_evm_v1_query_proto_rawDescGZIP(), []int{6} } func (x *QueryCallResponse) GetResponse() string { @@ -5804,6 +6529,13 @@ func (x *QueryCallResponse) GetTraceOutput() string { return "" } +func (x *QueryCallResponse) GetError() string { + if x != nil { + return x.Error + } + return "" +} + // QueryContractAddrByDenomRequest is the request type for the Query/ContractAddrByDenom RPC // method type QueryContractAddrByDenomRequest struct { @@ -5817,7 +6549,7 @@ type QueryContractAddrByDenomRequest struct { func (x *QueryContractAddrByDenomRequest) Reset() { *x = QueryContractAddrByDenomRequest{} if protoimpl.UnsafeEnabled { - mi := &file_minievm_evm_v1_query_proto_msgTypes[6] + mi := &file_minievm_evm_v1_query_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5831,7 +6563,7 @@ func (*QueryContractAddrByDenomRequest) ProtoMessage() {} // Deprecated: Use QueryContractAddrByDenomRequest.ProtoReflect.Descriptor instead. func (*QueryContractAddrByDenomRequest) Descriptor() ([]byte, []int) { - return file_minievm_evm_v1_query_proto_rawDescGZIP(), []int{6} + return file_minievm_evm_v1_query_proto_rawDescGZIP(), []int{7} } func (x *QueryContractAddrByDenomRequest) GetDenom() string { @@ -5855,7 +6587,7 @@ type QueryContractAddrByDenomResponse struct { func (x *QueryContractAddrByDenomResponse) Reset() { *x = QueryContractAddrByDenomResponse{} if protoimpl.UnsafeEnabled { - mi := &file_minievm_evm_v1_query_proto_msgTypes[7] + mi := &file_minievm_evm_v1_query_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5869,7 +6601,7 @@ func (*QueryContractAddrByDenomResponse) ProtoMessage() {} // Deprecated: Use QueryContractAddrByDenomResponse.ProtoReflect.Descriptor instead. func (*QueryContractAddrByDenomResponse) Descriptor() ([]byte, []int) { - return file_minievm_evm_v1_query_proto_rawDescGZIP(), []int{7} + return file_minievm_evm_v1_query_proto_rawDescGZIP(), []int{8} } func (x *QueryContractAddrByDenomResponse) GetAddress() string { @@ -5886,14 +6618,14 @@ type QueryDenomRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // It can be cosmos address or hex encoded address (0x prefixed). + // It can be cosmos address or hex encoded address. ContractAddr string `protobuf:"bytes,1,opt,name=contract_addr,json=contractAddr,proto3" json:"contract_addr,omitempty"` } func (x *QueryDenomRequest) Reset() { *x = QueryDenomRequest{} if protoimpl.UnsafeEnabled { - mi := &file_minievm_evm_v1_query_proto_msgTypes[8] + mi := &file_minievm_evm_v1_query_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5907,7 +6639,7 @@ func (*QueryDenomRequest) ProtoMessage() {} // Deprecated: Use QueryDenomRequest.ProtoReflect.Descriptor instead. func (*QueryDenomRequest) Descriptor() ([]byte, []int) { - return file_minievm_evm_v1_query_proto_rawDescGZIP(), []int{8} + return file_minievm_evm_v1_query_proto_rawDescGZIP(), []int{9} } func (x *QueryDenomRequest) GetContractAddr() string { @@ -5930,7 +6662,7 @@ type QueryDenomResponse struct { func (x *QueryDenomResponse) Reset() { *x = QueryDenomResponse{} if protoimpl.UnsafeEnabled { - mi := &file_minievm_evm_v1_query_proto_msgTypes[9] + mi := &file_minievm_evm_v1_query_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5944,7 +6676,7 @@ func (*QueryDenomResponse) ProtoMessage() {} // Deprecated: Use QueryDenomResponse.ProtoReflect.Descriptor instead. func (*QueryDenomResponse) Descriptor() ([]byte, []int) { - return file_minievm_evm_v1_query_proto_rawDescGZIP(), []int{9} + return file_minievm_evm_v1_query_proto_rawDescGZIP(), []int{10} } func (x *QueryDenomResponse) GetDenom() string { @@ -5964,7 +6696,7 @@ type QueryParamsRequest struct { func (x *QueryParamsRequest) Reset() { *x = QueryParamsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_minievm_evm_v1_query_proto_msgTypes[10] + mi := &file_minievm_evm_v1_query_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5978,7 +6710,7 @@ func (*QueryParamsRequest) ProtoMessage() {} // Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return file_minievm_evm_v1_query_proto_rawDescGZIP(), []int{10} + return file_minievm_evm_v1_query_proto_rawDescGZIP(), []int{11} } // QueryParamsResponse is the response type for the Query/Params RPC method. @@ -5994,7 +6726,7 @@ type QueryParamsResponse struct { func (x *QueryParamsResponse) Reset() { *x = QueryParamsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_minievm_evm_v1_query_proto_msgTypes[11] + mi := &file_minievm_evm_v1_query_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6008,7 +6740,7 @@ func (*QueryParamsResponse) ProtoMessage() {} // Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return file_minievm_evm_v1_query_proto_rawDescGZIP(), []int{11} + return file_minievm_evm_v1_query_proto_rawDescGZIP(), []int{12} } func (x *QueryParamsResponse) GetParams() *Params { @@ -6035,7 +6767,7 @@ var file_minievm_evm_v1_query_proto_rawDesc = []byte{ 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x22, 0x2d, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x63, 0x6f, 0x64, + 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x4a, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, @@ -6044,107 +6776,120 @@ var file_minievm_evm_v1_query_proto_rawDesc = []byte{ 0x6b, 0x65, 0x79, 0x22, 0x30, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x84, 0x01, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, + 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xa8, 0x01, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x1d, 0x0a, - 0x0a, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x09, 0x77, 0x69, 0x74, 0x68, 0x54, 0x72, 0x61, 0x63, 0x65, 0x22, 0xa1, 0x01, 0x0a, - 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, - 0x0a, 0x08, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x07, 0x75, 0x73, 0x65, 0x64, 0x47, 0x61, 0x73, 0x12, 0x32, 0x0a, 0x04, 0x6c, 0x6f, 0x67, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, - 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x42, 0x09, 0xc8, 0xde, - 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x21, 0x0a, - 0x0c, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x22, 0x37, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x41, 0x64, 0x64, 0x72, 0x42, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x42, 0x0a, 0x20, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x42, 0x79, - 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x38, 0x0a, - 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x22, 0x30, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, - 0x6e, 0x6f, 0x6d, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, - 0x4b, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, - 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, - 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x32, 0x92, 0x06, 0x0a, - 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x7a, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x20, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x41, 0x0a, + 0x0d, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, + 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0x9b, 0x01, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x4d, 0x65, 0x6d, 0x6f, + 0x72, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x63, 0x6b, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x77, 0x69, 0x74, 0x68, 0x53, 0x74, 0x61, 0x63, + 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x77, 0x69, 0x74, 0x68, 0x53, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x74, + 0x75, 0x72, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, + 0x77, 0x69, 0x74, 0x68, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x22, 0xb7, + 0x01, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x19, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x07, 0x75, 0x73, 0x65, 0x64, 0x47, 0x61, 0x73, 0x12, 0x32, 0x0a, 0x04, 0x6c, + 0x6f, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x69, 0x6e, 0x69, + 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x42, 0x09, + 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x12, + 0x21, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x4f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x37, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x42, 0x79, 0x44, + 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, + 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, + 0x6d, 0x22, 0x42, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x42, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x3a, + 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x38, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, + 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x22, + 0x30, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, + 0x01, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4b, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x21, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x6d, 0x69, - 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x64, - 0x65, 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x7d, 0x12, 0x84, 0x01, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x2e, 0x6d, - 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x22, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x6d, 0x69, - 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x7d, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x7d, 0x12, 0xa4, 0x01, 0x0a, 0x13, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x42, 0x79, 0x44, 0x65, 0x6e, 0x6f, - 0x6d, 0x12, 0x2f, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, - 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, - 0x41, 0x64, 0x64, 0x72, 0x42, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x41, 0x64, 0x64, 0x72, 0x42, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x6d, - 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x2f, 0x62, 0x79, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, - 0x12, 0x7e, 0x0a, 0x05, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x21, 0x2e, 0x6d, 0x69, 0x6e, 0x69, - 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, - 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x6d, 0x69, 0x6e, 0x69, 0x65, - 0x76, 0x6d, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x73, - 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, - 0x12, 0x6c, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x20, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x32, 0x92, 0x06, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x7a, + 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x20, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, + 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x64, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, - 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x69, 0x6e, + 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2f, 0x65, 0x76, + 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x12, 0x84, 0x01, 0x0a, 0x05, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, + 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, + 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2f, 0x65, 0x76, + 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x2f, 0x7b, 0x6b, 0x65, 0x79, + 0x7d, 0x12, 0xa4, 0x01, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, + 0x64, 0x72, 0x42, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x2f, 0x2e, 0x6d, 0x69, 0x6e, 0x69, + 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x42, 0x79, 0x44, 0x65, + 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x6d, 0x69, 0x6e, 0x69, 0x65, - 0x76, 0x6d, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x12, 0x71, - 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, - 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, - 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x6d, 0x69, 0x6e, 0x69, - 0x65, 0x76, 0x6d, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x42, 0xa9, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0xa8, 0xe2, 0x1e, 0x00, 0x0a, 0x12, 0x63, 0x6f, - 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, - 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x25, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x76, 0x31, 0x3b, - 0x65, 0x76, 0x6d, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x45, 0x58, 0xaa, 0x02, 0x0e, 0x4d, 0x69, - 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x45, 0x76, 0x6d, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0e, 0x4d, - 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x5c, 0x45, 0x76, 0x6d, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1a, - 0x4d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x5c, 0x45, 0x76, 0x6d, 0x5c, 0x56, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x4d, 0x69, 0x6e, - 0x69, 0x65, 0x76, 0x6d, 0x3a, 0x3a, 0x45, 0x76, 0x6d, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x42, 0x79, 0x44, + 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2f, 0x65, + 0x76, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x2f, + 0x62, 0x79, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x7e, 0x0a, 0x05, 0x44, 0x65, 0x6e, 0x6f, + 0x6d, 0x12, 0x21, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, + 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6e, 0x6f, 0x6d, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, + 0x12, 0x26, 0x2f, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x76, + 0x31, 0x2f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x12, 0x6c, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, + 0x12, 0x20, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, + 0x22, 0x14, 0x2f, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x76, + 0x31, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x12, 0x71, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x22, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, + 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x18, 0x12, 0x16, 0x2f, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2f, 0x65, 0x76, 0x6d, 0x2f, + 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xa9, 0x01, 0xc8, 0xe1, 0x1e, 0x00, + 0xa8, 0xe2, 0x1e, 0x00, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, + 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, + 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, + 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x76, 0x6d, 0x76, 0x31, 0xa2, 0x02, 0x03, + 0x4d, 0x45, 0x58, 0xaa, 0x02, 0x0e, 0x4d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x45, 0x76, + 0x6d, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0e, 0x4d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x5c, 0x45, + 0x76, 0x6d, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1a, 0x4d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x5c, + 0x45, 0x76, 0x6d, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x10, 0x4d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x3a, 0x3a, 0x45, 0x76, + 0x6d, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -6159,43 +6904,45 @@ func file_minievm_evm_v1_query_proto_rawDescGZIP() []byte { return file_minievm_evm_v1_query_proto_rawDescData } -var file_minievm_evm_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_minievm_evm_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_minievm_evm_v1_query_proto_goTypes = []interface{}{ (*QueryCodeRequest)(nil), // 0: minievm.evm.v1.QueryCodeRequest (*QueryCodeResponse)(nil), // 1: minievm.evm.v1.QueryCodeResponse (*QueryStateRequest)(nil), // 2: minievm.evm.v1.QueryStateRequest (*QueryStateResponse)(nil), // 3: minievm.evm.v1.QueryStateResponse (*QueryCallRequest)(nil), // 4: minievm.evm.v1.QueryCallRequest - (*QueryCallResponse)(nil), // 5: minievm.evm.v1.QueryCallResponse - (*QueryContractAddrByDenomRequest)(nil), // 6: minievm.evm.v1.QueryContractAddrByDenomRequest - (*QueryContractAddrByDenomResponse)(nil), // 7: minievm.evm.v1.QueryContractAddrByDenomResponse - (*QueryDenomRequest)(nil), // 8: minievm.evm.v1.QueryDenomRequest - (*QueryDenomResponse)(nil), // 9: minievm.evm.v1.QueryDenomResponse - (*QueryParamsRequest)(nil), // 10: minievm.evm.v1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 11: minievm.evm.v1.QueryParamsResponse - (*Log)(nil), // 12: minievm.evm.v1.Log - (*Params)(nil), // 13: minievm.evm.v1.Params + (*TraceOptions)(nil), // 5: minievm.evm.v1.TraceOptions + (*QueryCallResponse)(nil), // 6: minievm.evm.v1.QueryCallResponse + (*QueryContractAddrByDenomRequest)(nil), // 7: minievm.evm.v1.QueryContractAddrByDenomRequest + (*QueryContractAddrByDenomResponse)(nil), // 8: minievm.evm.v1.QueryContractAddrByDenomResponse + (*QueryDenomRequest)(nil), // 9: minievm.evm.v1.QueryDenomRequest + (*QueryDenomResponse)(nil), // 10: minievm.evm.v1.QueryDenomResponse + (*QueryParamsRequest)(nil), // 11: minievm.evm.v1.QueryParamsRequest + (*QueryParamsResponse)(nil), // 12: minievm.evm.v1.QueryParamsResponse + (*Log)(nil), // 13: minievm.evm.v1.Log + (*Params)(nil), // 14: minievm.evm.v1.Params } var file_minievm_evm_v1_query_proto_depIdxs = []int32{ - 12, // 0: minievm.evm.v1.QueryCallResponse.logs:type_name -> minievm.evm.v1.Log - 13, // 1: minievm.evm.v1.QueryParamsResponse.params:type_name -> minievm.evm.v1.Params - 0, // 2: minievm.evm.v1.Query.Code:input_type -> minievm.evm.v1.QueryCodeRequest - 2, // 3: minievm.evm.v1.Query.State:input_type -> minievm.evm.v1.QueryStateRequest - 6, // 4: minievm.evm.v1.Query.ContractAddrByDenom:input_type -> minievm.evm.v1.QueryContractAddrByDenomRequest - 8, // 5: minievm.evm.v1.Query.Denom:input_type -> minievm.evm.v1.QueryDenomRequest - 4, // 6: minievm.evm.v1.Query.Call:input_type -> minievm.evm.v1.QueryCallRequest - 10, // 7: minievm.evm.v1.Query.Params:input_type -> minievm.evm.v1.QueryParamsRequest - 1, // 8: minievm.evm.v1.Query.Code:output_type -> minievm.evm.v1.QueryCodeResponse - 3, // 9: minievm.evm.v1.Query.State:output_type -> minievm.evm.v1.QueryStateResponse - 7, // 10: minievm.evm.v1.Query.ContractAddrByDenom:output_type -> minievm.evm.v1.QueryContractAddrByDenomResponse - 9, // 11: minievm.evm.v1.Query.Denom:output_type -> minievm.evm.v1.QueryDenomResponse - 5, // 12: minievm.evm.v1.Query.Call:output_type -> minievm.evm.v1.QueryCallResponse - 11, // 13: minievm.evm.v1.Query.Params:output_type -> minievm.evm.v1.QueryParamsResponse - 8, // [8:14] is the sub-list for method output_type - 2, // [2:8] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 5, // 0: minievm.evm.v1.QueryCallRequest.trace_options:type_name -> minievm.evm.v1.TraceOptions + 13, // 1: minievm.evm.v1.QueryCallResponse.logs:type_name -> minievm.evm.v1.Log + 14, // 2: minievm.evm.v1.QueryParamsResponse.params:type_name -> minievm.evm.v1.Params + 0, // 3: minievm.evm.v1.Query.Code:input_type -> minievm.evm.v1.QueryCodeRequest + 2, // 4: minievm.evm.v1.Query.State:input_type -> minievm.evm.v1.QueryStateRequest + 7, // 5: minievm.evm.v1.Query.ContractAddrByDenom:input_type -> minievm.evm.v1.QueryContractAddrByDenomRequest + 9, // 6: minievm.evm.v1.Query.Denom:input_type -> minievm.evm.v1.QueryDenomRequest + 4, // 7: minievm.evm.v1.Query.Call:input_type -> minievm.evm.v1.QueryCallRequest + 11, // 8: minievm.evm.v1.Query.Params:input_type -> minievm.evm.v1.QueryParamsRequest + 1, // 9: minievm.evm.v1.Query.Code:output_type -> minievm.evm.v1.QueryCodeResponse + 3, // 10: minievm.evm.v1.Query.State:output_type -> minievm.evm.v1.QueryStateResponse + 8, // 11: minievm.evm.v1.Query.ContractAddrByDenom:output_type -> minievm.evm.v1.QueryContractAddrByDenomResponse + 10, // 12: minievm.evm.v1.Query.Denom:output_type -> minievm.evm.v1.QueryDenomResponse + 6, // 13: minievm.evm.v1.Query.Call:output_type -> minievm.evm.v1.QueryCallResponse + 12, // 14: minievm.evm.v1.Query.Params:output_type -> minievm.evm.v1.QueryParamsResponse + 9, // [9:15] is the sub-list for method output_type + 3, // [3:9] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_minievm_evm_v1_query_proto_init() } @@ -6266,7 +7013,7 @@ func file_minievm_evm_v1_query_proto_init() { } } file_minievm_evm_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryCallResponse); i { + switch v := v.(*TraceOptions); i { case 0: return &v.state case 1: @@ -6278,7 +7025,7 @@ func file_minievm_evm_v1_query_proto_init() { } } file_minievm_evm_v1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryContractAddrByDenomRequest); i { + switch v := v.(*QueryCallResponse); i { case 0: return &v.state case 1: @@ -6290,7 +7037,7 @@ func file_minievm_evm_v1_query_proto_init() { } } file_minievm_evm_v1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryContractAddrByDenomResponse); i { + switch v := v.(*QueryContractAddrByDenomRequest); i { case 0: return &v.state case 1: @@ -6302,7 +7049,7 @@ func file_minievm_evm_v1_query_proto_init() { } } file_minievm_evm_v1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDenomRequest); i { + switch v := v.(*QueryContractAddrByDenomResponse); i { case 0: return &v.state case 1: @@ -6314,7 +7061,7 @@ func file_minievm_evm_v1_query_proto_init() { } } file_minievm_evm_v1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDenomResponse); i { + switch v := v.(*QueryDenomRequest); i { case 0: return &v.state case 1: @@ -6326,7 +7073,7 @@ func file_minievm_evm_v1_query_proto_init() { } } file_minievm_evm_v1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsRequest); i { + switch v := v.(*QueryDenomResponse); i { case 0: return &v.state case 1: @@ -6338,6 +7085,18 @@ func file_minievm_evm_v1_query_proto_init() { } } file_minievm_evm_v1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryParamsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_minievm_evm_v1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsResponse); i { case 0: return &v.state @@ -6356,7 +7115,7 @@ func file_minievm_evm_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_minievm_evm_v1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 12, + NumMessages: 13, NumExtensions: 0, NumServices: 1, }, diff --git a/api/minievm/evm/v1/tx.pulsar.go b/api/minievm/evm/v1/tx.pulsar.go index 75fc889..7f9463e 100644 --- a/api/minievm/evm/v1/tx.pulsar.go +++ b/api/minievm/evm/v1/tx.pulsar.go @@ -984,6 +984,1022 @@ func (x *fastReflection_MsgCreateResponse) ProtoMethods() *protoiface.Methods { } } +var ( + md_MsgCreate2 protoreflect.MessageDescriptor + fd_MsgCreate2_sender protoreflect.FieldDescriptor + fd_MsgCreate2_code protoreflect.FieldDescriptor + fd_MsgCreate2_salt protoreflect.FieldDescriptor +) + +func init() { + file_minievm_evm_v1_tx_proto_init() + md_MsgCreate2 = File_minievm_evm_v1_tx_proto.Messages().ByName("MsgCreate2") + fd_MsgCreate2_sender = md_MsgCreate2.Fields().ByName("sender") + fd_MsgCreate2_code = md_MsgCreate2.Fields().ByName("code") + fd_MsgCreate2_salt = md_MsgCreate2.Fields().ByName("salt") +} + +var _ protoreflect.Message = (*fastReflection_MsgCreate2)(nil) + +type fastReflection_MsgCreate2 MsgCreate2 + +func (x *MsgCreate2) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCreate2)(x) +} + +func (x *MsgCreate2) slowProtoReflect() protoreflect.Message { + mi := &file_minievm_evm_v1_tx_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgCreate2_messageType fastReflection_MsgCreate2_messageType +var _ protoreflect.MessageType = fastReflection_MsgCreate2_messageType{} + +type fastReflection_MsgCreate2_messageType struct{} + +func (x fastReflection_MsgCreate2_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCreate2)(nil) +} +func (x fastReflection_MsgCreate2_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCreate2) +} +func (x fastReflection_MsgCreate2_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreate2 +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCreate2) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreate2 +} + +// 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_MsgCreate2) Type() protoreflect.MessageType { + return _fastReflection_MsgCreate2_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCreate2) New() protoreflect.Message { + return new(fastReflection_MsgCreate2) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCreate2) Interface() protoreflect.ProtoMessage { + return (*MsgCreate2)(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_MsgCreate2) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Sender != "" { + value := protoreflect.ValueOfString(x.Sender) + if !f(fd_MsgCreate2_sender, value) { + return + } + } + if x.Code != "" { + value := protoreflect.ValueOfString(x.Code) + if !f(fd_MsgCreate2_code, value) { + return + } + } + if x.Salt != uint64(0) { + value := protoreflect.ValueOfUint64(x.Salt) + if !f(fd_MsgCreate2_salt, 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_MsgCreate2) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "minievm.evm.v1.MsgCreate2.sender": + return x.Sender != "" + case "minievm.evm.v1.MsgCreate2.code": + return x.Code != "" + case "minievm.evm.v1.MsgCreate2.salt": + return x.Salt != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.MsgCreate2")) + } + panic(fmt.Errorf("message minievm.evm.v1.MsgCreate2 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_MsgCreate2) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "minievm.evm.v1.MsgCreate2.sender": + x.Sender = "" + case "minievm.evm.v1.MsgCreate2.code": + x.Code = "" + case "minievm.evm.v1.MsgCreate2.salt": + x.Salt = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.MsgCreate2")) + } + panic(fmt.Errorf("message minievm.evm.v1.MsgCreate2 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_MsgCreate2) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "minievm.evm.v1.MsgCreate2.sender": + value := x.Sender + return protoreflect.ValueOfString(value) + case "minievm.evm.v1.MsgCreate2.code": + value := x.Code + return protoreflect.ValueOfString(value) + case "minievm.evm.v1.MsgCreate2.salt": + value := x.Salt + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.MsgCreate2")) + } + panic(fmt.Errorf("message minievm.evm.v1.MsgCreate2 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_MsgCreate2) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "minievm.evm.v1.MsgCreate2.sender": + x.Sender = value.Interface().(string) + case "minievm.evm.v1.MsgCreate2.code": + x.Code = value.Interface().(string) + case "minievm.evm.v1.MsgCreate2.salt": + x.Salt = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.MsgCreate2")) + } + panic(fmt.Errorf("message minievm.evm.v1.MsgCreate2 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_MsgCreate2) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "minievm.evm.v1.MsgCreate2.sender": + panic(fmt.Errorf("field sender of message minievm.evm.v1.MsgCreate2 is not mutable")) + case "minievm.evm.v1.MsgCreate2.code": + panic(fmt.Errorf("field code of message minievm.evm.v1.MsgCreate2 is not mutable")) + case "minievm.evm.v1.MsgCreate2.salt": + panic(fmt.Errorf("field salt of message minievm.evm.v1.MsgCreate2 is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.MsgCreate2")) + } + panic(fmt.Errorf("message minievm.evm.v1.MsgCreate2 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_MsgCreate2) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "minievm.evm.v1.MsgCreate2.sender": + return protoreflect.ValueOfString("") + case "minievm.evm.v1.MsgCreate2.code": + return protoreflect.ValueOfString("") + case "minievm.evm.v1.MsgCreate2.salt": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.MsgCreate2")) + } + panic(fmt.Errorf("message minievm.evm.v1.MsgCreate2 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_MsgCreate2) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in minievm.evm.v1.MsgCreate2", 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_MsgCreate2) 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_MsgCreate2) 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_MsgCreate2) 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_MsgCreate2) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCreate2) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Sender) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Code) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Salt != 0 { + n += 1 + runtime.Sov(uint64(x.Salt)) + } + 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().(*MsgCreate2) + 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.Salt != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Salt)) + i-- + dAtA[i] = 0x18 + } + if len(x.Code) > 0 { + i -= len(x.Code) + copy(dAtA[i:], x.Code) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Code))) + i-- + dAtA[i] = 0x12 + } + if len(x.Sender) > 0 { + i -= len(x.Sender) + copy(dAtA[i:], x.Sender) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgCreate2) + 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: MsgCreate2: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreate2: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Code", 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.Code = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Salt", wireType) + } + x.Salt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Salt |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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_MsgCreate2Response protoreflect.MessageDescriptor + fd_MsgCreate2Response_result protoreflect.FieldDescriptor + fd_MsgCreate2Response_contract_addr protoreflect.FieldDescriptor +) + +func init() { + file_minievm_evm_v1_tx_proto_init() + md_MsgCreate2Response = File_minievm_evm_v1_tx_proto.Messages().ByName("MsgCreate2Response") + fd_MsgCreate2Response_result = md_MsgCreate2Response.Fields().ByName("result") + fd_MsgCreate2Response_contract_addr = md_MsgCreate2Response.Fields().ByName("contract_addr") +} + +var _ protoreflect.Message = (*fastReflection_MsgCreate2Response)(nil) + +type fastReflection_MsgCreate2Response MsgCreate2Response + +func (x *MsgCreate2Response) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCreate2Response)(x) +} + +func (x *MsgCreate2Response) slowProtoReflect() protoreflect.Message { + mi := &file_minievm_evm_v1_tx_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgCreate2Response_messageType fastReflection_MsgCreate2Response_messageType +var _ protoreflect.MessageType = fastReflection_MsgCreate2Response_messageType{} + +type fastReflection_MsgCreate2Response_messageType struct{} + +func (x fastReflection_MsgCreate2Response_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCreate2Response)(nil) +} +func (x fastReflection_MsgCreate2Response_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCreate2Response) +} +func (x fastReflection_MsgCreate2Response_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreate2Response +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCreate2Response) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreate2Response +} + +// 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_MsgCreate2Response) Type() protoreflect.MessageType { + return _fastReflection_MsgCreate2Response_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCreate2Response) New() protoreflect.Message { + return new(fastReflection_MsgCreate2Response) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCreate2Response) Interface() protoreflect.ProtoMessage { + return (*MsgCreate2Response)(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_MsgCreate2Response) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Result != "" { + value := protoreflect.ValueOfString(x.Result) + if !f(fd_MsgCreate2Response_result, value) { + return + } + } + if x.ContractAddr != "" { + value := protoreflect.ValueOfString(x.ContractAddr) + if !f(fd_MsgCreate2Response_contract_addr, 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_MsgCreate2Response) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "minievm.evm.v1.MsgCreate2Response.result": + return x.Result != "" + case "minievm.evm.v1.MsgCreate2Response.contract_addr": + return x.ContractAddr != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.MsgCreate2Response")) + } + panic(fmt.Errorf("message minievm.evm.v1.MsgCreate2Response 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_MsgCreate2Response) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "minievm.evm.v1.MsgCreate2Response.result": + x.Result = "" + case "minievm.evm.v1.MsgCreate2Response.contract_addr": + x.ContractAddr = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.MsgCreate2Response")) + } + panic(fmt.Errorf("message minievm.evm.v1.MsgCreate2Response 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_MsgCreate2Response) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "minievm.evm.v1.MsgCreate2Response.result": + value := x.Result + return protoreflect.ValueOfString(value) + case "minievm.evm.v1.MsgCreate2Response.contract_addr": + value := x.ContractAddr + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.MsgCreate2Response")) + } + panic(fmt.Errorf("message minievm.evm.v1.MsgCreate2Response 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_MsgCreate2Response) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "minievm.evm.v1.MsgCreate2Response.result": + x.Result = value.Interface().(string) + case "minievm.evm.v1.MsgCreate2Response.contract_addr": + x.ContractAddr = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.MsgCreate2Response")) + } + panic(fmt.Errorf("message minievm.evm.v1.MsgCreate2Response 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_MsgCreate2Response) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "minievm.evm.v1.MsgCreate2Response.result": + panic(fmt.Errorf("field result of message minievm.evm.v1.MsgCreate2Response is not mutable")) + case "minievm.evm.v1.MsgCreate2Response.contract_addr": + panic(fmt.Errorf("field contract_addr of message minievm.evm.v1.MsgCreate2Response is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.MsgCreate2Response")) + } + panic(fmt.Errorf("message minievm.evm.v1.MsgCreate2Response 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_MsgCreate2Response) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "minievm.evm.v1.MsgCreate2Response.result": + return protoreflect.ValueOfString("") + case "minievm.evm.v1.MsgCreate2Response.contract_addr": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: minievm.evm.v1.MsgCreate2Response")) + } + panic(fmt.Errorf("message minievm.evm.v1.MsgCreate2Response 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_MsgCreate2Response) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in minievm.evm.v1.MsgCreate2Response", 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_MsgCreate2Response) 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_MsgCreate2Response) 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_MsgCreate2Response) 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_MsgCreate2Response) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCreate2Response) + 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.Result) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ContractAddr) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgCreate2Response) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ContractAddr) > 0 { + i -= len(x.ContractAddr) + copy(dAtA[i:], x.ContractAddr) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ContractAddr))) + i-- + dAtA[i] = 0x12 + } + if len(x.Result) > 0 { + i -= len(x.Result) + copy(dAtA[i:], x.Result) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Result))) + 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().(*MsgCreate2Response) + 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: MsgCreate2Response: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreate2Response: 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 Result", 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.Result = 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 ContractAddr", 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.ContractAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + var ( md_MsgCall protoreflect.MessageDescriptor fd_MsgCall_sender protoreflect.FieldDescriptor @@ -1008,7 +2024,7 @@ func (x *MsgCall) ProtoReflect() protoreflect.Message { } func (x *MsgCall) slowProtoReflect() protoreflect.Message { - mi := &file_minievm_evm_v1_tx_proto_msgTypes[2] + mi := &file_minievm_evm_v1_tx_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1605,7 +2621,7 @@ func (x *MsgCallResponse) ProtoReflect() protoreflect.Message { } func (x *MsgCallResponse) slowProtoReflect() protoreflect.Message { - mi := &file_minievm_evm_v1_tx_proto_msgTypes[3] + mi := &file_minievm_evm_v1_tx_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2112,7 +3128,7 @@ func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { } func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { - mi := &file_minievm_evm_v1_tx_proto_msgTypes[4] + mi := &file_minievm_evm_v1_tx_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2607,7 +3623,7 @@ func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { } func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_minievm_evm_v1_tx_proto_msgTypes[5] + mi := &file_minievm_evm_v1_tx_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2958,8 +3974,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// MsgCreate is a message to create a new contract using code as deployment -// code. +// MsgCreate is a message to create a contract with the CREATE opcode. type MsgCreate struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3012,7 +4027,7 @@ type MsgCreateResponse struct { unknownFields protoimpl.UnknownFields Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` - // hex encoded address (0x prefixed) + // hex encoded address ContractAddr string `protobuf:"bytes,2,opt,name=contract_addr,json=contractAddr,proto3" json:"contract_addr,omitempty"` } @@ -3050,6 +4065,106 @@ func (x *MsgCreateResponse) GetContractAddr() string { return "" } +// MsgCreate2 is a message to create a contract with the CREATE2 opcode. +type MsgCreate2 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Sender is the that actor that signed the messages + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // Code is hex encoded raw contract bytes code. + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + // Salt is a random value to distinguish contract creation. + Salt uint64 `protobuf:"varint,3,opt,name=salt,proto3" json:"salt,omitempty"` +} + +func (x *MsgCreate2) Reset() { + *x = MsgCreate2{} + if protoimpl.UnsafeEnabled { + mi := &file_minievm_evm_v1_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCreate2) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreate2) ProtoMessage() {} + +// Deprecated: Use MsgCreate2.ProtoReflect.Descriptor instead. +func (*MsgCreate2) Descriptor() ([]byte, []int) { + return file_minievm_evm_v1_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgCreate2) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *MsgCreate2) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *MsgCreate2) GetSalt() uint64 { + if x != nil { + return x.Salt + } + return 0 +} + +// MsgCreate2Response defines the Msg/Create2 response type. +type MsgCreate2Response struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` + // hex encoded address + ContractAddr string `protobuf:"bytes,2,opt,name=contract_addr,json=contractAddr,proto3" json:"contract_addr,omitempty"` +} + +func (x *MsgCreate2Response) Reset() { + *x = MsgCreate2Response{} + if protoimpl.UnsafeEnabled { + mi := &file_minievm_evm_v1_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCreate2Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreate2Response) ProtoMessage() {} + +// Deprecated: Use MsgCreate2Response.ProtoReflect.Descriptor instead. +func (*MsgCreate2Response) Descriptor() ([]byte, []int) { + return file_minievm_evm_v1_tx_proto_rawDescGZIP(), []int{3} +} + +func (x *MsgCreate2Response) GetResult() string { + if x != nil { + return x.Result + } + return "" +} + +func (x *MsgCreate2Response) GetContractAddr() string { + if x != nil { + return x.ContractAddr + } + return "" +} + // MsgCall is a message to call an Ethereum contract. type MsgCall struct { state protoimpl.MessageState @@ -3059,7 +4174,7 @@ type MsgCall struct { // Sender is the that actor that signed the messages Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` // ContractAddr is the contract address to be executed. - // It can be cosmos address or hex encoded address (0x prefixed). + // It can be cosmos address or hex encoded address. ContractAddr string `protobuf:"bytes,2,opt,name=contract_addr,json=contractAddr,proto3" json:"contract_addr,omitempty"` // Hex encoded execution input bytes. Input string `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"` @@ -3068,7 +4183,7 @@ type MsgCall struct { func (x *MsgCall) Reset() { *x = MsgCall{} if protoimpl.UnsafeEnabled { - mi := &file_minievm_evm_v1_tx_proto_msgTypes[2] + mi := &file_minievm_evm_v1_tx_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3082,7 +4197,7 @@ func (*MsgCall) ProtoMessage() {} // Deprecated: Use MsgCall.ProtoReflect.Descriptor instead. func (*MsgCall) Descriptor() ([]byte, []int) { - return file_minievm_evm_v1_tx_proto_rawDescGZIP(), []int{2} + return file_minievm_evm_v1_tx_proto_rawDescGZIP(), []int{4} } func (x *MsgCall) GetSender() string { @@ -3119,7 +4234,7 @@ type MsgCallResponse struct { func (x *MsgCallResponse) Reset() { *x = MsgCallResponse{} if protoimpl.UnsafeEnabled { - mi := &file_minievm_evm_v1_tx_proto_msgTypes[3] + mi := &file_minievm_evm_v1_tx_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3133,7 +4248,7 @@ func (*MsgCallResponse) ProtoMessage() {} // Deprecated: Use MsgCallResponse.ProtoReflect.Descriptor instead. func (*MsgCallResponse) Descriptor() ([]byte, []int) { - return file_minievm_evm_v1_tx_proto_rawDescGZIP(), []int{3} + return file_minievm_evm_v1_tx_proto_rawDescGZIP(), []int{5} } func (x *MsgCallResponse) GetResult() string { @@ -3168,7 +4283,7 @@ type MsgUpdateParams struct { func (x *MsgUpdateParams) Reset() { *x = MsgUpdateParams{} if protoimpl.UnsafeEnabled { - mi := &file_minievm_evm_v1_tx_proto_msgTypes[4] + mi := &file_minievm_evm_v1_tx_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3182,7 +4297,7 @@ func (*MsgUpdateParams) ProtoMessage() {} // Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return file_minievm_evm_v1_tx_proto_rawDescGZIP(), []int{4} + return file_minievm_evm_v1_tx_proto_rawDescGZIP(), []int{6} } func (x *MsgUpdateParams) GetAuthority() string { @@ -3210,7 +4325,7 @@ type MsgUpdateParamsResponse struct { func (x *MsgUpdateParamsResponse) Reset() { *x = MsgUpdateParamsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_minievm_evm_v1_tx_proto_msgTypes[5] + mi := &file_minievm_evm_v1_tx_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3224,7 +4339,7 @@ func (*MsgUpdateParamsResponse) ProtoMessage() {} // Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return file_minievm_evm_v1_tx_proto_rawDescGZIP(), []int{5} + return file_minievm_evm_v1_tx_proto_rawDescGZIP(), []int{7} } var File_minievm_evm_v1_tx_proto protoreflect.FileDescriptor @@ -3252,59 +4367,77 @@ var file_minievm_evm_v1_tx_proto_rawDesc = []byte{ 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, - 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x22, 0x93, 0x01, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x43, 0x61, - 0x6c, 0x6c, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, - 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x3a, - 0x1b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, - 0x0b, 0x65, 0x76, 0x6d, 0x2f, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6c, 0x6c, 0x22, 0x5d, 0x0a, 0x0f, - 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, - 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, - 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x22, 0x94, 0x01, 0x0a, 0x0f, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, - 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, - 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf0, 0x01, - 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x46, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, - 0x19, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x1a, 0x21, 0x2e, 0x6d, 0x69, 0x6e, - 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, - 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x17, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, - 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6c, 0x6c, 0x1a, 0x1f, - 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x58, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x1f, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x1a, 0x27, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, - 0x42, 0x9e, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, - 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2f, 0x65, 0x76, 0x6d, - 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x76, 0x6d, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x45, 0x58, 0xaa, - 0x02, 0x0e, 0x4d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x45, 0x76, 0x6d, 0x2e, 0x56, 0x31, - 0xca, 0x02, 0x0e, 0x4d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x5c, 0x45, 0x76, 0x6d, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x1a, 0x4d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x5c, 0x45, 0x76, 0x6d, 0x5c, - 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x10, 0x4d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x3a, 0x3a, 0x45, 0x76, 0x6d, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x22, 0x86, 0x01, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x32, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, + 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, + 0x61, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x3a, + 0x1e, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, + 0x0e, 0x65, 0x76, 0x6d, 0x2f, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x32, 0x22, + 0x51, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x32, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x23, 0x0a, + 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, + 0x64, 0x72, 0x22, 0x93, 0x01, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x30, + 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, + 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x3a, 0x1b, 0x82, 0xe7, 0xb0, + 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x0b, 0x65, 0x76, 0x6d, + 0x2f, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6c, 0x6c, 0x22, 0x5d, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x43, + 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, + 0x01, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x22, 0x94, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, + 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, + 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x0e, + 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, + 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xbb, 0x02, 0x0a, 0x03, 0x4d, 0x73, + 0x67, 0x12, 0x46, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x6d, 0x69, + 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x1a, 0x21, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, + 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x07, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x32, 0x12, 0x1a, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, + 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x32, + 0x1a, 0x22, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x32, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x17, 0x2e, 0x6d, + 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x43, 0x61, 0x6c, 0x6c, 0x1a, 0x1f, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, + 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1f, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, + 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x27, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, + 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x9e, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, + 0x6d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x07, + 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x69, 0x6e, 0x69, + 0x65, 0x76, 0x6d, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x76, 0x6d, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x4d, 0x45, 0x58, 0xaa, 0x02, 0x0e, 0x4d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, + 0x2e, 0x45, 0x76, 0x6d, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0e, 0x4d, 0x69, 0x6e, 0x69, 0x65, 0x76, + 0x6d, 0x5c, 0x45, 0x76, 0x6d, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1a, 0x4d, 0x69, 0x6e, 0x69, 0x65, + 0x76, 0x6d, 0x5c, 0x45, 0x76, 0x6d, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x4d, 0x69, 0x6e, 0x69, 0x65, 0x76, 0x6d, 0x3a, + 0x3a, 0x45, 0x76, 0x6d, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3319,28 +4452,32 @@ func file_minievm_evm_v1_tx_proto_rawDescGZIP() []byte { return file_minievm_evm_v1_tx_proto_rawDescData } -var file_minievm_evm_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_minievm_evm_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_minievm_evm_v1_tx_proto_goTypes = []interface{}{ (*MsgCreate)(nil), // 0: minievm.evm.v1.MsgCreate (*MsgCreateResponse)(nil), // 1: minievm.evm.v1.MsgCreateResponse - (*MsgCall)(nil), // 2: minievm.evm.v1.MsgCall - (*MsgCallResponse)(nil), // 3: minievm.evm.v1.MsgCallResponse - (*MsgUpdateParams)(nil), // 4: minievm.evm.v1.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 5: minievm.evm.v1.MsgUpdateParamsResponse - (*Log)(nil), // 6: minievm.evm.v1.Log - (*Params)(nil), // 7: minievm.evm.v1.Params + (*MsgCreate2)(nil), // 2: minievm.evm.v1.MsgCreate2 + (*MsgCreate2Response)(nil), // 3: minievm.evm.v1.MsgCreate2Response + (*MsgCall)(nil), // 4: minievm.evm.v1.MsgCall + (*MsgCallResponse)(nil), // 5: minievm.evm.v1.MsgCallResponse + (*MsgUpdateParams)(nil), // 6: minievm.evm.v1.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 7: minievm.evm.v1.MsgUpdateParamsResponse + (*Log)(nil), // 8: minievm.evm.v1.Log + (*Params)(nil), // 9: minievm.evm.v1.Params } var file_minievm_evm_v1_tx_proto_depIdxs = []int32{ - 6, // 0: minievm.evm.v1.MsgCallResponse.logs:type_name -> minievm.evm.v1.Log - 7, // 1: minievm.evm.v1.MsgUpdateParams.params:type_name -> minievm.evm.v1.Params + 8, // 0: minievm.evm.v1.MsgCallResponse.logs:type_name -> minievm.evm.v1.Log + 9, // 1: minievm.evm.v1.MsgUpdateParams.params:type_name -> minievm.evm.v1.Params 0, // 2: minievm.evm.v1.Msg.Create:input_type -> minievm.evm.v1.MsgCreate - 2, // 3: minievm.evm.v1.Msg.Call:input_type -> minievm.evm.v1.MsgCall - 4, // 4: minievm.evm.v1.Msg.UpdateParams:input_type -> minievm.evm.v1.MsgUpdateParams - 1, // 5: minievm.evm.v1.Msg.Create:output_type -> minievm.evm.v1.MsgCreateResponse - 3, // 6: minievm.evm.v1.Msg.Call:output_type -> minievm.evm.v1.MsgCallResponse - 5, // 7: minievm.evm.v1.Msg.UpdateParams:output_type -> minievm.evm.v1.MsgUpdateParamsResponse - 5, // [5:8] is the sub-list for method output_type - 2, // [2:5] is the sub-list for method input_type + 2, // 3: minievm.evm.v1.Msg.Create2:input_type -> minievm.evm.v1.MsgCreate2 + 4, // 4: minievm.evm.v1.Msg.Call:input_type -> minievm.evm.v1.MsgCall + 6, // 5: minievm.evm.v1.Msg.UpdateParams:input_type -> minievm.evm.v1.MsgUpdateParams + 1, // 6: minievm.evm.v1.Msg.Create:output_type -> minievm.evm.v1.MsgCreateResponse + 3, // 7: minievm.evm.v1.Msg.Create2:output_type -> minievm.evm.v1.MsgCreate2Response + 5, // 8: minievm.evm.v1.Msg.Call:output_type -> minievm.evm.v1.MsgCallResponse + 7, // 9: minievm.evm.v1.Msg.UpdateParams:output_type -> minievm.evm.v1.MsgUpdateParamsResponse + 6, // [6:10] is the sub-list for method output_type + 2, // [2:6] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name @@ -3378,7 +4515,7 @@ func file_minievm_evm_v1_tx_proto_init() { } } file_minievm_evm_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCall); i { + switch v := v.(*MsgCreate2); i { case 0: return &v.state case 1: @@ -3390,7 +4527,7 @@ func file_minievm_evm_v1_tx_proto_init() { } } file_minievm_evm_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCallResponse); i { + switch v := v.(*MsgCreate2Response); i { case 0: return &v.state case 1: @@ -3402,7 +4539,7 @@ func file_minievm_evm_v1_tx_proto_init() { } } file_minievm_evm_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateParams); i { + switch v := v.(*MsgCall); i { case 0: return &v.state case 1: @@ -3414,6 +4551,30 @@ func file_minievm_evm_v1_tx_proto_init() { } } file_minievm_evm_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCallResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_minievm_evm_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_minievm_evm_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateParamsResponse); i { case 0: return &v.state @@ -3432,7 +4593,7 @@ func file_minievm_evm_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_minievm_evm_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/api/minievm/evm/v1/tx_grpc.pb.go b/api/minievm/evm/v1/tx_grpc.pb.go index 05d0509..64cbcf1 100644 --- a/api/minievm/evm/v1/tx_grpc.pb.go +++ b/api/minievm/evm/v1/tx_grpc.pb.go @@ -20,6 +20,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( Msg_Create_FullMethodName = "/minievm.evm.v1.Msg/Create" + Msg_Create2_FullMethodName = "/minievm.evm.v1.Msg/Create2" Msg_Call_FullMethodName = "/minievm.evm.v1.Msg/Call" Msg_UpdateParams_FullMethodName = "/minievm.evm.v1.Msg/UpdateParams" ) @@ -28,8 +29,10 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type MsgClient interface { - // Create defines a method submitting Ethereum contract byte code. + // Create defines a method calling create of EVM. Create(ctx context.Context, in *MsgCreate, opts ...grpc.CallOption) (*MsgCreateResponse, error) + // Create2 defines a method calling create2 of EVM. + Create2(ctx context.Context, in *MsgCreate2, opts ...grpc.CallOption) (*MsgCreate2Response, error) // Call defines a method submitting Ethereum transactions. Call(ctx context.Context, in *MsgCall, opts ...grpc.CallOption) (*MsgCallResponse, error) // UpdateParams defines an operation for updating the x/evm module @@ -54,6 +57,15 @@ func (c *msgClient) Create(ctx context.Context, in *MsgCreate, opts ...grpc.Call return out, nil } +func (c *msgClient) Create2(ctx context.Context, in *MsgCreate2, opts ...grpc.CallOption) (*MsgCreate2Response, error) { + out := new(MsgCreate2Response) + err := c.cc.Invoke(ctx, Msg_Create2_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) Call(ctx context.Context, in *MsgCall, opts ...grpc.CallOption) (*MsgCallResponse, error) { out := new(MsgCallResponse) err := c.cc.Invoke(ctx, Msg_Call_FullMethodName, in, out, opts...) @@ -76,8 +88,10 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts // All implementations must embed UnimplementedMsgServer // for forward compatibility type MsgServer interface { - // Create defines a method submitting Ethereum contract byte code. + // Create defines a method calling create of EVM. Create(context.Context, *MsgCreate) (*MsgCreateResponse, error) + // Create2 defines a method calling create2 of EVM. + Create2(context.Context, *MsgCreate2) (*MsgCreate2Response, error) // Call defines a method submitting Ethereum transactions. Call(context.Context, *MsgCall) (*MsgCallResponse, error) // UpdateParams defines an operation for updating the x/evm module @@ -93,6 +107,9 @@ type UnimplementedMsgServer struct { func (UnimplementedMsgServer) Create(context.Context, *MsgCreate) (*MsgCreateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") } +func (UnimplementedMsgServer) Create2(context.Context, *MsgCreate2) (*MsgCreate2Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create2 not implemented") +} func (UnimplementedMsgServer) Call(context.Context, *MsgCall) (*MsgCallResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Call not implemented") } @@ -130,6 +147,24 @@ func _Msg_Create_Handler(srv interface{}, ctx context.Context, dec func(interfac return interceptor(ctx, in, info, handler) } +func _Msg_Create2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreate2) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Create2(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_Create2_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Create2(ctx, req.(*MsgCreate2)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_Call_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgCall) if err := dec(in); err != nil { @@ -177,6 +212,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "Create", Handler: _Msg_Create_Handler, }, + { + MethodName: "Create2", + Handler: _Msg_Create2_Handler, + }, { MethodName: "Call", Handler: _Msg_Call_Handler, diff --git a/proto/minievm/evm/v1/query.proto b/proto/minievm/evm/v1/query.proto index 37010b6..a1eb249 100644 --- a/proto/minievm/evm/v1/query.proto +++ b/proto/minievm/evm/v1/query.proto @@ -85,7 +85,20 @@ message QueryCallRequest { // hex encoded call input string input = 3; // whether to trace the call - bool with_trace = 4; + // `nil` means no trace + TraceOptions trace_options = 4; +} + +// TraceOption is the option for tracing +message TraceOptions { + // whether to trace memory + bool with_memory = 1; + // whether to trace stack + bool with_stack = 2; + // wtether to trace storage + bool with_storage = 3; + // whether to return data trace + bool with_return_data = 4; } // QueryCallResponse is the response type for the Query/Call RPC diff --git a/x/evm/autocli.go b/x/evm/autocli.go index e998e55..ed9e7dc 100644 --- a/x/evm/autocli.go +++ b/x/evm/autocli.go @@ -1 +1,89 @@ package evm + +import ( + "fmt" + + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + + "github.com/cosmos/cosmos-sdk/version" + evmv1 "github.com/initia-labs/minievm/api/minievm/evm/v1" +) + +// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. +func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Query: &autocliv1.ServiceCommandDescriptor{ + Service: evmv1.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Code", + Use: "code [contract_addr]", + Short: "Query contract code bytes", + Example: fmt.Sprintf("%s query evm code 0x1", version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "contract_addr"}, + }, + }, + { + RpcMethod: "State", + Use: "state [contract_addr] [key]", + Short: "Query contract state", + Example: fmt.Sprintf("%s query evm state 0x1 0x123...", version.AppName), + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "contract_addr"}, + {ProtoField: "key"}, + }, + }, + { + RpcMethod: "ContractAddrByDenom", + Use: "contract-addr-by-denom [denom]", + Short: "Query corresponding contract address by denom", + Alias: []string{"contract-addr"}, + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "denom"}, + }, + }, + { + RpcMethod: "Denom", + Use: "denom [contract_addr]", + Short: "Query corresponding denom by contract address", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "contract_addr"}, + }, + }, + { + RpcMethod: "Params", + Use: "params", + Short: "Query the evm module params", + }, + { + RpcMethod: "Call", + Skip: true, + }, + }, + EnhanceCustomCommand: true, // We still have manual commands in evm that we want to keep + }, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: evmv1.Msg_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "MsgCreate", + Skip: true, + }, + { + RpcMethod: "MsgCreate2", + Skip: true, + }, + { + RpcMethod: "MsgCall", + Skip: true, + }, + { + RpcMethod: "UpdateParams", + Skip: true, // skipped because authority gated + }, + }, + EnhanceCustomCommand: false, // use custom commands only until v0.51 + }, + } +} diff --git a/x/evm/client/cli/flags.go b/x/evm/client/cli/flags.go new file mode 100644 index 0000000..5079764 --- /dev/null +++ b/x/evm/client/cli/flags.go @@ -0,0 +1,23 @@ +package cli + +import ( + flag "github.com/spf13/pflag" +) + +const ( + FlagTrace = "trace" + FlagWithStorage = "with-storage" + FlagWithMemory = "with-memory" + FlagWithStack = "with-stack" + FlagWithReturnData = "with-return-data" +) + +func FlagTraceOptions() *flag.FlagSet { + fs := flag.NewFlagSet("", flag.ContinueOnError) + fs.Bool(FlagTrace, false, `Trace the execution of the transaction`) + fs.Bool(FlagWithStorage, false, `Trace the storage of the contract`) + fs.Bool(FlagWithMemory, false, `Trace the memory of the contract`) + fs.Bool(FlagWithStack, false, `Trace the stack of the contract`) + fs.Bool(FlagWithReturnData, false, `Trace the return data of the contract`) + return fs +} diff --git a/x/evm/client/cli/query.go b/x/evm/client/cli/query.go new file mode 100644 index 0000000..a22317b --- /dev/null +++ b/x/evm/client/cli/query.go @@ -0,0 +1,108 @@ +package cli + +import ( + "context" + + "cosmossdk.io/core/address" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + + "github.com/initia-labs/minievm/x/evm/types" +) + +func GetQueryCmd(ac address.Codec) *cobra.Command { + queryCmd := &cobra.Command{ + Use: types.ModuleName, + Short: "Querying commands for the move module", + DisableFlagParsing: true, + SuggestionsMinimumDistance: 2, + RunE: client.ValidateCmd, + } + queryCmd.AddCommand( + GetCmdCall(ac), + ) + return queryCmd +} + +func GetCmdCall(ac address.Codec) *cobra.Command { + cmd := &cobra.Command{ + Use: "call [sender] [contract-addr] [input-hex-string]", + Short: "Call deployed evm contract", + Long: "Call deployed evm contract", + Args: cobra.ExactArgs(3), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + _, err = ac.StringToBytes(args[0]) + if err != nil { + return err + } + + _, err = types.ContractAddressFromString(ac, args[1]) + if err != nil { + return err + } + + _, err = hexutil.Decode(args[2]) + if err != nil { + return err + } + + trace, err := cmd.Flags().GetBool(FlagTrace) + if err != nil { + return err + } + + var traceOption *types.TraceOptions + if trace { + withMemory, err := cmd.Flags().GetBool(FlagWithMemory) + if err != nil { + return err + } + withStack, err := cmd.Flags().GetBool(FlagWithStack) + if err != nil { + return err + } + withStorage, err := cmd.Flags().GetBool(FlagWithStorage) + if err != nil { + return err + } + withReturnData, err := cmd.Flags().GetBool(FlagWithReturnData) + if err != nil { + return err + } + traceOption = &types.TraceOptions{ + WithMemory: withMemory, + WithStack: withStack, + WithStorage: withStorage, + WithReturnData: withReturnData, + } + } + + queryClient := types.NewQueryClient(clientCtx) + res, err := queryClient.Call( + context.Background(), + &types.QueryCallRequest{ + Sender: args[0], + ContractAddr: args[1], + Input: args[2], + TraceOptions: traceOption, + }, + ) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + cmd.Flags().AddFlagSet(FlagTraceOptions()) + flags.AddQueryFlagsToCmd(cmd) + return cmd +} diff --git a/x/evm/client/cli/tx.go b/x/evm/client/cli/tx.go new file mode 100644 index 0000000..23aa68f --- /dev/null +++ b/x/evm/client/cli/tx.go @@ -0,0 +1,200 @@ +package cli + +import ( + "fmt" + "os" + "strings" + + "cosmossdk.io/core/address" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/tx" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/version" + + "github.com/initia-labs/minievm/x/evm/types" +) + +// GetTxCmd returns the transaction commands for this module +func GetTxCmd(ac address.Codec) *cobra.Command { + txCmd := &cobra.Command{ + Use: types.ModuleName, + Short: "EVM transaction subcommands", + DisableFlagParsing: true, + SuggestionsMinimumDistance: 2, + RunE: client.ValidateCmd, + } + txCmd.AddCommand( + CreateCmd(ac), + Create2Cmd(ac), + CallCmd(ac), + ) + return txCmd +} + +func CreateCmd(ac address.Codec) *cobra.Command { + cmd := &cobra.Command{ + Use: "create [bin file1] [bin file2] [...]", + Short: "Deploy evm contracts with CREATE opcode", + Long: strings.TrimSpace( + fmt.Sprintf(` +Deploy evm contracts. allowed to upload up to 100 files at once. + +Example: +$ %s tx evm create \ + ERC20.bin \ + CustomDex.bin --from mykey +`, version.AppName, + ), + ), + Args: cobra.RangeArgs(1, 100), + Aliases: []string{"CREATE"}, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + contracts := make([][]byte, len(args)) + for i, arg := range args { + hexStrBz, err := os.ReadFile(arg) + if err != nil { + return err + } + + contracts[i], err = hexutil.Decode("0x" + string(hexStrBz)) + if err != nil { + return err + } + } + + sender, err := ac.BytesToString(clientCtx.FromAddress) + if err != nil { + return err + } + + msgs := make([]sdk.Msg, len(contracts)) + for i, contract := range contracts { + msgs[i] = &types.MsgCreate{ + Sender: sender, + Code: hexutil.Encode(contract), + } + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msgs...) + }, + } + + flags.AddTxFlagsToCmd(cmd) + return cmd +} + +func Create2Cmd(ac address.Codec) *cobra.Command { + cmd := &cobra.Command{ + Use: "create2 [bin file1] [bin file2] [...]", + Short: "Deploy evm contracts with CREATE2 opcode", + Long: strings.TrimSpace( + fmt.Sprintf(` +Deploy evm contracts. allowed to upload up to 100 files at once. + +Example: +$ %s tx evm create2 \ + ERC20.bin \ + CustomDex.bin --from mykey +`, version.AppName, + ), + ), + Args: cobra.RangeArgs(1, 100), + Aliases: []string{"CREATE2"}, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + contracts := make([][]byte, len(args)) + for i, arg := range args { + hexStrBz, err := os.ReadFile(arg) + if err != nil { + return err + } + + contracts[i], err = hexutil.Decode("0x" + string(hexStrBz)) + if err != nil { + return err + } + } + + sender, err := ac.BytesToString(clientCtx.FromAddress) + if err != nil { + return err + } + + msgs := make([]sdk.Msg, len(contracts)) + for i, contract := range contracts { + msgs[i] = &types.MsgCreate2{ + Sender: sender, + Code: hexutil.Encode(contract), + } + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msgs...) + }, + } + + flags.AddTxFlagsToCmd(cmd) + return cmd +} + +func CallCmd(ac address.Codec) *cobra.Command { + cmd := &cobra.Command{ + Use: "call [contract-addr] [input-hex-string]", + Short: "Call a evm contract", + Long: strings.TrimSpace( + fmt.Sprintf(` +Call a contract with input bytes. + +Example: +$ %s tx evm call 0x1 0x123456 --from mykey +`, version.AppName, + ), + ), + Args: cobra.ExactArgs(2), + Aliases: []string{"CALL"}, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + _, err = types.ContractAddressFromString(ac, args[0]) + if err != nil { + return err + } + + _, err = hexutil.Decode(args[1]) + if err != nil { + return err + } + + sender, err := ac.BytesToString(clientCtx.FromAddress) + if err != nil { + return err + } + + msg := types.MsgCall{ + Sender: sender, + ContractAddr: args[0], + Input: args[1], + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + return cmd +} diff --git a/x/evm/config/config.go b/x/evm/config/config.go index 269ca2a..fa9b85f 100644 --- a/x/evm/config/config.go +++ b/x/evm/config/config.go @@ -16,20 +16,12 @@ const DefaultContractSimulationGasLimit = uint64(3_000_000) const ( flagContractSimulationGasLimit = "evm.contract-simulation-gas-limit" flagContractQueryGasLimit = "evm.contract-query-gas-limit" - flagTracingEnableMemory = "evm.tracing-enable-memory" - flagTracingEnableStack = "evm.tracing-enable-stack" - flagTracingEnableStorage = "evm.tracing-enable-storage" - flagTracingEnableReturnData = "evm.tracing-enable-return-data" ) // EVMConfig is the extra config required for evm type EVMConfig struct { ContractSimulationGasLimit uint64 `mapstructure:"contract-simulation-gas-limit"` ContractQueryGasLimit uint64 `mapstructure:"contract-query-gas-limit"` - TracingEnableMemory bool `mapstructure:"tracing-enable-memory"` - TracingEnableStack bool `mapstructure:"tracing-enable-stack"` - TracingEnableStorage bool `mapstructure:"tracing-enable-storage"` - TracingEnableReturnData bool `mapstructure:"tracing-enable-return-data"` } // DefaultEVMConfig returns the default settings for EVMConfig @@ -37,10 +29,6 @@ func DefaultEVMConfig() EVMConfig { return EVMConfig{ ContractSimulationGasLimit: DefaultContractSimulationGasLimit, ContractQueryGasLimit: DefaultContractQueryGasLimit, - TracingEnableMemory: false, - TracingEnableStack: false, - TracingEnableStorage: false, - TracingEnableReturnData: false, } } @@ -49,10 +37,6 @@ func GetConfig(appOpts servertypes.AppOptions) EVMConfig { return EVMConfig{ ContractSimulationGasLimit: cast.ToUint64(appOpts.Get(flagContractSimulationGasLimit)), ContractQueryGasLimit: cast.ToUint64(appOpts.Get(flagContractQueryGasLimit)), - TracingEnableMemory: cast.ToBool(appOpts.Get(flagTracingEnableMemory)), - TracingEnableStack: cast.ToBool(appOpts.Get(flagTracingEnableStack)), - TracingEnableStorage: cast.ToBool(appOpts.Get(flagTracingEnableStorage)), - TracingEnableReturnData: cast.ToBool(appOpts.Get(flagTracingEnableReturnData)), } } @@ -60,10 +44,6 @@ func GetConfig(appOpts servertypes.AppOptions) EVMConfig { func AddConfigFlags(startCmd *cobra.Command) { startCmd.Flags().Uint64(flagContractSimulationGasLimit, DefaultContractSimulationGasLimit, "Set the max simulation gas for evm contract execution") startCmd.Flags().Uint64(flagContractQueryGasLimit, DefaultContractQueryGasLimit, "Set the max gas that can be spent on executing a query with a Move contract") - startCmd.Flags().Bool(flagTracingEnableMemory, false, "Enable memory tracing at query/Call") - startCmd.Flags().Bool(flagTracingEnableStack, false, "Enable stack tracing at query/Call") - startCmd.Flags().Bool(flagTracingEnableStorage, false, "Enable storage tracing at query/Call") - startCmd.Flags().Bool(flagTracingEnableReturnData, false, "Enable return data tracing at query/Call") } // DefaultConfigTemplate default config template for evm @@ -81,16 +61,4 @@ contract-simulation-gas-limit = "{{ .EVMConfig.ContractSimulationGasLimit }}" # The contract query will invoke contract execution vm, # so we need to restrict the max usage to prevent DoS attack contract-query-gas-limit = "{{ .EVMConfig.ContractQueryGasLimit }}" - -# Enable memory tracing at query/Call -tracing-enable-memory = {{ .EVMConfig.TracingEnableMemory }} - -# Enable stack tracing at query/Call -tracing-enable-stack = {{ .EVMConfig.TracingEnableStack }} - -# Enable storage tracing at query/Call -tracing-enable-storage = {{ .EVMConfig.TracingEnableStorage }} - -# Enable return data tracing at query/Call -tracing-enable-return-data = {{ .EVMConfig.TracingEnableReturnData }} ` diff --git a/x/evm/contracts/counter/Counter.go b/x/evm/contracts/counter/Counter.go index 0519f0b..d758698 100644 --- a/x/evm/contracts/counter/Counter.go +++ b/x/evm/contracts/counter/Counter.go @@ -32,7 +32,7 @@ var ( // CounterMetaData contains all meta data concerning the Counter contract. var CounterMetaData = &bind.MetaData{ ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newCount\",\"type\":\"uint256\"}],\"name\":\"increased\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"callback_id\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"name\":\"ibc_ack\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"callback_id\",\"type\":\"uint64\"}],\"name\":\"ibc_timeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"increase\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"path\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"req\",\"type\":\"string\"}],\"name\":\"query_cosmos\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"result\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561000f575f80fd5b506107cb8061001d5f395ff3fe608060405234801561000f575f80fd5b5060043610610055575f3560e01c806306661abd146100595780630d4f1f9d1461007757806331a503f014610093578063cad23554146100af578063e8927fbc146100df575b5f80fd5b6100616100e9565b60405161006e9190610259565b60405180910390f35b610091600480360381019061008c91906102f5565b6100ee565b005b6100ad60048036038101906100a89190610333565b610135565b005b6100c960048036038101906100c4919061049a565b610159565b6040516100d6919061058a565b60405180910390f35b6100e76101e2565b005b5f5481565b801561011a578167ffffffffffffffff165f8082825461010e91906105d7565b92505081905550610131565b5f8081548092919061012b9061060a565b91905055505b5050565b8067ffffffffffffffff165f8082825461014f91906105d7565b9250508190555050565b606060f273ffffffffffffffffffffffffffffffffffffffff1663cad2355484846040518363ffffffff1660e01b8152600401610197929190610651565b5f604051808303815f875af11580156101b2573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906101da91906106f4565b905092915050565b5f808154809291906101f39061060a565b91905055507f61996fe196f72cb598c483e896a1221263a28bb630480aa89495f737d4a8e3df60015f54610227919061073b565b5f5460405161023792919061076e565b60405180910390a1565b5f819050919050565b61025381610241565b82525050565b5f60208201905061026c5f83018461024a565b92915050565b5f604051905090565b5f80fd5b5f80fd5b5f67ffffffffffffffff82169050919050565b61029f81610283565b81146102a9575f80fd5b50565b5f813590506102ba81610296565b92915050565b5f8115159050919050565b6102d4816102c0565b81146102de575f80fd5b50565b5f813590506102ef816102cb565b92915050565b5f806040838503121561030b5761030a61027b565b5b5f610318858286016102ac565b9250506020610329858286016102e1565b9150509250929050565b5f602082840312156103485761034761027b565b5b5f610355848285016102ac565b91505092915050565b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6103ac82610366565b810181811067ffffffffffffffff821117156103cb576103ca610376565b5b80604052505050565b5f6103dd610272565b90506103e982826103a3565b919050565b5f67ffffffffffffffff82111561040857610407610376565b5b61041182610366565b9050602081019050919050565b828183375f83830152505050565b5f61043e610439846103ee565b6103d4565b90508281526020810184848401111561045a57610459610362565b5b61046584828561041e565b509392505050565b5f82601f8301126104815761048061035e565b5b813561049184826020860161042c565b91505092915050565b5f80604083850312156104b0576104af61027b565b5b5f83013567ffffffffffffffff8111156104cd576104cc61027f565b5b6104d98582860161046d565b925050602083013567ffffffffffffffff8111156104fa576104f961027f565b5b6105068582860161046d565b9150509250929050565b5f81519050919050565b5f82825260208201905092915050565b5f5b8381101561054757808201518184015260208101905061052c565b5f8484015250505050565b5f61055c82610510565b610566818561051a565b935061057681856020860161052a565b61057f81610366565b840191505092915050565b5f6020820190508181035f8301526105a28184610552565b905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6105e182610241565b91506105ec83610241565b9250828201905080821115610604576106036105aa565b5b92915050565b5f61061482610241565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610646576106456105aa565b5b600182019050919050565b5f6040820190508181035f8301526106698185610552565b9050818103602083015261067d8184610552565b90509392505050565b5f610698610693846103ee565b6103d4565b9050828152602081018484840111156106b4576106b3610362565b5b6106bf84828561052a565b509392505050565b5f82601f8301126106db576106da61035e565b5b81516106eb848260208601610686565b91505092915050565b5f602082840312156107095761070861027b565b5b5f82015167ffffffffffffffff8111156107265761072561027f565b5b610732848285016106c7565b91505092915050565b5f61074582610241565b915061075083610241565b9250828203905081811115610768576107676105aa565b5b92915050565b5f6040820190506107815f83018561024a565b61078e602083018461024a565b939250505056fea2646970667358221220c1a0ac3a5cede2574e206e9475cca3f1acea4d7e6e80aaf0c714ae8bd878739564736f6c63430008180033", + Bin: "0x608060405234801561000f575f80fd5b506107cb8061001d5f395ff3fe608060405234801561000f575f80fd5b5060043610610055575f3560e01c806306661abd146100595780630d4f1f9d1461007757806331a503f014610093578063cad23554146100af578063e8927fbc146100df575b5f80fd5b6100616100e9565b60405161006e9190610259565b60405180910390f35b610091600480360381019061008c91906102f5565b6100ee565b005b6100ad60048036038101906100a89190610333565b610135565b005b6100c960048036038101906100c4919061049a565b610159565b6040516100d6919061058a565b60405180910390f35b6100e76101e2565b005b5f5481565b801561011a578167ffffffffffffffff165f8082825461010e91906105d7565b92505081905550610131565b5f8081548092919061012b9061060a565b91905055505b5050565b8067ffffffffffffffff165f8082825461014f91906105d7565b9250508190555050565b606060f273ffffffffffffffffffffffffffffffffffffffff1663cad2355484846040518363ffffffff1660e01b8152600401610197929190610651565b5f604051808303815f875af11580156101b2573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906101da91906106f4565b905092915050565b5f808154809291906101f39061060a565b91905055507f61996fe196f72cb598c483e896a1221263a28bb630480aa89495f737d4a8e3df60015f54610227919061073b565b5f5460405161023792919061076e565b60405180910390a1565b5f819050919050565b61025381610241565b82525050565b5f60208201905061026c5f83018461024a565b92915050565b5f604051905090565b5f80fd5b5f80fd5b5f67ffffffffffffffff82169050919050565b61029f81610283565b81146102a9575f80fd5b50565b5f813590506102ba81610296565b92915050565b5f8115159050919050565b6102d4816102c0565b81146102de575f80fd5b50565b5f813590506102ef816102cb565b92915050565b5f806040838503121561030b5761030a61027b565b5b5f610318858286016102ac565b9250506020610329858286016102e1565b9150509250929050565b5f602082840312156103485761034761027b565b5b5f610355848285016102ac565b91505092915050565b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6103ac82610366565b810181811067ffffffffffffffff821117156103cb576103ca610376565b5b80604052505050565b5f6103dd610272565b90506103e982826103a3565b919050565b5f67ffffffffffffffff82111561040857610407610376565b5b61041182610366565b9050602081019050919050565b828183375f83830152505050565b5f61043e610439846103ee565b6103d4565b90508281526020810184848401111561045a57610459610362565b5b61046584828561041e565b509392505050565b5f82601f8301126104815761048061035e565b5b813561049184826020860161042c565b91505092915050565b5f80604083850312156104b0576104af61027b565b5b5f83013567ffffffffffffffff8111156104cd576104cc61027f565b5b6104d98582860161046d565b925050602083013567ffffffffffffffff8111156104fa576104f961027f565b5b6105068582860161046d565b9150509250929050565b5f81519050919050565b5f82825260208201905092915050565b5f5b8381101561054757808201518184015260208101905061052c565b5f8484015250505050565b5f61055c82610510565b610566818561051a565b935061057681856020860161052a565b61057f81610366565b840191505092915050565b5f6020820190508181035f8301526105a28184610552565b905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6105e182610241565b91506105ec83610241565b9250828201905080821115610604576106036105aa565b5b92915050565b5f61061482610241565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610646576106456105aa565b5b600182019050919050565b5f6040820190508181035f8301526106698185610552565b9050818103602083015261067d8184610552565b90509392505050565b5f610698610693846103ee565b6103d4565b9050828152602081018484840111156106b4576106b3610362565b5b6106bf84828561052a565b509392505050565b5f82601f8301126106db576106da61035e565b5b81516106eb848260208601610686565b91505092915050565b5f602082840312156107095761070861027b565b5b5f82015167ffffffffffffffff8111156107265761072561027f565b5b610732848285016106c7565b91505092915050565b5f61074582610241565b915061075083610241565b9250828203905081811115610768576107676105aa565b5b92915050565b5f6040820190506107815f83018561024a565b61078e602083018461024a565b939250505056fea2646970667358221220bac6de949300a04da59289facef4d40c21d4e7e5bfc8eb709ba9e9d7c92a5b0e64736f6c63430008180033", } // CounterABI is the input ABI used to generate the binding from. diff --git a/x/evm/contracts/i_cosmos/ICosmos.go b/x/evm/contracts/i_cosmos/ICosmos.go index 0f19a2e..0b34f35 100644 --- a/x/evm/contracts/i_cosmos/ICosmos.go +++ b/x/evm/contracts/i_cosmos/ICosmos.go @@ -31,7 +31,7 @@ var ( // ICosmosMetaData contains all meta data concerning the ICosmos contract. var ICosmosMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"msg\",\"type\":\"string\"}],\"name\":\"execute_cosmos\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"path\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"req\",\"type\":\"string\"}],\"name\":\"query_cosmos\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"result\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"evm_address\",\"type\":\"address\"}],\"name\":\"to_cosmos_address\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"cosmos_address\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"cosmos_address\",\"type\":\"string\"}],\"name\":\"to_evm_address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"evm_address\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + ABI: "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"msg\",\"type\":\"string\"}],\"name\":\"execute_cosmos\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"path\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"req\",\"type\":\"string\"}],\"name\":\"query_cosmos\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"result\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"evm_address\",\"type\":\"address\"}],\"name\":\"to_cosmos_address\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"cosmos_address\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"erc20_address\",\"type\":\"address\"}],\"name\":\"to_denom\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"name\":\"to_erc20\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"erc20_address\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"cosmos_address\",\"type\":\"string\"}],\"name\":\"to_evm_address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"evm_address\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } // ICosmosABI is the input ABI used to generate the binding from. @@ -243,6 +243,48 @@ func (_ICosmos *ICosmosTransactorSession) ToCosmosAddress(evm_address common.Add return _ICosmos.Contract.ToCosmosAddress(&_ICosmos.TransactOpts, evm_address) } +// ToDenom is a paid mutator transaction binding the contract method 0x81cf0f6a. +// +// Solidity: function to_denom(address erc20_address) returns(string denom) +func (_ICosmos *ICosmosTransactor) ToDenom(opts *bind.TransactOpts, erc20_address common.Address) (*types.Transaction, error) { + return _ICosmos.contract.Transact(opts, "to_denom", erc20_address) +} + +// ToDenom is a paid mutator transaction binding the contract method 0x81cf0f6a. +// +// Solidity: function to_denom(address erc20_address) returns(string denom) +func (_ICosmos *ICosmosSession) ToDenom(erc20_address common.Address) (*types.Transaction, error) { + return _ICosmos.Contract.ToDenom(&_ICosmos.TransactOpts, erc20_address) +} + +// ToDenom is a paid mutator transaction binding the contract method 0x81cf0f6a. +// +// Solidity: function to_denom(address erc20_address) returns(string denom) +func (_ICosmos *ICosmosTransactorSession) ToDenom(erc20_address common.Address) (*types.Transaction, error) { + return _ICosmos.Contract.ToDenom(&_ICosmos.TransactOpts, erc20_address) +} + +// ToErc20 is a paid mutator transaction binding the contract method 0x2b3324ce. +// +// Solidity: function to_erc20(string denom) returns(address erc20_address) +func (_ICosmos *ICosmosTransactor) ToErc20(opts *bind.TransactOpts, denom string) (*types.Transaction, error) { + return _ICosmos.contract.Transact(opts, "to_erc20", denom) +} + +// ToErc20 is a paid mutator transaction binding the contract method 0x2b3324ce. +// +// Solidity: function to_erc20(string denom) returns(address erc20_address) +func (_ICosmos *ICosmosSession) ToErc20(denom string) (*types.Transaction, error) { + return _ICosmos.Contract.ToErc20(&_ICosmos.TransactOpts, denom) +} + +// ToErc20 is a paid mutator transaction binding the contract method 0x2b3324ce. +// +// Solidity: function to_erc20(string denom) returns(address erc20_address) +func (_ICosmos *ICosmosTransactorSession) ToErc20(denom string) (*types.Transaction, error) { + return _ICosmos.Contract.ToErc20(&_ICosmos.TransactOpts, denom) +} + // ToEvmAddress is a paid mutator transaction binding the contract method 0x4f94a155. // // Solidity: function to_evm_address(string cosmos_address) returns(address evm_address) diff --git a/x/evm/contracts/i_cosmos/ICosmos.sol b/x/evm/contracts/i_cosmos/ICosmos.sol index a4125a5..57099c7 100644 --- a/x/evm/contracts/i_cosmos/ICosmos.sol +++ b/x/evm/contracts/i_cosmos/ICosmos.sol @@ -18,6 +18,12 @@ interface ICosmos { string memory cosmos_address ) external returns (address evm_address); + // convert an ERC20 address to a Cosmos denom + function to_denom(address erc20_address) external returns (string memory denom); + + // convert a Cosmos denom to an ERC20 address + function to_erc20(string memory denom) external returns (address erc20_address); + // record a cosmos message to be executed // after the current message execution. // @@ -44,5 +50,8 @@ interface ICosmos { // "currency_pair_ids": ["BITCOIN/USD", "ETHEREUM/USD"] // } // - function query_cosmos(string memory path, string memory req) external returns (string memory result); + function query_cosmos( + string memory path, + string memory req + ) external returns (string memory result); } diff --git a/x/evm/keeper/context_test.go b/x/evm/keeper/context_test.go index 1a1ffbe..829853b 100644 --- a/x/evm/keeper/context_test.go +++ b/x/evm/keeper/context_test.go @@ -1,13 +1,8 @@ package keeper_test import ( - "fmt" "testing" - "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/vm" @@ -15,9 +10,6 @@ import ( "github.com/initia-labs/minievm/x/evm/contracts/counter" "github.com/initia-labs/minievm/x/evm/contracts/erc20" - "github.com/initia-labs/minievm/x/evm/contracts/i_cosmos" - "github.com/initia-labs/minievm/x/evm/keeper" - "github.com/initia-labs/minievm/x/evm/types" "github.com/stretchr/testify/require" ) @@ -83,123 +75,3 @@ func Test_Call(t *testing.T) { _, _, err = input.EVMKeeper.EVMCall(ctx, caller, contractAddr, queryInputBz) require.ErrorContains(t, err, vm.ErrExecutionReverted.Error()) } - -func Test_ExecuteCosmosMessage(t *testing.T) { - ctx, input := createDefaultTestInput(t) - _, _, addr := keyPubAddr() - _, _, addr2 := keyPubAddr() - evmAddr := common.BytesToAddress(addr.Bytes()) - - erc20Keeper, err := keeper.NewERC20Keeper(&input.EVMKeeper) - require.NoError(t, err) - - // mint native coin - err = erc20Keeper.MintCoins(ctx, addr, sdk.NewCoins( - sdk.NewCoin("bar", math.NewInt(200)), - )) - require.NoError(t, err) - - abi, err := i_cosmos.ICosmosMetaData.GetAbi() - require.NoError(t, err) - - inputBz, err := abi.Pack("execute_cosmos", fmt.Sprintf(` - { - "@type": "/cosmos.bank.v1beta1.MsgSend", - "from_address": "%s", - "to_address": "%s", - "amount": [ - { - "denom": "bar", - "amount": "100" - } - ] - } - `, addr, addr2)) - require.NoError(t, err) - - _, _, err = input.EVMKeeper.EVMCall(ctx, evmAddr, types.CosmosPrecompileAddress, inputBz) - require.NoError(t, err) - - balance := input.BankKeeper.GetBalance(ctx, addr2, "bar") - require.Equal(t, math.NewInt(100), balance.Amount) -} - -func Test_QueryCosmosMessage(t *testing.T) { - ctx, input := createDefaultTestInput(t) - _, _, addr := keyPubAddr() - evmAddr := common.BytesToAddress(addr.Bytes()) - - erc20Keeper, err := keeper.NewERC20Keeper(&input.EVMKeeper) - require.NoError(t, err) - - // mint native coin - err = erc20Keeper.MintCoins(ctx, addr, sdk.NewCoins( - sdk.NewCoin("bar", math.NewInt(200)), - )) - require.NoError(t, err) - - abi, err := i_cosmos.ICosmosMetaData.GetAbi() - require.NoError(t, err) - - inputBz, err := abi.Pack("query_cosmos", "/cosmos.bank.v1beta1.Query/Balance", fmt.Sprintf(`{ - "address": "%s", - "denom": "bar" - }`, addr)) - require.NoError(t, err) - - retBz, _, err := input.EVMKeeper.EVMCall(ctx, evmAddr, types.CosmosPrecompileAddress, inputBz) - require.NoError(t, err) - - unpackedRet, err := abi.Methods["query_cosmos"].Outputs.Unpack(retBz) - require.NoError(t, err) - - var ret banktypes.QueryBalanceResponse - err = input.EncodingConfig.Codec.UnmarshalJSON([]byte(unpackedRet[0].(string)), &ret) - require.NoError(t, err) - - require.Equal(t, math.NewInt(200), ret.Balance.Amount) -} - -func Test_QueryCosmosFromContract(t *testing.T) { - ctx, input := createDefaultTestInput(t) - _, _, addr := keyPubAddr() - - erc20Keeper, err := keeper.NewERC20Keeper(&input.EVMKeeper) - require.NoError(t, err) - - // mint native coin - err = erc20Keeper.MintCoins(ctx, addr, sdk.NewCoins( - sdk.NewCoin("bar", math.NewInt(200)), - )) - require.NoError(t, err) - - counterBz, err := hexutil.Decode(counter.CounterBin) - require.NoError(t, err) - - caller := common.BytesToAddress(addr.Bytes()) - retBz, contractAddr, err := input.EVMKeeper.EVMCreate(ctx, caller, counterBz) - require.NoError(t, err) - require.NotEmpty(t, retBz) - require.Len(t, contractAddr, 20) - - abi, err := counter.CounterMetaData.GetAbi() - require.NoError(t, err) - - inputBz, err := abi.Pack("query_cosmos", "/cosmos.bank.v1beta1.Query/Balance", fmt.Sprintf(`{ - "address": "%s", - "denom": "bar" - }`, addr)) - require.NoError(t, err) - - retBz, _, err = input.EVMKeeper.EVMCall(ctx, contractAddr, types.CosmosPrecompileAddress, inputBz) - require.NoError(t, err) - - unpackedRet, err := abi.Methods["query_cosmos"].Outputs.Unpack(retBz) - require.NoError(t, err) - - var ret banktypes.QueryBalanceResponse - err = input.EncodingConfig.Codec.UnmarshalJSON([]byte(unpackedRet[0].(string)), &ret) - require.NoError(t, err) - - require.Equal(t, math.NewInt(200), ret.Balance.Amount) -} diff --git a/x/evm/keeper/precompiles.go b/x/evm/keeper/precompiles.go index 64fce1b..b899927 100644 --- a/x/evm/keeper/precompiles.go +++ b/x/evm/keeper/precompiles.go @@ -24,7 +24,14 @@ func (k *Keeper) loadPrecompiles() error { return err } - cosmosPrecompile, err := cosmosprecompile.NewCosmosPrecompile(k.cdc, k.ac, k.accountKeeper, k.grpcRouter, k.queryCosmosWhitelist) + cosmosPrecompile, err := cosmosprecompile.NewCosmosPrecompile( + k.cdc, + k.ac, + k.accountKeeper, + k, + k.grpcRouter, + k.queryCosmosWhitelist, + ) if err != nil { return err } diff --git a/x/evm/keeper/precompiles_test.go b/x/evm/keeper/precompiles_test.go new file mode 100644 index 0000000..038f6e9 --- /dev/null +++ b/x/evm/keeper/precompiles_test.go @@ -0,0 +1,201 @@ +package keeper_test + +import ( + "fmt" + "testing" + + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/initia-labs/minievm/x/evm/contracts/counter" + "github.com/initia-labs/minievm/x/evm/contracts/i_cosmos" + "github.com/initia-labs/minievm/x/evm/keeper" + "github.com/initia-labs/minievm/x/evm/types" + "github.com/stretchr/testify/require" +) + +func Test_ExecuteCosmosMessage(t *testing.T) { + ctx, input := createDefaultTestInput(t) + _, _, addr := keyPubAddr() + _, _, addr2 := keyPubAddr() + evmAddr := common.BytesToAddress(addr.Bytes()) + + erc20Keeper, err := keeper.NewERC20Keeper(&input.EVMKeeper) + require.NoError(t, err) + + // mint native coin + err = erc20Keeper.MintCoins(ctx, addr, sdk.NewCoins( + sdk.NewCoin("bar", math.NewInt(200)), + )) + require.NoError(t, err) + + abi, err := i_cosmos.ICosmosMetaData.GetAbi() + require.NoError(t, err) + + inputBz, err := abi.Pack("execute_cosmos", fmt.Sprintf(` + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "%s", + "to_address": "%s", + "amount": [ + { + "denom": "bar", + "amount": "100" + } + ] + } + `, addr, addr2)) + require.NoError(t, err) + + _, _, err = input.EVMKeeper.EVMCall(ctx, evmAddr, types.CosmosPrecompileAddress, inputBz) + require.NoError(t, err) + + balance := input.BankKeeper.GetBalance(ctx, addr2, "bar") + require.Equal(t, math.NewInt(100), balance.Amount) +} + +func Test_QueryCosmosMessage(t *testing.T) { + ctx, input := createDefaultTestInput(t) + _, _, addr := keyPubAddr() + evmAddr := common.BytesToAddress(addr.Bytes()) + + erc20Keeper, err := keeper.NewERC20Keeper(&input.EVMKeeper) + require.NoError(t, err) + + // mint native coin + err = erc20Keeper.MintCoins(ctx, addr, sdk.NewCoins( + sdk.NewCoin("bar", math.NewInt(200)), + )) + require.NoError(t, err) + + abi, err := i_cosmos.ICosmosMetaData.GetAbi() + require.NoError(t, err) + + inputBz, err := abi.Pack("query_cosmos", "/cosmos.bank.v1beta1.Query/Balance", fmt.Sprintf(`{ + "address": "%s", + "denom": "bar" + }`, addr)) + require.NoError(t, err) + + retBz, _, err := input.EVMKeeper.EVMCall(ctx, evmAddr, types.CosmosPrecompileAddress, inputBz) + require.NoError(t, err) + + unpackedRet, err := abi.Methods["query_cosmos"].Outputs.Unpack(retBz) + require.NoError(t, err) + + var ret banktypes.QueryBalanceResponse + err = input.EncodingConfig.Codec.UnmarshalJSON([]byte(unpackedRet[0].(string)), &ret) + require.NoError(t, err) + + require.Equal(t, math.NewInt(200), ret.Balance.Amount) +} + +func Test_QueryCosmosFromContract(t *testing.T) { + ctx, input := createDefaultTestInput(t) + _, _, addr := keyPubAddr() + + erc20Keeper, err := keeper.NewERC20Keeper(&input.EVMKeeper) + require.NoError(t, err) + + // mint native coin + err = erc20Keeper.MintCoins(ctx, addr, sdk.NewCoins( + sdk.NewCoin("bar", math.NewInt(200)), + )) + require.NoError(t, err) + + counterBz, err := hexutil.Decode(counter.CounterBin) + require.NoError(t, err) + + caller := common.BytesToAddress(addr.Bytes()) + retBz, contractAddr, err := input.EVMKeeper.EVMCreate(ctx, caller, counterBz) + require.NoError(t, err) + require.NotEmpty(t, retBz) + require.Len(t, contractAddr, 20) + + abi, err := counter.CounterMetaData.GetAbi() + require.NoError(t, err) + + inputBz, err := abi.Pack("query_cosmos", "/cosmos.bank.v1beta1.Query/Balance", fmt.Sprintf(`{ + "address": "%s", + "denom": "bar" + }`, addr)) + require.NoError(t, err) + + retBz, _, err = input.EVMKeeper.EVMCall(ctx, contractAddr, types.CosmosPrecompileAddress, inputBz) + require.NoError(t, err) + + unpackedRet, err := abi.Methods["query_cosmos"].Outputs.Unpack(retBz) + require.NoError(t, err) + + var ret banktypes.QueryBalanceResponse + err = input.EncodingConfig.Codec.UnmarshalJSON([]byte(unpackedRet[0].(string)), &ret) + require.NoError(t, err) + + require.Equal(t, math.NewInt(200), ret.Balance.Amount) +} + +func Test_ToDenom(t *testing.T) { + ctx, input := createDefaultTestInput(t) + _, _, addr := keyPubAddr() + evmAddr := common.BytesToAddress(addr.Bytes()) + + erc20Keeper, err := keeper.NewERC20Keeper(&input.EVMKeeper) + require.NoError(t, err) + + // mint native coin + err = erc20Keeper.MintCoins(ctx, addr, sdk.NewCoins( + sdk.NewCoin("bar", math.NewInt(200)), + )) + require.NoError(t, err) + + contractAddr, err := input.EVMKeeper.GetContractAddrByDenom(ctx, "bar") + require.NoError(t, err) + + abi, err := i_cosmos.ICosmosMetaData.GetAbi() + require.NoError(t, err) + + inputBz, err := abi.Pack("to_denom", contractAddr) + require.NoError(t, err) + + retBz, _, err := input.EVMKeeper.EVMCall(ctx, evmAddr, types.CosmosPrecompileAddress, inputBz) + require.NoError(t, err) + + unpackedRet, err := abi.Methods["to_denom"].Outputs.Unpack(retBz) + require.NoError(t, err) + + require.Equal(t, "bar", unpackedRet[0].(string)) +} + +func Test_ToERC20(t *testing.T) { + ctx, input := createDefaultTestInput(t) + _, _, addr := keyPubAddr() + evmAddr := common.BytesToAddress(addr.Bytes()) + + erc20Keeper, err := keeper.NewERC20Keeper(&input.EVMKeeper) + require.NoError(t, err) + + // mint native coin + err = erc20Keeper.MintCoins(ctx, addr, sdk.NewCoins( + sdk.NewCoin("bar", math.NewInt(200)), + )) + require.NoError(t, err) + + contractAddr, err := input.EVMKeeper.GetContractAddrByDenom(ctx, "bar") + require.NoError(t, err) + + abi, err := i_cosmos.ICosmosMetaData.GetAbi() + require.NoError(t, err) + + inputBz, err := abi.Pack("to_erc20", "bar") + require.NoError(t, err) + + retBz, _, err := input.EVMKeeper.EVMCall(ctx, evmAddr, types.CosmosPrecompileAddress, inputBz) + require.NoError(t, err) + + unpackedRet, err := abi.Methods["to_erc20"].Outputs.Unpack(retBz) + require.NoError(t, err) + + require.Equal(t, contractAddr, unpackedRet[0].(common.Address)) +} diff --git a/x/evm/keeper/query_server.go b/x/evm/keeper/query_server.go index fdeede9..56e2171 100644 --- a/x/evm/keeper/query_server.go +++ b/x/evm/keeper/query_server.go @@ -53,12 +53,12 @@ func (qs *queryServerImpl) Call(ctx context.Context, req *types.QueryCallRequest var tracer *tracing.Hooks tracerOutput := new(strings.Builder) - if req.WithTrace { + if req.TraceOptions != nil { tracer = logger.NewJSONLogger(&logger.Config{ - EnableMemory: qs.config.TracingEnableMemory, - DisableStack: !qs.config.TracingEnableStack, - DisableStorage: !qs.config.TracingEnableStorage, - EnableReturnData: qs.config.TracingEnableReturnData, + EnableMemory: req.TraceOptions.WithMemory, + DisableStack: !req.TraceOptions.WithStack, + DisableStorage: !req.TraceOptions.WithStorage, + EnableReturnData: req.TraceOptions.WithReturnData, }, tracerOutput) } diff --git a/x/evm/keeper/query_server_test.go b/x/evm/keeper/query_server_test.go index 60afa01..a288532 100644 --- a/x/evm/keeper/query_server_test.go +++ b/x/evm/keeper/query_server_test.go @@ -41,7 +41,7 @@ func Test_Query_Call(t *testing.T) { Sender: addr.String(), ContractAddr: fooContractAddr.String(), Input: hexutil.Encode(inputBz), - WithTrace: true, + TraceOptions: &types.TraceOptions{}, }) require.NoError(t, err) diff --git a/x/evm/module.go b/x/evm/module.go index f978c39..0b2642e 100644 --- a/x/evm/module.go +++ b/x/evm/module.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - // "github.com/initia-labs/minievm/x/evm/client/cli" + "github.com/initia-labs/minievm/x/evm/client/cli" "github.com/initia-labs/minievm/x/evm/keeper" "github.com/initia-labs/minievm/x/evm/types" ) @@ -79,9 +79,14 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *r types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) //nolint:errcheck } +// GetTxCmd returns the root tx command for the evm module. func (am AppModuleBasic) GetTxCmd() *cobra.Command { - // return cli.GetTxCmd(am.cdc.InterfaceRegistry().SigningContext().AddressCodec()) - return &cobra.Command{} + return cli.GetTxCmd(am.cdc.InterfaceRegistry().SigningContext().AddressCodec()) +} + +// GetQueryCmd returns no root query command for the evm module. +func (b AppModuleBasic) GetQueryCmd() *cobra.Command { + return cli.GetQueryCmd(b.cdc.InterfaceRegistry().SigningContext().AddressCodec()) } // ---------------------------------------------------------------------------- diff --git a/x/evm/precompiles/cosmos/contract.go b/x/evm/precompiles/cosmos/contract.go index ddddf51..22c0fc6 100644 --- a/x/evm/precompiles/cosmos/contract.go +++ b/x/evm/precompiles/cosmos/contract.go @@ -34,6 +34,7 @@ type CosmosPrecompile struct { ac address.Codec ak types.AccountKeeper + edk types.ERC20DenomKeeper grpcRouter types.GRPCRouter queryWhitelist types.QueryCosmosWhitelist @@ -43,6 +44,7 @@ func NewCosmosPrecompile( cdc codec.Codec, ac address.Codec, ak types.AccountKeeper, + edk types.ERC20DenomKeeper, grpcRouter types.GRPCRouter, queryWhitelist types.QueryCosmosWhitelist, ) (CosmosPrecompile, error) { @@ -56,6 +58,7 @@ func NewCosmosPrecompile( cdc: cdc, ac: ac, ak: ak, + edk: edk, grpcRouter: grpcRouter, queryWhitelist: queryWhitelist, }, nil @@ -66,13 +69,6 @@ func (e CosmosPrecompile) WithContext(ctx context.Context) vm.PrecompiledContrac return e } -const ( - METHOD_TO_COSMOS_ADDRESS = "to_cosmos_address" - METHOD_TO_EVM_ADDRESS = "to_evm_address" - METHOD_EXECUTE_COSMOS = "execute_cosmos" - METHOD_QUERY_COSMOS = "query_cosmos" -) - // ExtendedRun implements vm.ExtendedPrecompiledContract. func (e CosmosPrecompile) ExtendedRun(caller vm.ContractRef, input []byte, suppliedGas uint64, readOnly bool) (resBz []byte, usedGas uint64, err error) { method, err := e.ABI.MethodById(input) @@ -104,6 +100,7 @@ func (e CosmosPrecompile) ExtendedRun(caller vm.ContractRef, input []byte, suppl return nil, ctx.GasMeter().GasConsumedToLimit(), types.ErrPrecompileFailed.Wrap(err.Error()) } + // abi encode the response resBz, err = method.Outputs.Pack(addr) if err != nil { return nil, ctx.GasMeter().GasConsumedToLimit(), types.ErrPrecompileFailed.Wrap(err.Error()) @@ -126,6 +123,7 @@ func (e CosmosPrecompile) ExtendedRun(caller vm.ContractRef, input []byte, suppl return nil, ctx.GasMeter().GasConsumedToLimit(), types.ErrInvalidAddressLength.Wrap(hexutil.Encode(addr)) } + // abi encode the response resBz, err = method.Outputs.Pack(common.BytesToAddress(addr)) if err != nil { return nil, ctx.GasMeter().GasConsumedToLimit(), types.ErrPrecompileFailed.Wrap(err.Error()) @@ -210,12 +208,12 @@ func (e CosmosPrecompile) ExtendedRun(caller vm.ContractRef, input []byte, suppl Path: queryCosmosArguments.Path, }) if err != nil { - return nil, ctx.GasMeter().GasConsumedToLimit(), err + return nil, ctx.GasMeter().GasConsumedToLimit(), types.ErrPrecompileFailed.Wrap(err.Error()) } resBz, err = types.ConvertProtoToJSON(e.cdc, protoSet.Response, res.Value) if err != nil { - return nil, ctx.GasMeter().GasConsumedToLimit(), err + return nil, ctx.GasMeter().GasConsumedToLimit(), types.ErrPrecompileFailed.Wrap(err.Error()) } // abi encode the response @@ -223,6 +221,42 @@ func (e CosmosPrecompile) ExtendedRun(caller vm.ContractRef, input []byte, suppl if err != nil { return nil, ctx.GasMeter().GasConsumedToLimit(), types.ErrPrecompileFailed.Wrap(err.Error()) } + case METHOD_TO_DENOM: + ctx.GasMeter().ConsumeGas(TO_DENOM_GAS, "to_denom") + + var toDenomArguments ToDenomArguments + if err := method.Inputs.Copy(&toDenomArguments, args); err != nil { + return nil, ctx.GasMeter().GasConsumedToLimit(), types.ErrPrecompileFailed.Wrap(err.Error()) + } + + denom, err := e.edk.GetDenomByContractAddr(ctx, toDenomArguments.ERC20Address) + if err != nil { + return nil, ctx.GasMeter().GasConsumedToLimit(), types.ErrPrecompileFailed.Wrap(err.Error()) + } + + // abi encode the response + resBz, err = method.Outputs.Pack(denom) + if err != nil { + return nil, ctx.GasMeter().GasConsumedToLimit(), types.ErrPrecompileFailed.Wrap(err.Error()) + } + case METHOD_TO_ERC20: + ctx.GasMeter().ConsumeGas(TO_ERC20_GAS, "to_erc20") + + var toERC20Arguments ToERC20Arguments + if err := method.Inputs.Copy(&toERC20Arguments, args); err != nil { + return nil, ctx.GasMeter().GasConsumedToLimit(), types.ErrPrecompileFailed.Wrap(err.Error()) + } + + contractAddr, err := e.edk.GetContractAddrByDenom(ctx, toERC20Arguments.Denom) + if err != nil { + return nil, ctx.GasMeter().GasConsumedToLimit(), types.ErrPrecompileFailed.Wrap(err.Error()) + } + + // abi encode the response + resBz, err = method.Outputs.Pack(contractAddr) + if err != nil { + return nil, ctx.GasMeter().GasConsumedToLimit(), types.ErrPrecompileFailed.Wrap(err.Error()) + } default: return nil, ctx.GasMeter().GasConsumedToLimit(), types.ErrUnknownPrecompileMethod.Wrap(method.Name) } diff --git a/x/evm/precompiles/cosmos/contract_test.go b/x/evm/precompiles/cosmos/contract_test.go index 0f20497..18a88f4 100644 --- a/x/evm/precompiles/cosmos/contract_test.go +++ b/x/evm/precompiles/cosmos/contract_test.go @@ -62,7 +62,7 @@ func setup() (sdk.Context, codec.Codec, address.Codec, types.AccountKeeper) { func Test_CosmosPrecompile_ToCosmosAddress(t *testing.T) { ctx, cdc, ac, ak := setup() - cosmosPrecompile, err := precompiles.NewCosmosPrecompile(cdc, ac, ak, nil, nil) + cosmosPrecompile, err := precompiles.NewCosmosPrecompile(cdc, ac, ak, nil, nil, nil) require.NoError(t, err) cosmosPrecompile = cosmosPrecompile.WithContext(ctx).(precompiles.CosmosPrecompile) @@ -93,7 +93,7 @@ func Test_CosmosPrecompile_ToCosmosAddress(t *testing.T) { func Test_CosmosPrecompile_ToEVMAddress(t *testing.T) { ctx, cdc, ac, ak := setup() - cosmosPrecompile, err := precompiles.NewCosmosPrecompile(cdc, ac, ak, nil, nil) + cosmosPrecompile, err := precompiles.NewCosmosPrecompile(cdc, ac, ak, nil, nil, nil) require.NoError(t, err) cosmosPrecompile = cosmosPrecompile.WithContext(ctx).(precompiles.CosmosPrecompile) @@ -124,7 +124,7 @@ func Test_CosmosPrecompile_ToEVMAddress(t *testing.T) { func Test_ExecuteCosmos(t *testing.T) { ctx, cdc, ac, ak := setup() - cosmosPrecompile, err := precompiles.NewCosmosPrecompile(cdc, ac, ak, nil, nil) + cosmosPrecompile, err := precompiles.NewCosmosPrecompile(cdc, ac, ak, nil, nil, nil) require.NoError(t, err) cosmosPrecompile = cosmosPrecompile.WithContext(ctx).(precompiles.CosmosPrecompile) @@ -205,7 +205,7 @@ func Test_QueryCosmos(t *testing.T) { }, }, } - cosmosPrecompile, err := precompiles.NewCosmosPrecompile(cdc, ac, ak, MockGRPCRouter{ + cosmosPrecompile, err := precompiles.NewCosmosPrecompile(cdc, ac, ak, nil, MockGRPCRouter{ routes: map[string]baseapp.GRPCQueryHandler{ queryPath: func(ctx sdk.Context, req *abci.RequestQuery) (*abci.ResponseQuery, error) { resBz, err := cdc.Marshal(&expectedRet) @@ -258,6 +258,90 @@ func Test_QueryCosmos(t *testing.T) { require.Equal(t, expectedRet, ret) } +func Test_ToDenom(t *testing.T) { + ctx, cdc, ac, ak := setup() + + erc20Addr := common.HexToAddress("0x123") + denom := "evm/0000000000000000000000000000000000000123" + + cosmosPrecompile, err := precompiles.NewCosmosPrecompile(cdc, ac, ak, &MockERC20DenomKeeper{ + denomMap: map[string]common.Address{ + denom: erc20Addr, + }, + addrMap: map[common.Address]string{ + erc20Addr: denom, + }, + }, nil, nil) + require.NoError(t, err) + + cosmosPrecompile = cosmosPrecompile.WithContext(ctx).(precompiles.CosmosPrecompile) + + evmAddr := common.HexToAddress("0x1") + + abi, err := contracts.ICosmosMetaData.GetAbi() + require.NoError(t, err) + + // pack to_denom + inputBz, err := abi.Pack(precompiles.METHOD_TO_DENOM, erc20Addr) + require.NoError(t, err) + + // out of gas panic + require.Panics(t, func() { + _, _, _ = cosmosPrecompile.ExtendedRun(vm.AccountRef(evmAddr), inputBz, precompiles.TO_DENOM_GAS-1, false) + }) + + // succeed + retBz, _, err := cosmosPrecompile.ExtendedRun(vm.AccountRef(evmAddr), inputBz, precompiles.TO_DENOM_GAS+uint64(len(inputBz)), true) + require.NoError(t, err) + + // unpack response + unpackedRet, err := abi.Methods["to_denom"].Outputs.Unpack(retBz) + require.NoError(t, err) + require.Equal(t, denom, unpackedRet[0].(string)) +} + +func Test_ToErc20(t *testing.T) { + ctx, cdc, ac, ak := setup() + + erc20Addr := common.HexToAddress("0x123") + denom := "evm/0000000000000000000000000000000000000123" + + cosmosPrecompile, err := precompiles.NewCosmosPrecompile(cdc, ac, ak, &MockERC20DenomKeeper{ + denomMap: map[string]common.Address{ + denom: erc20Addr, + }, + addrMap: map[common.Address]string{ + erc20Addr: denom, + }, + }, nil, nil) + require.NoError(t, err) + + cosmosPrecompile = cosmosPrecompile.WithContext(ctx).(precompiles.CosmosPrecompile) + + evmAddr := common.HexToAddress("0x1") + + abi, err := contracts.ICosmosMetaData.GetAbi() + require.NoError(t, err) + + // pack to_erc20 + inputBz, err := abi.Pack(precompiles.METHOD_TO_ERC20, denom) + require.NoError(t, err) + + // out of gas panic + require.Panics(t, func() { + _, _, _ = cosmosPrecompile.ExtendedRun(vm.AccountRef(evmAddr), inputBz, precompiles.TO_ERC20_GAS-1, false) + }) + + // succeed + retBz, _, err := cosmosPrecompile.ExtendedRun(vm.AccountRef(evmAddr), inputBz, precompiles.TO_ERC20_GAS+uint64(len(inputBz)), true) + require.NoError(t, err) + + // unpack response + unpackedRet, err := abi.Methods["to_erc20"].Outputs.Unpack(retBz) + require.NoError(t, err) + require.Equal(t, erc20Addr, unpackedRet[0].(common.Address)) +} + var _ types.AccountKeeper = &MockAccountKeeper{} // mock account keeper for testing @@ -306,3 +390,30 @@ type MockGRPCRouter struct { func (router MockGRPCRouter) Route(path string) baseapp.GRPCQueryHandler { return router.routes[path] } + +var _ types.ERC20DenomKeeper = &MockERC20DenomKeeper{} + +type MockERC20DenomKeeper struct { + denomMap map[string]common.Address + addrMap map[common.Address]string +} + +// GetContractAddrByDenom implements types.ERC20DenomKeeper. +func (e *MockERC20DenomKeeper) GetContractAddrByDenom(_ context.Context, denom string) (common.Address, error) { + addr, found := e.denomMap[denom] + if !found { + return common.Address{}, sdkerrors.ErrNotFound + } + + return addr, nil +} + +// GetDenomByContractAddr implements types.ERC20DenomKeeper. +func (e *MockERC20DenomKeeper) GetDenomByContractAddr(_ context.Context, addr common.Address) (string, error) { + denom, found := e.addrMap[addr] + if !found { + return "", sdkerrors.ErrNotFound + } + + return denom, nil +} diff --git a/x/evm/precompiles/cosmos/types.go b/x/evm/precompiles/cosmos/types.go index fc86a85..5b37d98 100644 --- a/x/evm/precompiles/cosmos/types.go +++ b/x/evm/precompiles/cosmos/types.go @@ -27,10 +27,31 @@ type QueryCosmosArguments struct { Req string `abi:"req"` } +// ToDenomArguments is the arguments for the to_denom method. +type ToDenomArguments struct { + ERC20Address common.Address `abi:"erc20_address"` +} + +// ToERC20Arguments is the arguments for the to_erc20 method. +type ToERC20Arguments struct { + Denom string `abi:"denom"` +} + const ( TO_COSMOS_ADDRESS_GAS storetypes.Gas = 200 TO_EVM_ADDRESS_GAS storetypes.Gas = 200 + TO_DENOM_GAS storetypes.Gas = 100 + TO_ERC20_GAS storetypes.Gas = 100 EXECUTE_COSMOS_GAS storetypes.Gas = 200 QUERY_COSMOS_GAS storetypes.Gas = 200 GAS_PER_BYTE storetypes.Gas = 1 ) + +const ( + METHOD_TO_COSMOS_ADDRESS = "to_cosmos_address" + METHOD_TO_EVM_ADDRESS = "to_evm_address" + METHOD_EXECUTE_COSMOS = "execute_cosmos" + METHOD_QUERY_COSMOS = "query_cosmos" + METHOD_TO_DENOM = "to_denom" + METHOD_TO_ERC20 = "to_erc20" +) diff --git a/x/evm/types/denom.go b/x/evm/types/denom.go index fe9865d..cb0914b 100644 --- a/x/evm/types/denom.go +++ b/x/evm/types/denom.go @@ -11,12 +11,12 @@ import ( const DENOM_PREFIX = "evm/" -type ERC20Keeper interface { +type ERC20DenomKeeper interface { GetContractAddrByDenom(context.Context, string) (common.Address, error) GetDenomByContractAddr(context.Context, common.Address) (string, error) } -func DenomToContractAddr(ctx context.Context, k ERC20Keeper, denom string) (common.Address, error) { +func DenomToContractAddr(ctx context.Context, k ERC20DenomKeeper, denom string) (common.Address, error) { if strings.HasPrefix(denom, DENOM_PREFIX) { contractAddrInString := strings.TrimPrefix(denom, DENOM_PREFIX) if !common.IsHexAddress(contractAddrInString) { @@ -29,7 +29,7 @@ func DenomToContractAddr(ctx context.Context, k ERC20Keeper, denom string) (comm return k.GetContractAddrByDenom(ctx, denom) } -func ContractAddrToDenom(ctx context.Context, k ERC20Keeper, contractAddr common.Address) (string, error) { +func ContractAddrToDenom(ctx context.Context, k ERC20DenomKeeper, contractAddr common.Address) (string, error) { denom, err := k.GetDenomByContractAddr(ctx, contractAddr) if err != nil && errors.Is(err, collections.ErrNotFound) { return DENOM_PREFIX + strings.TrimPrefix(contractAddr.Hex(), "0x"), nil diff --git a/x/evm/types/query.pb.go b/x/evm/types/query.pb.go index 55d955a..7486e97 100644 --- a/x/evm/types/query.pb.go +++ b/x/evm/types/query.pb.go @@ -201,7 +201,8 @@ type QueryCallRequest struct { // hex encoded call input Input string `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"` // whether to trace the call - WithTrace bool `protobuf:"varint,4,opt,name=with_trace,json=withTrace,proto3" json:"with_trace,omitempty"` + // `nil` means no trace + TraceOptions *TraceOptions `protobuf:"bytes,4,opt,name=trace_options,json=traceOptions,proto3" json:"trace_options,omitempty"` } func (m *QueryCallRequest) Reset() { *m = QueryCallRequest{} } @@ -237,6 +238,51 @@ func (m *QueryCallRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryCallRequest proto.InternalMessageInfo +// TraceOption is the option for tracing +type TraceOptions struct { + // whether to trace memory + WithMemory bool `protobuf:"varint,1,opt,name=with_memory,json=withMemory,proto3" json:"with_memory,omitempty"` + // whether to trace stack + WithStack bool `protobuf:"varint,2,opt,name=with_stack,json=withStack,proto3" json:"with_stack,omitempty"` + // wtether to trace storage + WithStorage bool `protobuf:"varint,3,opt,name=with_storage,json=withStorage,proto3" json:"with_storage,omitempty"` + // whether to return data trace + WithReturnData bool `protobuf:"varint,4,opt,name=with_return_data,json=withReturnData,proto3" json:"with_return_data,omitempty"` +} + +func (m *TraceOptions) Reset() { *m = TraceOptions{} } +func (m *TraceOptions) String() string { return proto.CompactTextString(m) } +func (*TraceOptions) ProtoMessage() {} +func (*TraceOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_2bf9e0bee7cfd1a4, []int{5} +} +func (m *TraceOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TraceOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TraceOptions.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 *TraceOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_TraceOptions.Merge(m, src) +} +func (m *TraceOptions) XXX_Size() int { + return m.Size() +} +func (m *TraceOptions) XXX_DiscardUnknown() { + xxx_messageInfo_TraceOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_TraceOptions proto.InternalMessageInfo + // QueryCallResponse is the response type for the Query/Call RPC // method type QueryCallResponse struct { @@ -252,7 +298,7 @@ func (m *QueryCallResponse) Reset() { *m = QueryCallResponse{} } func (m *QueryCallResponse) String() string { return proto.CompactTextString(m) } func (*QueryCallResponse) ProtoMessage() {} func (*QueryCallResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2bf9e0bee7cfd1a4, []int{5} + return fileDescriptor_2bf9e0bee7cfd1a4, []int{6} } func (m *QueryCallResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -291,7 +337,7 @@ func (m *QueryContractAddrByDenomRequest) Reset() { *m = QueryContractAd func (m *QueryContractAddrByDenomRequest) String() string { return proto.CompactTextString(m) } func (*QueryContractAddrByDenomRequest) ProtoMessage() {} func (*QueryContractAddrByDenomRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_2bf9e0bee7cfd1a4, []int{6} + return fileDescriptor_2bf9e0bee7cfd1a4, []int{7} } func (m *QueryContractAddrByDenomRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -331,7 +377,7 @@ func (m *QueryContractAddrByDenomResponse) Reset() { *m = QueryContractA func (m *QueryContractAddrByDenomResponse) String() string { return proto.CompactTextString(m) } func (*QueryContractAddrByDenomResponse) ProtoMessage() {} func (*QueryContractAddrByDenomResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2bf9e0bee7cfd1a4, []int{7} + return fileDescriptor_2bf9e0bee7cfd1a4, []int{8} } func (m *QueryContractAddrByDenomResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -371,7 +417,7 @@ func (m *QueryDenomRequest) Reset() { *m = QueryDenomRequest{} } func (m *QueryDenomRequest) String() string { return proto.CompactTextString(m) } func (*QueryDenomRequest) ProtoMessage() {} func (*QueryDenomRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_2bf9e0bee7cfd1a4, []int{8} + return fileDescriptor_2bf9e0bee7cfd1a4, []int{9} } func (m *QueryDenomRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -410,7 +456,7 @@ func (m *QueryDenomResponse) Reset() { *m = QueryDenomResponse{} } func (m *QueryDenomResponse) String() string { return proto.CompactTextString(m) } func (*QueryDenomResponse) ProtoMessage() {} func (*QueryDenomResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2bf9e0bee7cfd1a4, []int{9} + return fileDescriptor_2bf9e0bee7cfd1a4, []int{10} } func (m *QueryDenomResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -447,7 +493,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_2bf9e0bee7cfd1a4, []int{10} + return fileDescriptor_2bf9e0bee7cfd1a4, []int{11} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -486,7 +532,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2bf9e0bee7cfd1a4, []int{11} + return fileDescriptor_2bf9e0bee7cfd1a4, []int{12} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -521,6 +567,7 @@ func init() { proto.RegisterType((*QueryStateRequest)(nil), "minievm.evm.v1.QueryStateRequest") proto.RegisterType((*QueryStateResponse)(nil), "minievm.evm.v1.QueryStateResponse") proto.RegisterType((*QueryCallRequest)(nil), "minievm.evm.v1.QueryCallRequest") + proto.RegisterType((*TraceOptions)(nil), "minievm.evm.v1.TraceOptions") proto.RegisterType((*QueryCallResponse)(nil), "minievm.evm.v1.QueryCallResponse") proto.RegisterType((*QueryContractAddrByDenomRequest)(nil), "minievm.evm.v1.QueryContractAddrByDenomRequest") proto.RegisterType((*QueryContractAddrByDenomResponse)(nil), "minievm.evm.v1.QueryContractAddrByDenomResponse") @@ -533,56 +580,62 @@ func init() { func init() { proto.RegisterFile("minievm/evm/v1/query.proto", fileDescriptor_2bf9e0bee7cfd1a4) } var fileDescriptor_2bf9e0bee7cfd1a4 = []byte{ - // 778 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xcd, 0x6e, 0xd3, 0x4a, - 0x14, 0x8e, 0x1b, 0x27, 0x6d, 0x4f, 0x7b, 0xaf, 0xda, 0x69, 0x54, 0xb9, 0xd6, 0xbd, 0x4e, 0xea, - 0xde, 0x0b, 0x51, 0x44, 0xe3, 0x36, 0x54, 0x2a, 0xea, 0x8e, 0x80, 0x84, 0x04, 0x95, 0x80, 0xc0, - 0x8a, 0x4d, 0x34, 0x89, 0x47, 0xae, 0xd5, 0xc4, 0x93, 0x7a, 0x9c, 0x40, 0xa8, 0xca, 0x02, 0xf5, - 0x01, 0x10, 0xbc, 0x00, 0x0b, 0x16, 0x5d, 0xb2, 0xe3, 0x15, 0xba, 0xac, 0xc4, 0x86, 0x15, 0x82, - 0x14, 0x09, 0x1e, 0x03, 0xcd, 0x78, 0xdc, 0x26, 0xce, 0x8f, 0xca, 0x22, 0xd1, 0x9c, 0x33, 0xe7, - 0x9c, 0xef, 0x3b, 0x7f, 0x63, 0xd0, 0x9b, 0xae, 0xe7, 0x92, 0x4e, 0xd3, 0xe2, 0xbf, 0xce, 0xa6, - 0x75, 0xd0, 0x26, 0x7e, 0xb7, 0xd8, 0xf2, 0x69, 0x40, 0xd1, 0xdf, 0xf2, 0xae, 0xc8, 0x7f, 0x9d, - 0x4d, 0x7d, 0x11, 0x37, 0x5d, 0x8f, 0x5a, 0xe2, 0x3f, 0x34, 0xd1, 0x33, 0x0e, 0x75, 0xa8, 0x38, - 0x5a, 0xfc, 0x24, 0xb5, 0xff, 0x38, 0x94, 0x3a, 0x0d, 0x62, 0xe1, 0x96, 0x6b, 0x61, 0xcf, 0xa3, - 0x01, 0x0e, 0x5c, 0xea, 0x31, 0x79, 0x1b, 0x87, 0x0c, 0xba, 0x2d, 0x22, 0xef, 0xcc, 0x6d, 0x58, - 0x78, 0xcc, 0x19, 0xdc, 0xa1, 0x36, 0xa9, 0x90, 0x83, 0x36, 0x61, 0x01, 0x5a, 0x83, 0xbf, 0xea, - 0xd4, 0x0b, 0x7c, 0x5c, 0x0f, 0xaa, 0xd8, 0xb6, 0x7d, 0x4d, 0xc9, 0x29, 0xf9, 0xd9, 0xca, 0x7c, - 0xa4, 0xbc, 0x6d, 0xdb, 0xbe, 0xb9, 0x0e, 0x8b, 0x7d, 0x8e, 0xac, 0x45, 0x3d, 0x46, 0x10, 0x02, - 0xb5, 0x4e, 0x6d, 0x22, 0x1d, 0xc4, 0x79, 0x47, 0xfd, 0xf5, 0x3e, 0xab, 0x98, 0xf7, 0xa5, 0xf9, - 0x93, 0x00, 0x07, 0x7f, 0x04, 0x84, 0x16, 0x20, 0xb9, 0x4f, 0xba, 0xda, 0x94, 0xb8, 0xe2, 0x47, - 0x73, 0x03, 0x50, 0x7f, 0x2c, 0x89, 0x9d, 0x81, 0x54, 0x07, 0x37, 0xda, 0x11, 0x78, 0x28, 0x48, - 0xf4, 0x63, 0x25, 0x4a, 0x13, 0x37, 0x1a, 0x11, 0xfa, 0x32, 0xa4, 0x19, 0xf1, 0x6c, 0x12, 0xc1, - 0x4a, 0x69, 0x98, 0xd5, 0xd4, 0x08, 0x56, 0x19, 0x48, 0xb9, 0x5e, 0xab, 0x1d, 0x68, 0xc9, 0x10, - 0x4d, 0x08, 0xe8, 0x5f, 0x80, 0xe7, 0x6e, 0xb0, 0x57, 0xe5, 0x76, 0x44, 0x53, 0x73, 0x4a, 0x7e, - 0xa6, 0x32, 0xcb, 0x35, 0x4f, 0xb9, 0xc2, 0xfc, 0xa4, 0x44, 0x45, 0x13, 0x34, 0x24, 0x71, 0x1d, - 0x66, 0x7c, 0x79, 0x96, 0x4c, 0x2e, 0x64, 0xb4, 0x02, 0x33, 0x6d, 0x46, 0xec, 0xaa, 0x83, 0x99, - 0xa0, 0xa1, 0x56, 0xa6, 0xb9, 0x7c, 0x0f, 0x33, 0x54, 0x02, 0xb5, 0x41, 0x1d, 0xa6, 0x25, 0x73, - 0xc9, 0xfc, 0x5c, 0x69, 0xa9, 0x38, 0x38, 0x3b, 0xc5, 0x5d, 0xea, 0x94, 0x67, 0x4f, 0xbf, 0x66, - 0x13, 0x27, 0x3f, 0x3f, 0x16, 0x94, 0x8a, 0xb0, 0x45, 0xab, 0x30, 0x2f, 0xa8, 0x55, 0x69, 0x3b, - 0xe0, 0xe4, 0x55, 0x01, 0x37, 0x27, 0x74, 0x0f, 0x85, 0x8a, 0x27, 0x46, 0x7c, 0x9f, 0xfa, 0x5a, - 0x2a, 0x4c, 0x4c, 0x08, 0xe6, 0x36, 0x64, 0x65, 0xb7, 0x2f, 0x6b, 0x50, 0xee, 0xde, 0x25, 0x1e, - 0x6d, 0x46, 0xe5, 0xcc, 0x40, 0xca, 0xe6, 0x72, 0x54, 0x7f, 0x21, 0x98, 0x65, 0xc8, 0x8d, 0x77, - 0x94, 0x49, 0x6a, 0x30, 0xcd, 0xeb, 0x4c, 0x18, 0x93, 0xbe, 0x91, 0x28, 0xbb, 0x77, 0x4b, 0x56, - 0x6d, 0x00, 0xee, 0x4a, 0x43, 0x1a, 0x4d, 0xca, 0x20, 0xde, 0x48, 0xa6, 0x12, 0x2b, 0x23, 0x3d, - 0x1e, 0x61, 0x1f, 0x37, 0x99, 0x04, 0x33, 0x1f, 0xc0, 0xd2, 0x80, 0x56, 0x06, 0xda, 0x82, 0x74, - 0x4b, 0x68, 0x44, 0xa4, 0xb9, 0xd2, 0x72, 0xbc, 0x09, 0xa1, 0x7d, 0x59, 0xe5, 0x7d, 0xa8, 0x48, - 0xdb, 0xd2, 0xdb, 0x34, 0xa4, 0x44, 0x34, 0xf4, 0x12, 0x54, 0xbe, 0x3e, 0x28, 0x17, 0xf7, 0x8b, - 0xaf, 0xa4, 0xbe, 0x3a, 0xc1, 0x22, 0x24, 0x63, 0xae, 0xbf, 0xfe, 0xfc, 0xe3, 0xdd, 0xd4, 0x75, - 0xf4, 0xbf, 0x15, 0x5b, 0x77, 0xbe, 0x85, 0xcc, 0x3a, 0x1c, 0xa8, 0xd6, 0x11, 0x3a, 0x56, 0x20, - 0x25, 0x16, 0x08, 0x8d, 0x8e, 0xdd, 0xbf, 0xa8, 0xba, 0x39, 0xc9, 0x44, 0xe2, 0x6f, 0x09, 0xfc, - 0x22, 0xba, 0x11, 0xc7, 0x67, 0xdc, 0x6c, 0x88, 0x80, 0x75, 0xb8, 0x4f, 0xba, 0x47, 0xe8, 0x83, - 0x02, 0x4b, 0x23, 0x66, 0x03, 0x59, 0x63, 0x12, 0x1e, 0x37, 0x7e, 0xfa, 0xc6, 0xd5, 0x1d, 0x24, - 0xe1, 0x82, 0x20, 0xfc, 0x1f, 0x32, 0x87, 0x0b, 0x16, 0x3a, 0x31, 0xab, 0xd6, 0xad, 0x8a, 0xe1, - 0x40, 0xaf, 0x20, 0x15, 0xf2, 0x1a, 0x5d, 0xac, 0x01, 0x26, 0xe6, 0x24, 0x13, 0x89, 0x5d, 0x14, - 0xd8, 0x79, 0x74, 0x2d, 0x8e, 0x2d, 0xe0, 0x86, 0xbb, 0xd5, 0x00, 0x95, 0xbf, 0x19, 0xe3, 0x26, - 0xe5, 0xf2, 0x55, 0x1b, 0x37, 0x29, 0x7d, 0x0f, 0x8e, 0x99, 0x15, 0xe0, 0x2b, 0x3b, 0x4a, 0xc1, - 0xcc, 0x0c, 0xe5, 0xce, 0x51, 0x0e, 0x20, 0x1d, 0x4e, 0x2e, 0x1a, 0x9d, 0xcb, 0xc0, 0x72, 0xe8, - 0x6b, 0x13, 0x6d, 0x24, 0xa6, 0x21, 0x30, 0x35, 0xb4, 0x1c, 0x07, 0x0c, 0x97, 0xa2, 0xbc, 0x7b, - 0xfa, 0xdd, 0x48, 0x9c, 0xf4, 0x8c, 0xc4, 0x69, 0xcf, 0x50, 0xce, 0x7a, 0x86, 0xf2, 0xad, 0x67, - 0x28, 0x6f, 0xce, 0x8d, 0xc4, 0xd9, 0xb9, 0x91, 0xf8, 0x72, 0x6e, 0x24, 0x9e, 0x15, 0x1c, 0x37, - 0xd8, 0x6b, 0xd7, 0x8a, 0x75, 0xda, 0xb4, 0x5c, 0xcf, 0x0d, 0x5c, 0xbc, 0xde, 0xc0, 0x35, 0x76, - 0x11, 0xef, 0x85, 0x88, 0x28, 0xbe, 0x6d, 0xb5, 0xb4, 0xf8, 0xb8, 0xdd, 0xfc, 0x1d, 0x00, 0x00, - 0xff, 0xff, 0x69, 0x0d, 0x3c, 0x88, 0x6d, 0x07, 0x00, 0x00, + // 873 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x4f, 0x8f, 0xdb, 0x44, + 0x14, 0x8f, 0x77, 0x9d, 0x34, 0xfb, 0xb2, 0xad, 0xb6, 0xb3, 0xd1, 0xca, 0xb5, 0x8a, 0x93, 0xba, + 0xfc, 0x89, 0x56, 0x6c, 0xdc, 0x86, 0x4a, 0x45, 0xbd, 0x35, 0x54, 0x42, 0x82, 0x22, 0xc0, 0xe5, + 0xc4, 0x25, 0x9a, 0x8d, 0x47, 0xae, 0xb5, 0xb1, 0x27, 0xeb, 0x19, 0x07, 0x42, 0x55, 0x0e, 0x88, + 0x0f, 0x80, 0xe0, 0xc8, 0x85, 0x03, 0x87, 0x3d, 0x72, 0xe3, 0x2b, 0xec, 0xb1, 0x12, 0x17, 0x4e, + 0x08, 0xb2, 0x48, 0xf0, 0x31, 0xd0, 0x3c, 0x8f, 0xdb, 0xc4, 0xf9, 0xa3, 0xe5, 0x90, 0x68, 0xde, + 0x9b, 0xdf, 0x9b, 0xdf, 0x6f, 0xde, 0x7b, 0xf3, 0x0c, 0x76, 0x1c, 0x25, 0x11, 0x9b, 0xc4, 0x9e, + 0xfa, 0x4d, 0xee, 0x7a, 0xa7, 0x19, 0x4b, 0xa7, 0xdd, 0x71, 0xca, 0x25, 0x27, 0xd7, 0xf4, 0x5e, + 0x57, 0xfd, 0x26, 0x77, 0xed, 0xeb, 0x34, 0x8e, 0x12, 0xee, 0xe1, 0x7f, 0x0e, 0xb1, 0x9b, 0x21, + 0x0f, 0x39, 0x2e, 0x3d, 0xb5, 0xd2, 0xde, 0x9b, 0x21, 0xe7, 0xe1, 0x88, 0x79, 0x74, 0x1c, 0x79, + 0x34, 0x49, 0xb8, 0xa4, 0x32, 0xe2, 0x89, 0xd0, 0xbb, 0x65, 0x4a, 0x39, 0x1d, 0x33, 0xbd, 0xe7, + 0xde, 0x87, 0xbd, 0x4f, 0x95, 0x82, 0xf7, 0x78, 0xc0, 0x7c, 0x76, 0x9a, 0x31, 0x21, 0xc9, 0x6d, + 0xb8, 0x3a, 0xe4, 0x89, 0x4c, 0xe9, 0x50, 0x0e, 0x68, 0x10, 0xa4, 0x96, 0xd1, 0x36, 0x3a, 0x3b, + 0xfe, 0x6e, 0xe1, 0x7c, 0x18, 0x04, 0xa9, 0x7b, 0x04, 0xd7, 0xe7, 0x02, 0xc5, 0x98, 0x27, 0x82, + 0x11, 0x02, 0xe6, 0x90, 0x07, 0x4c, 0x07, 0xe0, 0xfa, 0x81, 0xf9, 0xef, 0x4f, 0x2d, 0xc3, 0xfd, + 0x40, 0xc3, 0x9f, 0x48, 0x2a, 0xff, 0x17, 0x11, 0xd9, 0x83, 0xed, 0x13, 0x36, 0xb5, 0xb6, 0x70, + 0x4b, 0x2d, 0xdd, 0x3b, 0x40, 0xe6, 0xcf, 0xd2, 0xdc, 0x4d, 0xa8, 0x4e, 0xe8, 0x28, 0x2b, 0xc8, + 0x73, 0x43, 0xb3, 0x9f, 0x19, 0xc5, 0x35, 0xe9, 0x68, 0x54, 0xb0, 0x1f, 0x40, 0x4d, 0xb0, 0x24, + 0x60, 0x05, 0xad, 0xb6, 0x96, 0x55, 0x6d, 0xad, 0x50, 0xd5, 0x84, 0x6a, 0x94, 0x8c, 0x33, 0x69, + 0x6d, 0xe7, 0x6c, 0x68, 0x90, 0x87, 0x70, 0x55, 0x41, 0xd8, 0x80, 0x8f, 0xb1, 0x00, 0x96, 0xd9, + 0x36, 0x3a, 0x8d, 0xde, 0xcd, 0xee, 0x62, 0x61, 0xbb, 0x9f, 0x29, 0xd0, 0xc7, 0x39, 0xc6, 0xdf, + 0x95, 0x73, 0x96, 0xfb, 0xa3, 0x01, 0xbb, 0xf3, 0xdb, 0xa4, 0x05, 0x8d, 0x2f, 0x22, 0xf9, 0x74, + 0x10, 0xb3, 0x98, 0xa7, 0x53, 0xd4, 0x5a, 0xf7, 0x41, 0xb9, 0x3e, 0x42, 0x0f, 0x79, 0x0d, 0xd0, + 0x1a, 0x08, 0x49, 0x87, 0x27, 0x28, 0xb6, 0xee, 0xef, 0x28, 0xcf, 0x13, 0xe5, 0x20, 0xb7, 0x60, + 0x57, 0x6f, 0xf3, 0x94, 0x86, 0x0c, 0x05, 0xd7, 0xfd, 0x46, 0x0e, 0x40, 0x17, 0xe9, 0xc0, 0x1e, + 0x42, 0x52, 0x26, 0xb3, 0x34, 0x19, 0x04, 0x54, 0x52, 0x54, 0x5e, 0xf7, 0xaf, 0x29, 0xbf, 0x8f, + 0xee, 0x47, 0x54, 0x52, 0xf7, 0x57, 0xa3, 0x28, 0x3b, 0x26, 0x52, 0xa7, 0xde, 0x86, 0x7a, 0xaa, + 0xd7, 0x3a, 0x97, 0x2f, 0x6d, 0x72, 0x03, 0xea, 0x99, 0x60, 0xc1, 0x20, 0xa4, 0x02, 0xb5, 0x99, + 0xfe, 0x15, 0x65, 0xbf, 0x4f, 0x05, 0xe9, 0x81, 0x39, 0xe2, 0xa1, 0xb0, 0xb6, 0xdb, 0xdb, 0x9d, + 0x46, 0x6f, 0xbf, 0x9c, 0xa4, 0xc7, 0x3c, 0xec, 0xef, 0x9c, 0xff, 0xd1, 0xaa, 0x9c, 0xfd, 0xf3, + 0xcb, 0xa1, 0xe1, 0x23, 0x56, 0xdd, 0x46, 0x67, 0x38, 0x93, 0x2a, 0xfd, 0x26, 0xd2, 0x35, 0xf2, + 0x14, 0xa2, 0x4b, 0x95, 0x86, 0xa5, 0x29, 0x4f, 0xad, 0x6a, 0x5e, 0x1a, 0x34, 0xdc, 0xfb, 0xd0, + 0xd2, 0xfd, 0xfa, 0xaa, 0x8a, 0xfd, 0xe9, 0x23, 0x96, 0xf0, 0xb8, 0x68, 0x88, 0x26, 0x54, 0x03, + 0x65, 0x17, 0x1d, 0x84, 0x86, 0xdb, 0x87, 0xf6, 0xfa, 0x40, 0x7d, 0x49, 0x0b, 0xae, 0xa8, 0x4e, + 0x61, 0x42, 0xe8, 0xd8, 0xc2, 0xd4, 0xfd, 0xf7, 0xae, 0xce, 0xda, 0x02, 0xdd, 0xa5, 0x9e, 0x59, + 0xd1, 0xeb, 0x8b, 0x7c, 0x2b, 0x95, 0x6a, 0xae, 0xa6, 0x8e, 0xf8, 0x84, 0xa6, 0x34, 0x16, 0x9a, + 0xcc, 0xfd, 0x10, 0xf6, 0x17, 0xbc, 0xfa, 0xa0, 0x7b, 0x50, 0x1b, 0xa3, 0x07, 0x4f, 0x6a, 0xf4, + 0x0e, 0xca, 0x45, 0xc8, 0xf1, 0x7d, 0x53, 0xd5, 0xc1, 0xd7, 0xd8, 0xde, 0xf7, 0x35, 0xa8, 0xe2, + 0x69, 0xe4, 0x2b, 0x30, 0xd5, 0x00, 0x20, 0xed, 0x72, 0x5c, 0x79, 0xa8, 0xd8, 0xb7, 0x36, 0x20, + 0x72, 0x31, 0xee, 0xd1, 0x37, 0xbf, 0xfd, 0xfd, 0xc3, 0xd6, 0x5b, 0xe4, 0x0d, 0xaf, 0x34, 0xb0, + 0xd4, 0x1c, 0x11, 0xde, 0xb3, 0x85, 0x6c, 0x3d, 0x27, 0xdf, 0x1a, 0x50, 0xc5, 0x11, 0x40, 0x56, + 0x9f, 0x3d, 0x3f, 0x6a, 0x6c, 0x77, 0x13, 0x44, 0xf3, 0xdf, 0x43, 0xfe, 0x2e, 0x79, 0xbb, 0xcc, + 0x2f, 0x14, 0x6c, 0x49, 0x80, 0xf7, 0xec, 0x84, 0x4d, 0x9f, 0x93, 0x9f, 0x0d, 0xd8, 0x5f, 0xd1, + 0x1b, 0xc4, 0x5b, 0x73, 0xe1, 0x75, 0xed, 0x67, 0xdf, 0xb9, 0x7c, 0x80, 0x16, 0x7c, 0x88, 0x82, + 0x5f, 0x27, 0xee, 0x72, 0xc2, 0xf2, 0x20, 0xe1, 0x1d, 0x4f, 0x07, 0xd8, 0x1c, 0xe4, 0x6b, 0xa8, + 0xe6, 0xba, 0x56, 0x27, 0x6b, 0x41, 0x89, 0xbb, 0x09, 0xa2, 0xb9, 0xbb, 0xc8, 0xdd, 0x21, 0x6f, + 0x96, 0xb9, 0x91, 0x6e, 0xb9, 0x5a, 0x23, 0x30, 0xd5, 0xcc, 0x58, 0xd7, 0x29, 0xaf, 0xe6, 0xf2, + 0xba, 0x4e, 0x99, 0x1b, 0x38, 0x6e, 0x0b, 0xc9, 0x6f, 0x3c, 0x30, 0x0e, 0xdd, 0xe6, 0xd2, 0xdd, + 0x15, 0xcb, 0x29, 0xd4, 0xf2, 0xce, 0x25, 0xab, 0xef, 0xb2, 0xf0, 0x38, 0xec, 0xdb, 0x1b, 0x31, + 0x9a, 0xd3, 0x41, 0x4e, 0x8b, 0x1c, 0x94, 0x09, 0xf3, 0x47, 0xd1, 0x7f, 0x7c, 0xfe, 0x97, 0x53, + 0x39, 0x9b, 0x39, 0x95, 0xf3, 0x99, 0x63, 0xbc, 0x98, 0x39, 0xc6, 0x9f, 0x33, 0xc7, 0xf8, 0xee, + 0xc2, 0xa9, 0xbc, 0xb8, 0x70, 0x2a, 0xbf, 0x5f, 0x38, 0x95, 0xcf, 0x0f, 0xc3, 0x48, 0x3e, 0xcd, + 0x8e, 0xbb, 0x43, 0x1e, 0x7b, 0x51, 0x12, 0xc9, 0x88, 0x1e, 0x8d, 0xe8, 0xb1, 0x78, 0x79, 0xde, + 0x97, 0x78, 0x22, 0x7e, 0x9d, 0x8f, 0x6b, 0xf8, 0x79, 0x7e, 0xe7, 0xbf, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x00, 0xf9, 0x6b, 0x54, 0x2f, 0x08, 0x00, 0x00, } func (this *QueryCodeResponse) Equal(that interface{}) bool { @@ -1097,15 +1150,17 @@ func (m *QueryCallRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.WithTrace { - i-- - if m.WithTrace { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if m.TraceOptions != nil { + { + size, err := m.TraceOptions.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x20 + dAtA[i] = 0x22 } if len(m.Input) > 0 { i -= len(m.Input) @@ -1131,6 +1186,69 @@ func (m *QueryCallRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *TraceOptions) 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 *TraceOptions) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.WithReturnData { + i-- + if m.WithReturnData { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.WithStorage { + i-- + if m.WithStorage { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.WithStack { + i-- + if m.WithStack { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if m.WithMemory { + i-- + if m.WithMemory { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *QueryCallResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1455,7 +1573,29 @@ func (m *QueryCallRequest) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.WithTrace { + if m.TraceOptions != nil { + l = m.TraceOptions.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *TraceOptions) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.WithMemory { + n += 2 + } + if m.WithStack { + n += 2 + } + if m.WithStorage { + n += 2 + } + if m.WithReturnData { n += 2 } return n @@ -2054,9 +2194,155 @@ func (m *QueryCallRequest) Unmarshal(dAtA []byte) error { } m.Input = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TraceOptions", 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.TraceOptions == nil { + m.TraceOptions = &TraceOptions{} + } + if err := m.TraceOptions.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 *TraceOptions) 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: TraceOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TraceOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithMemory", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.WithMemory = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithStack", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.WithStack = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithStorage", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.WithStorage = bool(v != 0) case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithTrace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field WithReturnData", wireType) } var v int for shift := uint(0); ; shift += 7 { @@ -2073,7 +2359,7 @@ func (m *QueryCallRequest) Unmarshal(dAtA []byte) error { break } } - m.WithTrace = bool(v != 0) + m.WithReturnData = bool(v != 0) default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:])