diff --git a/CHANGELOG.md b/CHANGELOG.md index 1903de5ff..8b8ac1825 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -78,6 +78,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#1922](https://github.com/NibiruChain/nibiru/pull/1922) - feat(evm): tracer option is read from the config. - [#1936](https://github.com/NibiruChain/nibiru/pull/1936) - feat(evm): EVM fungible token protobufs and encoding tests - [#1947](https://github.com/NibiruChain/nibiru/pull/1947) - fix(evm): fix FunToken state marshalling +- [#1949](https://github.com/NibiruChain/nibiru/pull/1949) - feat(evm): add fungible token mapping queries #### Dapp modules: perp, spot, oracle, etc diff --git a/eth/rpc/backend/mocks/evm_query_client.go b/eth/rpc/backend/mocks/evm_query_client.go index e018a93a2..87834eff5 100644 --- a/eth/rpc/backend/mocks/evm_query_client.go +++ b/eth/rpc/backend/mocks/evm_query_client.go @@ -377,6 +377,36 @@ func (_m *EVMQueryClient) ValidatorAccount(ctx context.Context, in *evm.QueryVal return r0, r1 } +// ValidatorAccount provides a mock function with given fields: ctx, in, opts +func (_m *EVMQueryClient) TokenMapping(ctx context.Context, in *evm.QueryTokenMappingRequest, opts ...grpc.CallOption) (*evm.QueryTokenMappingResponse, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *evm.QueryTokenMappingResponse + if rf, ok := ret.Get(0).(func(context.Context, *evm.QueryTokenMappingRequest, ...grpc.CallOption) *evm.QueryTokenMappingResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*evm.QueryTokenMappingResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *evm.QueryTokenMappingRequest, ...grpc.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + type mockConstructorTestingTNewEVMQueryClient interface { mock.TestingT Cleanup(func()) diff --git a/proto/eth/evm/v1/query.proto b/proto/eth/evm/v1/query.proto index a42c61fac..4e735a3c9 100644 --- a/proto/eth/evm/v1/query.proto +++ b/proto/eth/evm/v1/query.proto @@ -75,6 +75,10 @@ service Query { rpc BaseFee(QueryBaseFeeRequest) returns (QueryBaseFeeResponse) { option (google.api.http).get = "/nibiru/evm/v1/base_fee"; } + + rpc TokenMapping(QueryTokenMappingRequest) returns (QueryTokenMappingResponse) { + option (google.api.http).get = "/nibiru/evm/v1/token_mapping/{token}"; + } } // QueryEthAccountRequest is the request type for the Query/Account RPC method. @@ -301,3 +305,19 @@ message QueryBaseFeeResponse { // base_fee is the EIP1559 base fee string base_fee = 1 [(gogoproto.customtype) = "cosmossdk.io/math.Int"]; } + +message QueryTokenMappingRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // either the 0x contract address of the ERC-20 token or the cosmos denom + string token = 1; +} + +message QueryTokenMappingResponse { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // fun_token is a mapping between the Cosmos native coin and the ERC20 contract address + FunToken fun_token = 1; +} \ No newline at end of file diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index 2add8c1fe..2cc0cd4cd 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -740,3 +740,30 @@ func (k *Keeper) TraceEthTxMsg( return &result, txConfig.LogIndex + uint(len(res.Logs)), nil } + +func (k Keeper) TokenMapping( + goCtx context.Context, req *evm.QueryTokenMappingRequest, +) (*evm.QueryTokenMappingResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + // first try lookup by cosmos denom + bankDenomIter := k.FunTokens.Indexes.BankDenom.ExactMatch(ctx, req.Token) + funTokenMappings := k.FunTokens.Collect(ctx, bankDenomIter) + if len(funTokenMappings) > 0 { + // assumes that there is only one mapping for a given denom + return &evm.QueryTokenMappingResponse{ + FunToken: &funTokenMappings[0], + }, nil + } + + erc20AddrIter := k.FunTokens.Indexes.ERC20Addr.ExactMatch(ctx, gethcommon.HexToAddress(req.Token)) + funTokenMappings = k.FunTokens.Collect(ctx, erc20AddrIter) + if len(funTokenMappings) > 0 { + // assumes that there is only one mapping for a given erc20 address + return &evm.QueryTokenMappingResponse{ + FunToken: &funTokenMappings[0], + }, nil + } + + return nil, grpcstatus.Errorf(grpccodes.NotFound, "token mapping not found for %s", req.Token) +} diff --git a/x/evm/keeper/grpc_query_test.go b/x/evm/keeper/grpc_query_test.go index 49c13a34a..362821fde 100644 --- a/x/evm/keeper/grpc_query_test.go +++ b/x/evm/keeper/grpc_query_test.go @@ -894,3 +894,91 @@ func (s *KeeperSuite) TestTestTraceBlock() { }) } } + +func (s *KeeperSuite) TestQueryTokenMapping() { + type In = *evm.QueryTokenMappingRequest + type Out = *evm.QueryTokenMappingResponse + testCases := []TestCase[In, Out]{ + { + name: "sad: no token mapping", + scenario: func(deps *evmtest.TestDeps) (req In, wantResp Out) { + req = &evm.QueryTokenMappingRequest{ + Token: "unibi", + } + wantResp = &evm.QueryTokenMappingResponse{ + FunToken: nil, + } + return req, wantResp + }, + wantErr: "token mapping not found for unibi", + }, + { + name: "happy: token mapping exists from cosmos coin -> ERC20 token", + setup: func(deps *evmtest.TestDeps) { + _ = deps.K.FunTokens.SafeInsert( + deps.Ctx, + gethcommon.HexToAddress("0xAEf9437FF23D48D73271a41a8A094DEc9ac71477"), + "unibi", + true, + ) + }, + scenario: func(deps *evmtest.TestDeps) (req In, wantResp Out) { + req = &evm.QueryTokenMappingRequest{ + Token: "unibi", + } + wantResp = &evm.QueryTokenMappingResponse{ + FunToken: &evm.FunToken{ + Erc20Addr: "0xAEf9437FF23D48D73271a41a8A094DEc9ac71477", + BankDenom: "unibi", + IsMadeFromCoin: true, + }, + } + return req, wantResp + }, + wantErr: "", + }, + { + name: "happy: token mapping exists from ERC20 token -> cosmos coin", + setup: func(deps *evmtest.TestDeps) { + _ = deps.K.FunTokens.SafeInsert( + deps.Ctx, + gethcommon.HexToAddress("0xAEf9437FF23D48D73271a41a8A094DEc9ac71477"), + "unibi", + true, + ) + }, + scenario: func(deps *evmtest.TestDeps) (req In, wantResp Out) { + req = &evm.QueryTokenMappingRequest{ + Token: "0xAEf9437FF23D48D73271a41a8A094DEc9ac71477", + } + wantResp = &evm.QueryTokenMappingResponse{ + FunToken: &evm.FunToken{ + Erc20Addr: "0xAEf9437FF23D48D73271a41a8A094DEc9ac71477", + BankDenom: "unibi", + IsMadeFromCoin: true, + }, + } + return req, wantResp + }, + wantErr: "", + }, + } + + for _, tc := range testCases { + s.Run(tc.name, func() { + deps := evmtest.NewTestDeps() + if tc.setup != nil { + tc.setup(&deps) + } + req, wantResp := tc.scenario(&deps) + goCtx := sdk.WrapSDKContext(deps.Ctx) + gotResp, err := deps.K.TokenMapping(goCtx, req) + if tc.wantErr != "" { + s.Require().ErrorContains(err, tc.wantErr) + return + } + s.Assert().NoError(err) + s.EqualValues(wantResp, gotResp) + }) + } +} diff --git a/x/evm/query.pb.go b/x/evm/query.pb.go index b9e4e5804..11e584f99 100644 --- a/x/evm/query.pb.go +++ b/x/evm/query.pb.go @@ -1303,6 +1303,82 @@ func (m *QueryBaseFeeResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryBaseFeeResponse proto.InternalMessageInfo +type QueryTokenMappingRequest struct { + // either the 0x contract address of the ERC-20 token or the cosmos denom + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` +} + +func (m *QueryTokenMappingRequest) Reset() { *m = QueryTokenMappingRequest{} } +func (m *QueryTokenMappingRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTokenMappingRequest) ProtoMessage() {} +func (*QueryTokenMappingRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ffa36cdc5add14ed, []int{24} +} +func (m *QueryTokenMappingRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTokenMappingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTokenMappingRequest.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 *QueryTokenMappingRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTokenMappingRequest.Merge(m, src) +} +func (m *QueryTokenMappingRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTokenMappingRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTokenMappingRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTokenMappingRequest proto.InternalMessageInfo + +type QueryTokenMappingResponse struct { + // fun_token is a mapping between the Cosmos native coin and the ERC20 contract address + FunToken *FunToken `protobuf:"bytes,1,opt,name=fun_token,json=funToken,proto3" json:"fun_token,omitempty"` +} + +func (m *QueryTokenMappingResponse) Reset() { *m = QueryTokenMappingResponse{} } +func (m *QueryTokenMappingResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTokenMappingResponse) ProtoMessage() {} +func (*QueryTokenMappingResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ffa36cdc5add14ed, []int{25} +} +func (m *QueryTokenMappingResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTokenMappingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTokenMappingResponse.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 *QueryTokenMappingResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTokenMappingResponse.Merge(m, src) +} +func (m *QueryTokenMappingResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTokenMappingResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTokenMappingResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTokenMappingResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*QueryEthAccountRequest)(nil), "eth.evm.v1.QueryEthAccountRequest") proto.RegisterType((*QueryEthAccountResponse)(nil), "eth.evm.v1.QueryEthAccountResponse") @@ -1328,103 +1404,111 @@ func init() { proto.RegisterType((*QueryTraceBlockResponse)(nil), "eth.evm.v1.QueryTraceBlockResponse") proto.RegisterType((*QueryBaseFeeRequest)(nil), "eth.evm.v1.QueryBaseFeeRequest") proto.RegisterType((*QueryBaseFeeResponse)(nil), "eth.evm.v1.QueryBaseFeeResponse") + proto.RegisterType((*QueryTokenMappingRequest)(nil), "eth.evm.v1.QueryTokenMappingRequest") + proto.RegisterType((*QueryTokenMappingResponse)(nil), "eth.evm.v1.QueryTokenMappingResponse") } func init() { proto.RegisterFile("eth/evm/v1/query.proto", fileDescriptor_ffa36cdc5add14ed) } var fileDescriptor_ffa36cdc5add14ed = []byte{ - // 1454 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xc6, 0x4e, 0xec, 0x3c, 0xa7, 0x6d, 0x98, 0xa6, 0x4d, 0xb2, 0x4d, 0xec, 0x74, 0x43, - 0x93, 0xb4, 0xb4, 0xbb, 0x4d, 0x40, 0x20, 0x2a, 0x2a, 0xd4, 0x44, 0x69, 0x28, 0xfd, 0xa3, 0x62, - 0x22, 0x0e, 0x48, 0xc8, 0x1a, 0xaf, 0x27, 0xeb, 0x55, 0xbc, 0x3b, 0xee, 0xce, 0x38, 0x38, 0x94, - 0x5e, 0xe8, 0x05, 0x89, 0x03, 0x95, 0xf8, 0x02, 0x3d, 0xf1, 0x15, 0xf8, 0x04, 0x48, 0x3d, 0x56, - 0xe2, 0x82, 0x38, 0x14, 0xd4, 0x72, 0xe0, 0xcc, 0x91, 0x13, 0x9a, 0x3f, 0x6b, 0xaf, 0xed, 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6, 0xe2, 0xca, 0x92, 0x2f, 0x22, - 0xd5, 0x15, 0x3a, 0xf5, 0x4d, 0x26, 0x4b, 0x7a, 0xea, 0x9b, 0xec, 0x29, 0xee, 0x43, 0x23, 0x8d, - 0x2b, 0xfe, 0xc6, 0xd5, 0x27, 0xcf, 0x8b, 0xc6, 0xd3, 0xe7, 0x45, 0xe3, 0x97, 0xe7, 0x45, 0xe3, - 0xd1, 0x8b, 0xe2, 0xc8, 0xd3, 0x17, 0xc5, 0x91, 0x1f, 0x5f, 0x14, 0x47, 0x3e, 0x5e, 0x4a, 0x74, - 0x3d, 0x55, 0x12, 0x37, 0x45, 0xcf, 0x8a, 0x1d, 0xb5, 0x85, 0xab, 0xea, 0xb8, 0xec, 0xb0, 0xaf, - 0xff, 0x19, 0x00, 0x00, 0xff, 0xff, 0x97, 0xcf, 0x5e, 0xd9, 0x07, 0x11, 0x00, 0x00, + // 1544 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4d, 0x6f, 0x1b, 0x55, + 0x17, 0xce, 0xc4, 0x4e, 0xec, 0x1c, 0xa7, 0x6d, 0xde, 0xdb, 0xb4, 0x49, 0xa6, 0x89, 0x9d, 0x4e, + 0xda, 0x24, 0xed, 0xdb, 0xce, 0x34, 0x01, 0x81, 0xa8, 0xa8, 0x50, 0x13, 0xa5, 0xa1, 0xf4, 0x43, + 0xc5, 0x44, 0x08, 0x21, 0x21, 0xeb, 0xda, 0xbe, 0x19, 0x8f, 0xe2, 0x99, 0xeb, 0xce, 0xbd, 0x0e, + 0x0e, 0x25, 0x1b, 0xba, 0x01, 0xb1, 0xa0, 0x12, 0x7f, 0xa0, 0x2b, 0xfe, 0x02, 0x7f, 0xa1, 0xcb, + 0x22, 0x36, 0x88, 0x45, 0x41, 0x2d, 0x0b, 0xd6, 0x2c, 0x59, 0xa1, 0xfb, 0x31, 0xf1, 0x8c, 0x3d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x97, 0xc8, 0x2a, 0x45, 0x4f, 0x59, + 0x0b, 0x12, 0x6c, 0x0e, 0x9d, 0xe9, 0x05, 0xd3, 0xb6, 0xa2, 0x56, 0x23, 0x1f, 0x72, 0xba, 0xd1, + 0xa6, 0x5c, 0x98, 0xa4, 0xec, 0x4a, 0xb9, 0x30, 0x3d, 0x3d, 0x7a, 0x60, 0x7e, 0xaa, 0xb9, 0xf2, + 0x0e, 0xda, 0x03, 0xe8, 0xb6, 0x80, 0x94, 0x92, 0xd6, 0xd7, 0xc7, 0x53, 0x4a, 0x5a, 0x7f, 0x0f, + 0xb1, 0x2c, 0x89, 0x3b, 0x8b, 0xcc, 0x54, 0x5c, 0xd9, 0x88, 0x44, 0xa6, 0xba, 0x6f, 0xa4, 0xbe, + 0xc9, 0x78, 0xa3, 0x49, 0x7d, 0x93, 0x89, 0x96, 0x33, 0x30, 0xd3, 0xa8, 0x0f, 0xa1, 0x2f, 0x0c, + 0x18, 0x8f, 0x77, 0x07, 0x74, 0xae, 0x3f, 0x91, 0xfe, 0xc6, 0x63, 0x9e, 0x3f, 0xc2, 0xea, 0x88, + 0x1a, 0x2e, 0x7b, 0x4e, 0xc5, 0x57, 0xd6, 0xce, 0x03, 0x39, 0xdc, 0x5f, 0xbb, 0xf6, 0xe4, 0x79, + 0xd1, 0x78, 0xfa, 0xbc, 0x68, 0xfc, 0xfc, 0xbc, 0x68, 0x3c, 0x7a, 0x51, 0x1c, 0x7a, 0xfa, 0xa2, + 0x38, 0xf4, 0xc3, 0x8b, 0xe2, 0xd0, 0x87, 0x0b, 0x31, 0x5d, 0xa0, 0xca, 0xf3, 0xba, 0xe8, 0xea, + 0x51, 0xd4, 0x8e, 0x88, 0x5b, 0x1d, 0x95, 0x1a, 0xe4, 0x95, 0x3f, 0x02, 0x00, 0x00, 0xff, 0xff, + 0xf0, 0xb1, 0xd3, 0x70, 0x29, 0x12, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1466,6 +1550,7 @@ type QueryClient interface { // BaseFee queries the base fee of the parent block of the current block, // Similar to feemarket module's method BaseFee(ctx context.Context, in *QueryBaseFeeRequest, opts ...grpc.CallOption) (*QueryBaseFeeResponse, error) + TokenMapping(ctx context.Context, in *QueryTokenMappingRequest, opts ...grpc.CallOption) (*QueryTokenMappingResponse, error) } type queryClient struct { @@ -1584,6 +1669,15 @@ func (c *queryClient) BaseFee(ctx context.Context, in *QueryBaseFeeRequest, opts return out, nil } +func (c *queryClient) TokenMapping(ctx context.Context, in *QueryTokenMappingRequest, opts ...grpc.CallOption) (*QueryTokenMappingResponse, error) { + out := new(QueryTokenMappingResponse) + err := c.cc.Invoke(ctx, "/eth.evm.v1.Query/TokenMapping", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // EthAccount queries an Ethereum account. @@ -1613,6 +1707,7 @@ type QueryServer interface { // BaseFee queries the base fee of the parent block of the current block, // Similar to feemarket module's method BaseFee(context.Context, *QueryBaseFeeRequest) (*QueryBaseFeeResponse, error) + TokenMapping(context.Context, *QueryTokenMappingRequest) (*QueryTokenMappingResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1655,6 +1750,9 @@ func (*UnimplementedQueryServer) TraceBlock(ctx context.Context, req *QueryTrace func (*UnimplementedQueryServer) BaseFee(ctx context.Context, req *QueryBaseFeeRequest) (*QueryBaseFeeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method BaseFee not implemented") } +func (*UnimplementedQueryServer) TokenMapping(ctx context.Context, req *QueryTokenMappingRequest) (*QueryTokenMappingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TokenMapping not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1876,6 +1974,24 @@ func _Query_BaseFee_Handler(srv interface{}, ctx context.Context, dec func(inter return interceptor(ctx, in, info, handler) } +func _Query_TokenMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTokenMappingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TokenMapping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/eth.evm.v1.Query/TokenMapping", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TokenMapping(ctx, req.(*QueryTokenMappingRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "eth.evm.v1.Query", HandlerType: (*QueryServer)(nil), @@ -1928,6 +2044,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "BaseFee", Handler: _Query_BaseFee_Handler, }, + { + MethodName: "TokenMapping", + Handler: _Query_TokenMapping_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "eth/evm/v1/query.proto", @@ -2856,6 +2976,71 @@ func (m *QueryBaseFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *QueryTokenMappingRequest) 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 *QueryTokenMappingRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTokenMappingRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Token) > 0 { + i -= len(m.Token) + copy(dAtA[i:], m.Token) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Token))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTokenMappingResponse) 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 *QueryTokenMappingResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTokenMappingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.FunToken != nil { + { + size, err := m.FunToken.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -3265,6 +3450,32 @@ func (m *QueryBaseFeeResponse) Size() (n int) { return n } +func (m *QueryTokenMappingRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Token) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTokenMappingResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FunToken != nil { + l = m.FunToken.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -5904,6 +6115,174 @@ func (m *QueryBaseFeeResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryTokenMappingRequest) 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: QueryTokenMappingRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTokenMappingRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Token = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTokenMappingResponse) 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: QueryTokenMappingResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTokenMappingResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FunToken", 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.FunToken == nil { + m.FunToken = &FunToken{} + } + if err := m.FunToken.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/evm/query.pb.gw.go b/x/evm/query.pb.gw.go index fd0ecc413..f9b679e79 100644 --- a/x/evm/query.pb.gw.go +++ b/x/evm/query.pb.gw.go @@ -559,6 +559,60 @@ func local_request_Query_BaseFee_0(ctx context.Context, marshaler runtime.Marsha } +func request_Query_TokenMapping_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTokenMappingRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["token"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "token") + } + + protoReq.Token, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "token", err) + } + + msg, err := client.TokenMapping(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TokenMapping_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTokenMappingRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["token"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "token") + } + + protoReq.Token, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "token", err) + } + + msg, err := server.TokenMapping(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -841,6 +895,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_TokenMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_TokenMapping_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TokenMapping_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1122,6 +1199,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_TokenMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_TokenMapping_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TokenMapping_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1149,6 +1246,8 @@ var ( pattern_Query_TraceBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"nibiru", "evm", "v1", "trace_block"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_BaseFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"nibiru", "evm", "v1", "base_fee"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_TokenMapping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"nibiru", "evm", "v1", "token_mapping", "token"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -1175,4 +1274,6 @@ var ( forward_Query_TraceBlock_0 = runtime.ForwardResponseMessage forward_Query_BaseFee_0 = runtime.ForwardResponseMessage + + forward_Query_TokenMapping_0 = runtime.ForwardResponseMessage )