From eb0c1a763d59222c5533135a79afcebe52e6824d Mon Sep 17 00:00:00 2001 From: rbajollari Date: Thu, 9 Jan 2025 09:54:44 -0500 Subject: [PATCH] price queries --- proto/ojo/oracle/v1/query.proto | 29 + x/oracle/client/cli/query.go | 56 ++ x/oracle/keeper/grpc_query.go | 44 ++ x/oracle/types/query.pb.go | 951 +++++++++++++++++++++++++++++--- x/oracle/types/query.pb.gw.go | 184 ++++++ 5 files changed, 1178 insertions(+), 86 deletions(-) diff --git a/proto/ojo/oracle/v1/query.proto b/proto/ojo/oracle/v1/query.proto index 061770b6..4f497507 100644 --- a/proto/ojo/oracle/v1/query.proto +++ b/proto/ojo/oracle/v1/query.proto @@ -4,6 +4,7 @@ package ojo.oracle.v1; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "ojo/oracle/v1/oracle.proto"; +import "ojo/oracle/v1/elys.proto"; import "cosmos/base/v1beta1/coin.proto"; option go_package = "github.com/ojo-network/ojo/x/oracle/types"; @@ -97,6 +98,18 @@ service Query { option (google.api.http).get = "/ojo/oracle/v1/valdiators/validator_reward_set"; } + + // Queries a Price by asset. + rpc Price(QueryGetPriceRequest) + returns (QueryGetPriceResponse) { + option (google.api.http).get = "/elys-network/elys/oracle/price/{asset}"; + } + + // Queries a list of Price items. + rpc PriceAll(QueryAllPriceRequest) + returns (QueryAllPriceResponse) { + option (google.api.http).get = "/elys-network/elys/oracle/prices"; + } } // QueryExchangeRates is the request type for the Query/ExchangeRate RPC @@ -291,3 +304,19 @@ message QueryValidatorRewardSet {} message QueryValidatorRewardSetResponse { ValidatorRewardSet validators = 1 [(gogoproto.nullable) = false]; } + +message QueryGetPriceRequest { + string asset = 1; + string source = 2; + uint64 timestamp = 3; +} + +message QueryGetPriceResponse { + Price price = 1 [ (gogoproto.nullable) = false ]; +} + +message QueryAllPriceRequest {} + +message QueryAllPriceResponse { + repeated Price price = 1 [ (gogoproto.nullable) = false ]; +} diff --git a/x/oracle/client/cli/query.go b/x/oracle/client/cli/query.go index 9f940be3..0e5bfb94 100644 --- a/x/oracle/client/cli/query.go +++ b/x/oracle/client/cli/query.go @@ -32,6 +32,8 @@ func GetQueryCmd() *cobra.Command { GetCmdQueryFeederDelegation(), GetCmdQueryMissCounter(), GetCmdQuerySlashWindow(), + GetCmdListPrice(), + CmdShowPrice(), ) return cmd @@ -277,3 +279,57 @@ func GetCmdQuerySlashWindow() *cobra.Command { flags.AddQueryFlagsToCmd(cmd) return cmd } + +func GetCmdListPrice() *cobra.Command { + cmd := &cobra.Command{ + Use: "list-price", + Short: "list all price", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + res, err := queryClient.PriceAll(cmd.Context(), &types.QueryAllPriceRequest{}) + return cli.PrintOrErr(res, err, clientCtx) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +func CmdShowPrice() *cobra.Command { + cmd := &cobra.Command{ + Use: "show-price [asset] [source] [timestamp]", + Short: "shows a price", + Args: cobra.ExactArgs(3), + RunE: func(cmd *cobra.Command, args []string) (err error) { + clientCtx := client.GetClientContextFromCmd(cmd) + + timestamp, err := cmd.Flags().GetUint64(args[2]) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + params := &types.QueryGetPriceRequest{ + Asset: args[0], + Source: args[1], + Timestamp: timestamp, + } + + res, err := queryClient.Price(cmd.Context(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/oracle/keeper/grpc_query.go b/x/oracle/keeper/grpc_query.go index 200db541..ea5f5377 100644 --- a/x/oracle/keeper/grpc_query.go +++ b/x/oracle/keeper/grpc_query.go @@ -328,3 +328,47 @@ func (q querier) ValidatorRewardSet( Validators: validatorRewardSet, }, nil } + +func (q querier) PriceAll(goCtx context.Context, req *types.QueryAllPriceRequest) (*types.QueryAllPriceResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + prices := q.GetAllPrice(ctx) + + return &types.QueryAllPriceResponse{Price: prices}, nil +} + +func (q querier) Price(goCtx context.Context, req *types.QueryGetPriceRequest) (*types.QueryGetPriceResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + ctx := sdk.UnwrapSDKContext(goCtx) + + // if both source and timestamp are defined, use specific value + if req.Source != "" && req.Timestamp != 0 { + val, found := q.GetPrice(ctx, req.Asset, req.Source, req.Timestamp) + if !found { + return nil, status.Error(codes.NotFound, "not found") + } + return &types.QueryGetPriceResponse{Price: val}, nil + } + + // if source is specified use latest price from source + if req.Source != "" { + val, found := q.GetLatestPriceFromAssetAndSource(ctx, req.Asset, req.Source) + if !found { + return nil, status.Error(codes.NotFound, "not found") + } + return &types.QueryGetPriceResponse{Price: val}, nil + } + + // find from any source if band source does not exist + val, found := q.GetLatestPriceFromAnySource(ctx, req.Asset) + if !found { + return nil, status.Error(codes.NotFound, "not found") + } + return &types.QueryGetPriceResponse{Price: val}, nil +} diff --git a/x/oracle/types/query.pb.go b/x/oracle/types/query.pb.go index cb68bd3e..7efa1bcf 100644 --- a/x/oracle/types/query.pb.go +++ b/x/oracle/types/query.pb.go @@ -1063,6 +1063,155 @@ func (m *QueryValidatorRewardSetResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryValidatorRewardSetResponse proto.InternalMessageInfo +type QueryGetPriceRequest struct { + Asset string `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"` + Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` + Timestamp uint64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (m *QueryGetPriceRequest) Reset() { *m = QueryGetPriceRequest{} } +func (m *QueryGetPriceRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetPriceRequest) ProtoMessage() {} +func (*QueryGetPriceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ac3bb5b34dcda556, []int{26} +} +func (m *QueryGetPriceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetPriceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetPriceRequest.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 *QueryGetPriceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetPriceRequest.Merge(m, src) +} +func (m *QueryGetPriceRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGetPriceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetPriceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetPriceRequest proto.InternalMessageInfo + +type QueryGetPriceResponse struct { + Price Price `protobuf:"bytes,1,opt,name=price,proto3" json:"price"` +} + +func (m *QueryGetPriceResponse) Reset() { *m = QueryGetPriceResponse{} } +func (m *QueryGetPriceResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGetPriceResponse) ProtoMessage() {} +func (*QueryGetPriceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ac3bb5b34dcda556, []int{27} +} +func (m *QueryGetPriceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetPriceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetPriceResponse.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 *QueryGetPriceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetPriceResponse.Merge(m, src) +} +func (m *QueryGetPriceResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGetPriceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetPriceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetPriceResponse proto.InternalMessageInfo + +type QueryAllPriceRequest struct { +} + +func (m *QueryAllPriceRequest) Reset() { *m = QueryAllPriceRequest{} } +func (m *QueryAllPriceRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllPriceRequest) ProtoMessage() {} +func (*QueryAllPriceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ac3bb5b34dcda556, []int{28} +} +func (m *QueryAllPriceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllPriceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllPriceRequest.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 *QueryAllPriceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllPriceRequest.Merge(m, src) +} +func (m *QueryAllPriceRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAllPriceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllPriceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllPriceRequest proto.InternalMessageInfo + +type QueryAllPriceResponse struct { + Price []Price `protobuf:"bytes,1,rep,name=price,proto3" json:"price"` +} + +func (m *QueryAllPriceResponse) Reset() { *m = QueryAllPriceResponse{} } +func (m *QueryAllPriceResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllPriceResponse) ProtoMessage() {} +func (*QueryAllPriceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ac3bb5b34dcda556, []int{29} +} +func (m *QueryAllPriceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllPriceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllPriceResponse.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 *QueryAllPriceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllPriceResponse.Merge(m, src) +} +func (m *QueryAllPriceResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAllPriceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllPriceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllPriceResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*QueryExchangeRates)(nil), "ojo.oracle.v1.QueryExchangeRates") proto.RegisterType((*QueryExchangeRatesResponse)(nil), "ojo.oracle.v1.QueryExchangeRatesResponse") @@ -1090,89 +1239,103 @@ func init() { proto.RegisterType((*QueryMedianDeviationsResponse)(nil), "ojo.oracle.v1.QueryMedianDeviationsResponse") proto.RegisterType((*QueryValidatorRewardSet)(nil), "ojo.oracle.v1.QueryValidatorRewardSet") proto.RegisterType((*QueryValidatorRewardSetResponse)(nil), "ojo.oracle.v1.QueryValidatorRewardSetResponse") + proto.RegisterType((*QueryGetPriceRequest)(nil), "ojo.oracle.v1.QueryGetPriceRequest") + proto.RegisterType((*QueryGetPriceResponse)(nil), "ojo.oracle.v1.QueryGetPriceResponse") + proto.RegisterType((*QueryAllPriceRequest)(nil), "ojo.oracle.v1.QueryAllPriceRequest") + proto.RegisterType((*QueryAllPriceResponse)(nil), "ojo.oracle.v1.QueryAllPriceResponse") } func init() { proto.RegisterFile("ojo/oracle/v1/query.proto", fileDescriptor_ac3bb5b34dcda556) } var fileDescriptor_ac3bb5b34dcda556 = []byte{ - // 1225 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x97, 0x5b, 0x4f, 0x1b, 0x47, - 0x14, 0xc7, 0xbd, 0x69, 0x2e, 0xcd, 0x71, 0xec, 0x38, 0x13, 0x68, 0x60, 0x01, 0x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0x90, 0xe7, 0x1a, 0xa0, 0xb8, 0x5b, 0xa2, 0xd7, 0x93, 0x94, 0xe3, 0x75, 0xba, 0xd9, 0x5f, - 0x9d, 0x62, 0x7c, 0x8b, 0x33, 0xbe, 0x89, 0xcc, 0xee, 0xaf, 0x71, 0xe7, 0x2d, 0xf6, 0xf8, 0xf2, - 0x32, 0x23, 0xfe, 0xf2, 0xbd, 0xa3, 0x7f, 0xf2, 0xa9, 0xa3, 0xe3, 0xbc, 0xf6, 0xe2, 0x38, 0xaf, - 0xfd, 0x7d, 0x9c, 0xd7, 0x9e, 0x9d, 0xe4, 0x53, 0x2f, 0x4e, 0xf2, 0xa9, 0x3f, 0x4e, 0xf2, 0xa9, - 0x2f, 0x66, 0x02, 0x3f, 0x58, 0xe9, 0x0e, 0x9d, 0x73, 0x89, 0xbf, 0x47, 0xbd, 0x87, 0x5c, 0x63, - 0xbf, 0xad, 0xc2, 0x7f, 0xb7, 0x6e, 0x5d, 0xe4, 0xbf, 0xba, 0x17, 0xfe, 0x0f, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x8d, 0x37, 0xdf, 0x11, 0x10, 0x00, 0x00, + // 1392 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x98, 0xcf, 0x6f, 0x13, 0x47, + 0x14, 0xc7, 0xb3, 0x40, 0x02, 0x79, 0xc6, 0x21, 0x19, 0x12, 0x30, 0x0b, 0xd8, 0xc9, 0x00, 0x4d, + 0xd2, 0x90, 0x5d, 0x42, 0x50, 0x11, 0xfd, 0xa5, 0x86, 0x84, 0xd2, 0x9f, 0x12, 0x18, 0x15, 0xa4, + 0x1e, 0xea, 0x6e, 0xbc, 0x53, 0x67, 0x83, 0xbd, 0x63, 0x76, 0x36, 0x0e, 0x88, 0x22, 0x24, 0x7a, + 0xe9, 0x11, 0x09, 0xa9, 0x97, 0x1e, 0x4a, 0x25, 0x4e, 0x55, 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 0x1f, 0xaf, 0xca, 0x43, 0x5f, 0xce, 0x27, 0xbe, 0x64, + 0xd0, 0x4d, 0xaa, 0x12, 0x45, 0xad, 0xbe, 0x1b, 0x67, 0xe2, 0x1f, 0x34, 0xd6, 0x47, 0xf8, 0xe7, + 0x98, 0xe5, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0xf4, 0x1d, 0x2b, 0xb3, 0x44, 0x12, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1218,6 +1381,10 @@ type QueryClient interface { // earning rewards for voting on exchange rates based on their // misscounter in a given Slash Window ValidatorRewardSet(ctx context.Context, in *QueryValidatorRewardSet, opts ...grpc.CallOption) (*QueryValidatorRewardSetResponse, error) + // Queries a Price by asset. + Price(ctx context.Context, in *QueryGetPriceRequest, opts ...grpc.CallOption) (*QueryGetPriceResponse, error) + // Queries a list of Price items. + PriceAll(ctx context.Context, in *QueryAllPriceRequest, opts ...grpc.CallOption) (*QueryAllPriceResponse, error) } type queryClient struct { @@ -1345,6 +1512,24 @@ func (c *queryClient) ValidatorRewardSet(ctx context.Context, in *QueryValidator return out, nil } +func (c *queryClient) Price(ctx context.Context, in *QueryGetPriceRequest, opts ...grpc.CallOption) (*QueryGetPriceResponse, error) { + out := new(QueryGetPriceResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/Price", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) PriceAll(ctx context.Context, in *QueryAllPriceRequest, opts ...grpc.CallOption) (*QueryAllPriceResponse, error) { + out := new(QueryAllPriceResponse) + err := c.cc.Invoke(ctx, "/ojo.oracle.v1.Query/PriceAll", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // ExchangeRates returns exchange rates of all denoms, @@ -1378,6 +1563,10 @@ type QueryServer interface { // earning rewards for voting on exchange rates based on their // misscounter in a given Slash Window ValidatorRewardSet(context.Context, *QueryValidatorRewardSet) (*QueryValidatorRewardSetResponse, error) + // Queries a Price by asset. + Price(context.Context, *QueryGetPriceRequest) (*QueryGetPriceResponse, error) + // Queries a list of Price items. + PriceAll(context.Context, *QueryAllPriceRequest) (*QueryAllPriceResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1423,6 +1612,12 @@ func (*UnimplementedQueryServer) MedianDeviations(ctx context.Context, req *Quer func (*UnimplementedQueryServer) ValidatorRewardSet(ctx context.Context, req *QueryValidatorRewardSet) (*QueryValidatorRewardSetResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ValidatorRewardSet not implemented") } +func (*UnimplementedQueryServer) Price(ctx context.Context, req *QueryGetPriceRequest) (*QueryGetPriceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Price not implemented") +} +func (*UnimplementedQueryServer) PriceAll(ctx context.Context, req *QueryAllPriceRequest) (*QueryAllPriceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PriceAll not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1662,6 +1857,42 @@ func _Query_ValidatorRewardSet_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _Query_Price_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetPriceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Price(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Query/Price", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Price(ctx, req.(*QueryGetPriceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_PriceAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllPriceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).PriceAll(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ojo.oracle.v1.Query/PriceAll", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).PriceAll(ctx, req.(*QueryAllPriceRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "ojo.oracle.v1.Query", HandlerType: (*QueryServer)(nil), @@ -1718,6 +1949,14 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "ValidatorRewardSet", Handler: _Query_ValidatorRewardSet_Handler, }, + { + MethodName: "Price", + Handler: _Query_Price_Handler, + }, + { + MethodName: "PriceAll", + Handler: _Query_PriceAll_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "ojo/oracle/v1/query.proto", @@ -2511,6 +2750,141 @@ func (m *QueryValidatorRewardSetResponse) MarshalToSizedBuffer(dAtA []byte) (int return len(dAtA) - i, nil } +func (m *QueryGetPriceRequest) 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 *QueryGetPriceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetPriceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Timestamp != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x18 + } + if len(m.Source) > 0 { + i -= len(m.Source) + copy(dAtA[i:], m.Source) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Source))) + i-- + dAtA[i] = 0x12 + } + if len(m.Asset) > 0 { + i -= len(m.Asset) + copy(dAtA[i:], m.Asset) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Asset))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGetPriceResponse) 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 *QueryGetPriceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetPriceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Price.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 (m *QueryAllPriceRequest) 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 *QueryAllPriceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllPriceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryAllPriceResponse) 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 *QueryAllPriceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllPriceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Price) > 0 { + for iNdEx := len(m.Price) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Price[iNdEx].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 @@ -2841,15 +3215,70 @@ func (m *QueryValidatorRewardSetResponse) Size() (n int) { return n } -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +func (m *QueryGetPriceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Asset) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Source) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Timestamp != 0 { + n += 1 + sovQuery(uint64(m.Timestamp)) + } + return n } -func (m *QueryExchangeRates) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 + +func (m *QueryGetPriceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Price.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryAllPriceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryAllPriceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Price) > 0 { + for _, e := range m.Price { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryExchangeRates) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 @@ -4794,6 +5223,356 @@ func (m *QueryValidatorRewardSetResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryGetPriceRequest) 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: QueryGetPriceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetPriceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Asset", 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.Asset = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", 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.Source = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 *QueryGetPriceResponse) 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: QueryGetPriceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetPriceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", 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 err := m.Price.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 *QueryAllPriceRequest) 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: QueryAllPriceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllPriceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 *QueryAllPriceResponse) 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: QueryAllPriceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllPriceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", 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 + } + m.Price = append(m.Price, Price{}) + if err := m.Price[len(m.Price)-1].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/oracle/types/query.pb.gw.go b/x/oracle/types/query.pb.gw.go index 8f223b35..5f38267c 100644 --- a/x/oracle/types/query.pb.gw.go +++ b/x/oracle/types/query.pb.gw.go @@ -483,6 +483,96 @@ func local_request_Query_ValidatorRewardSet_0(ctx context.Context, marshaler run } +var ( + filter_Query_Price_0 = &utilities.DoubleArray{Encoding: map[string]int{"asset": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_Price_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetPriceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["asset"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "asset") + } + + protoReq.Asset, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "asset", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Price_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Price(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Price_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetPriceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["asset"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "asset") + } + + protoReq.Asset, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "asset", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Price_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Price(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_PriceAll_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllPriceRequest + var metadata runtime.ServerMetadata + + msg, err := client.PriceAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_PriceAll_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllPriceRequest + var metadata runtime.ServerMetadata + + msg, err := server.PriceAll(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. @@ -788,6 +878,52 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_Price_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_Price_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_Price_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_PriceAll_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_PriceAll_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_PriceAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1089,6 +1225,46 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_Price_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_Price_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_Price_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_PriceAll_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_PriceAll_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_PriceAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1118,6 +1294,10 @@ var ( pattern_Query_MedianDeviations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ojo", "historacle", "v1", "denoms", "median_deviations"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_ValidatorRewardSet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ojo", "oracle", "v1", "valdiators", "validator_reward_set"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Price_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"elys-network", "elys", "oracle", "price", "asset"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_PriceAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"elys-network", "elys", "oracle", "prices"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -1146,4 +1326,8 @@ var ( forward_Query_MedianDeviations_0 = runtime.ForwardResponseMessage forward_Query_ValidatorRewardSet_0 = runtime.ForwardResponseMessage + + forward_Query_Price_0 = runtime.ForwardResponseMessage + + forward_Query_PriceAll_0 = runtime.ForwardResponseMessage )