From 2797e7c01a4ba67534406c87dd2259be0bb40126 Mon Sep 17 00:00:00 2001 From: mattverse Date: Thu, 12 Oct 2023 16:50:26 +0900 Subject: [PATCH 01/12] Add trader fee query --- proto/osmosis/poolmanager/v1beta1/query.proto | 20 + wasmbinding/stargate_whitelist.go | 1 + x/poolmanager/client/grpc/grpc_query.go | 11 + x/poolmanager/client/query_proto_wrap.go | 12 + x/poolmanager/client/queryproto/query.pb.go | 669 +++++++++++++++--- .../client/queryproto/query.pb.gw.go | 83 +++ 6 files changed, 678 insertions(+), 118 deletions(-) diff --git a/proto/osmosis/poolmanager/v1beta1/query.proto b/proto/osmosis/poolmanager/v1beta1/query.proto index 2b105f44b90..3fb5c513656 100644 --- a/proto/osmosis/poolmanager/v1beta1/query.proto +++ b/proto/osmosis/poolmanager/v1beta1/query.proto @@ -119,6 +119,13 @@ service Query { "/osmosis/poolmanager/v1beta1/pools/{pool_id}/total_volume"; } + // TotalVolumeForPool returns the total volume of the specified pool. + rpc TradingPairTakerFee(TradingPairTakerFeeRequest) + returns (TradingPairTakerFeeResponse) { + option (google.api.http).get = + "/osmosis/poolmanager/v1beta1/pools/trading_pair_takerfee"; + } + // EstimateTradeBasedOnPriceImpact returns an estimated trade based on price // impact, if a trade cannot be estimated a 0 input and 0 output would be // returned. @@ -281,6 +288,19 @@ message TotalVolumeForPoolResponse { ]; } +//=============================== TotalVolumeForPool +message TradingPairTakerFeeRequest { + string denom_0 = 1 [ (gogoproto.moretags) = "yaml:\"denom_0\"" ]; + string denom_1 = 2 [ (gogoproto.moretags) = "yaml:\"denom_1\"" ]; +} + +message TradingPairTakerFeeResponse { + string taker_fee = 1 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} + //=============================== EstimateTradeBasedOnPriceImpact // EstimateTradeBasedOnPriceImpactRequest represents a request to estimate a diff --git a/wasmbinding/stargate_whitelist.go b/wasmbinding/stargate_whitelist.go index 44564f0aa39..8f3bbe6472b 100644 --- a/wasmbinding/stargate_whitelist.go +++ b/wasmbinding/stargate_whitelist.go @@ -145,6 +145,7 @@ func init() { setWhitelistedQuery("/osmosis.poolmanager.v1beta1.Query/SpotPrice", &poolmanagerqueryproto.SpotPriceResponse{}) setWhitelistedQuery("/osmosis.poolmanager.v1beta1.Query/TotalPoolLiquidity", &poolmanagerqueryproto.TotalPoolLiquidityResponse{}) setWhitelistedQuery("/osmosis.poolmanager.v1beta1.Query/Params", &poolmanagerqueryproto.ParamsResponse{}) + setWhitelistedQuery("/osmosis.poolmanager.v1beta1.Query/TradingPairTakerFee", &poolmanagerqueryproto.TradingPairTakerFeeResponse{}) // txfees setWhitelistedQuery("/osmosis.txfees.v1beta1.Query/FeeTokens", &txfeestypes.QueryFeeTokensResponse{}) diff --git a/x/poolmanager/client/grpc/grpc_query.go b/x/poolmanager/client/grpc/grpc_query.go index f88b08037ce..2019ae16d38 100644 --- a/x/poolmanager/client/grpc/grpc_query.go +++ b/x/poolmanager/client/grpc/grpc_query.go @@ -91,6 +91,17 @@ func (q Querier) NumPools(grpcCtx context.Context, return q.Q.NumPools(ctx, *req) } + +func (q Querier) TradingPairTakerFee(grpcCtx context.Context, + req *queryproto.TradingPairTakerFeeRequest, +) (*queryproto.TradingPairTakerFeeResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + ctx := sdk.UnwrapSDKContext(grpcCtx) + return q.Q.TradingPairTakerFee(ctx, *req) +} + func (q Querier) EstimateTradeBasedOnPriceImpact(grpcCtx context.Context, req *queryproto.EstimateTradeBasedOnPriceImpactRequest, ) (*queryproto.EstimateTradeBasedOnPriceImpactResponse, error) { diff --git a/x/poolmanager/client/query_proto_wrap.go b/x/poolmanager/client/query_proto_wrap.go index 7ca7923bae0..f8cc19d07a7 100644 --- a/x/poolmanager/client/query_proto_wrap.go +++ b/x/poolmanager/client/query_proto_wrap.go @@ -298,6 +298,18 @@ func (q Querier) TotalVolumeForPool(ctx sdk.Context, req queryproto.TotalVolumeF }, nil } +// TradingPairTakerFee returns the taker fee for the given trading pair +func (q Querier) TradingPairTakerFee(ctx sdk.Context, req queryproto.TradingPairTakerFeeRequest) (*queryproto.TradingPairTakerFeeResponse, error) { + tradingPairTakerFee, err := q.K.GetTradingPairTakerFee(ctx, req.Denom_0, req.Denom_1) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + return &queryproto.TradingPairTakerFeeResponse{ + TakerFee: tradingPairTakerFee, + }, nil +} + // EstimateTradeBasedOnPriceImpact returns the input and output amount of coins for a pool trade // based on external price and maximum price impact. func (q Querier) EstimateTradeBasedOnPriceImpact( diff --git a/x/poolmanager/client/queryproto/query.pb.go b/x/poolmanager/client/queryproto/query.pb.go index 0a337669065..715318c337f 100644 --- a/x/poolmanager/client/queryproto/query.pb.go +++ b/x/poolmanager/client/queryproto/query.pb.go @@ -1205,6 +1205,96 @@ func (m *TotalVolumeForPoolResponse) GetVolume() github_com_cosmos_cosmos_sdk_ty return nil } +// =============================== TotalVolumeForPool +type TradingPairTakerFeeRequest struct { + Denom_0 string `protobuf:"bytes,1,opt,name=denom_0,json=denom0,proto3" json:"denom_0,omitempty" yaml:"denom_0"` + Denom_1 string `protobuf:"bytes,2,opt,name=denom_1,json=denom1,proto3" json:"denom_1,omitempty" yaml:"denom_1"` +} + +func (m *TradingPairTakerFeeRequest) Reset() { *m = TradingPairTakerFeeRequest{} } +func (m *TradingPairTakerFeeRequest) String() string { return proto.CompactTextString(m) } +func (*TradingPairTakerFeeRequest) ProtoMessage() {} +func (*TradingPairTakerFeeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_6256a4106f701b7d, []int{24} +} +func (m *TradingPairTakerFeeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TradingPairTakerFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TradingPairTakerFeeRequest.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 *TradingPairTakerFeeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_TradingPairTakerFeeRequest.Merge(m, src) +} +func (m *TradingPairTakerFeeRequest) XXX_Size() int { + return m.Size() +} +func (m *TradingPairTakerFeeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_TradingPairTakerFeeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_TradingPairTakerFeeRequest proto.InternalMessageInfo + +func (m *TradingPairTakerFeeRequest) GetDenom_0() string { + if m != nil { + return m.Denom_0 + } + return "" +} + +func (m *TradingPairTakerFeeRequest) GetDenom_1() string { + if m != nil { + return m.Denom_1 + } + return "" +} + +type TradingPairTakerFeeResponse struct { + TakerFee github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=taker_fee,json=takerFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"taker_fee"` +} + +func (m *TradingPairTakerFeeResponse) Reset() { *m = TradingPairTakerFeeResponse{} } +func (m *TradingPairTakerFeeResponse) String() string { return proto.CompactTextString(m) } +func (*TradingPairTakerFeeResponse) ProtoMessage() {} +func (*TradingPairTakerFeeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_6256a4106f701b7d, []int{25} +} +func (m *TradingPairTakerFeeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TradingPairTakerFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TradingPairTakerFeeResponse.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 *TradingPairTakerFeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_TradingPairTakerFeeResponse.Merge(m, src) +} +func (m *TradingPairTakerFeeResponse) XXX_Size() int { + return m.Size() +} +func (m *TradingPairTakerFeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_TradingPairTakerFeeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_TradingPairTakerFeeResponse proto.InternalMessageInfo + // EstimateTradeBasedOnPriceImpactRequest represents a request to estimate a // trade for Balancer/StableSwap/Concentrated liquidity pool types based on the // given parameters. @@ -1232,7 +1322,7 @@ func (m *EstimateTradeBasedOnPriceImpactRequest) Reset() { func (m *EstimateTradeBasedOnPriceImpactRequest) String() string { return proto.CompactTextString(m) } func (*EstimateTradeBasedOnPriceImpactRequest) ProtoMessage() {} func (*EstimateTradeBasedOnPriceImpactRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6256a4106f701b7d, []int{24} + return fileDescriptor_6256a4106f701b7d, []int{26} } func (m *EstimateTradeBasedOnPriceImpactRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1301,7 +1391,7 @@ func (m *EstimateTradeBasedOnPriceImpactResponse) Reset() { func (m *EstimateTradeBasedOnPriceImpactResponse) String() string { return proto.CompactTextString(m) } func (*EstimateTradeBasedOnPriceImpactResponse) ProtoMessage() {} func (*EstimateTradeBasedOnPriceImpactResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6256a4106f701b7d, []int{25} + return fileDescriptor_6256a4106f701b7d, []int{27} } func (m *EstimateTradeBasedOnPriceImpactResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1369,6 +1459,8 @@ func init() { proto.RegisterType((*TotalLiquidityResponse)(nil), "osmosis.poolmanager.v1beta1.TotalLiquidityResponse") proto.RegisterType((*TotalVolumeForPoolRequest)(nil), "osmosis.poolmanager.v1beta1.TotalVolumeForPoolRequest") proto.RegisterType((*TotalVolumeForPoolResponse)(nil), "osmosis.poolmanager.v1beta1.TotalVolumeForPoolResponse") + proto.RegisterType((*TradingPairTakerFeeRequest)(nil), "osmosis.poolmanager.v1beta1.TradingPairTakerFeeRequest") + proto.RegisterType((*TradingPairTakerFeeResponse)(nil), "osmosis.poolmanager.v1beta1.TradingPairTakerFeeResponse") proto.RegisterType((*EstimateTradeBasedOnPriceImpactRequest)(nil), "osmosis.poolmanager.v1beta1.EstimateTradeBasedOnPriceImpactRequest") proto.RegisterType((*EstimateTradeBasedOnPriceImpactResponse)(nil), "osmosis.poolmanager.v1beta1.EstimateTradeBasedOnPriceImpactResponse") } @@ -1378,122 +1470,129 @@ func init() { } var fileDescriptor_6256a4106f701b7d = []byte{ - // 1836 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xcd, 0x6f, 0x1b, 0x4f, - 0x19, 0xce, 0x3a, 0x4e, 0x1a, 0x4f, 0x1a, 0xc7, 0x99, 0x36, 0x69, 0xe2, 0x96, 0x6c, 0xba, 0x2d, - 0xad, 0xdb, 0x24, 0xbb, 0x4a, 0xd2, 0x52, 0x5a, 0x68, 0x8b, 0x9d, 0xa4, 0xad, 0x51, 0x21, 0x61, - 0x93, 0x7e, 0x50, 0x28, 0xd6, 0xc6, 0xde, 0x3a, 0xab, 0x7a, 0x77, 0x1c, 0xef, 0x6c, 0x9a, 0x08, - 0xf5, 0x82, 0x84, 0x40, 0x1c, 0x50, 0x81, 0x43, 0x0f, 0x1c, 0x10, 0x07, 0x2e, 0xed, 0x15, 0xfe, - 0x87, 0x0a, 0x09, 0x14, 0x09, 0x0e, 0x88, 0x83, 0x41, 0x2d, 0x07, 0x24, 0x7a, 0xc1, 0x7f, 0xc1, - 0x4f, 0xf3, 0xb1, 0x6b, 0x7b, 0x63, 0xaf, 0xd7, 0x4e, 0x0e, 0xbf, 0x53, 0xec, 0x99, 0xf7, 0xeb, - 0x79, 0xe6, 0x7d, 0x76, 0xe7, 0x75, 0xc0, 0x65, 0x64, 0x9b, 0xc8, 0x36, 0x6c, 0xa5, 0x8c, 0x50, - 0xc9, 0xd4, 0x2c, 0xad, 0xa8, 0x57, 0x94, 0xdd, 0x85, 0x2d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 0xe0, 0xd3, 0x74, 0xdf, 0x3f, 0x3e, 0x4d, 0xf7, 0x3d, 0x5b, 0x6e, 0x98, - 0xc5, 0x78, 0xe8, 0xf9, 0x92, 0xb6, 0x65, 0x7b, 0x79, 0x76, 0x17, 0x6e, 0x2a, 0x7b, 0x4d, 0xd9, - 0xf2, 0x25, 0x43, 0xb7, 0x30, 0xfb, 0x0f, 0x1d, 0xfb, 0x85, 0x6a, 0x90, 0xfe, 0x59, 0xfa, 0x22, - 0x00, 0x00, 0xff, 0xff, 0x30, 0x9d, 0xbd, 0xeb, 0xbd, 0x1c, 0x00, 0x00, + // 1951 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xcb, 0x73, 0x1b, 0x49, + 0x19, 0xcf, 0xc8, 0x8a, 0xd7, 0xfa, 0x1c, 0x3f, 0xd2, 0x89, 0x13, 0x5b, 0x09, 0x96, 0xb7, 0xb3, + 0x64, 0xbd, 0x71, 0x3c, 0x5a, 0xdb, 0x59, 0x92, 0x0d, 0xec, 0xc3, 0xb2, 0x9d, 0x8d, 0x60, 0x21, + 0x66, 0xe2, 0x7d, 0xb0, 0x10, 0xa6, 0xc6, 0x56, 0x47, 0x19, 0xa2, 0x99, 0x56, 0x34, 0x3d, 0x8e, + 0x5d, 0xd4, 0x5e, 0xa8, 0xa2, 0xe0, 0x44, 0x2d, 0x70, 0xd8, 0x03, 0x07, 0x8a, 0x03, 0x97, 0xdd, + 0x2b, 0xfc, 0x0f, 0xa9, 0xad, 0x82, 0x72, 0x15, 0x54, 0x41, 0x71, 0x10, 0x54, 0xc2, 0x81, 0x2a, + 0x72, 0x41, 0x7f, 0x01, 0xd5, 0x8f, 0x19, 0x49, 0x63, 0x69, 0x34, 0x92, 0x7d, 0xd8, 0x93, 0xa5, + 0xee, 0xef, 0xf5, 0xfb, 0xf5, 0xf7, 0xf5, 0xcc, 0x4f, 0x86, 0x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0x8b, 0x3f, + 0x2b, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x70, 0x5b, 0x58, 0x32, 0x6e, 0x1e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1543,6 +1642,8 @@ type QueryClient interface { TotalLiquidity(ctx context.Context, in *TotalLiquidityRequest, opts ...grpc.CallOption) (*TotalLiquidityResponse, error) // TotalVolumeForPool returns the total volume of the specified pool. TotalVolumeForPool(ctx context.Context, in *TotalVolumeForPoolRequest, opts ...grpc.CallOption) (*TotalVolumeForPoolResponse, error) + // TotalVolumeForPool returns the total volume of the specified pool. + TradingPairTakerFee(ctx context.Context, in *TradingPairTakerFeeRequest, opts ...grpc.CallOption) (*TradingPairTakerFeeResponse, error) // EstimateTradeBasedOnPriceImpact returns an estimated trade based on price // impact, if a trade cannot be estimated a 0 input and 0 output would be // returned. @@ -1683,6 +1784,15 @@ func (c *queryClient) TotalVolumeForPool(ctx context.Context, in *TotalVolumeFor return out, nil } +func (c *queryClient) TradingPairTakerFee(ctx context.Context, in *TradingPairTakerFeeRequest, opts ...grpc.CallOption) (*TradingPairTakerFeeResponse, error) { + out := new(TradingPairTakerFeeResponse) + err := c.cc.Invoke(ctx, "/osmosis.poolmanager.v1beta1.Query/TradingPairTakerFee", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) EstimateTradeBasedOnPriceImpact(ctx context.Context, in *EstimateTradeBasedOnPriceImpactRequest, opts ...grpc.CallOption) (*EstimateTradeBasedOnPriceImpactResponse, error) { out := new(EstimateTradeBasedOnPriceImpactResponse) err := c.cc.Invoke(ctx, "/osmosis.poolmanager.v1beta1.Query/EstimateTradeBasedOnPriceImpact", in, out, opts...) @@ -1729,6 +1839,8 @@ type QueryServer interface { TotalLiquidity(context.Context, *TotalLiquidityRequest) (*TotalLiquidityResponse, error) // TotalVolumeForPool returns the total volume of the specified pool. TotalVolumeForPool(context.Context, *TotalVolumeForPoolRequest) (*TotalVolumeForPoolResponse, error) + // TotalVolumeForPool returns the total volume of the specified pool. + TradingPairTakerFee(context.Context, *TradingPairTakerFeeRequest) (*TradingPairTakerFeeResponse, error) // EstimateTradeBasedOnPriceImpact returns an estimated trade based on price // impact, if a trade cannot be estimated a 0 input and 0 output would be // returned. @@ -1781,6 +1893,9 @@ func (*UnimplementedQueryServer) TotalLiquidity(ctx context.Context, req *TotalL func (*UnimplementedQueryServer) TotalVolumeForPool(ctx context.Context, req *TotalVolumeForPoolRequest) (*TotalVolumeForPoolResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TotalVolumeForPool not implemented") } +func (*UnimplementedQueryServer) TradingPairTakerFee(ctx context.Context, req *TradingPairTakerFeeRequest) (*TradingPairTakerFeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TradingPairTakerFee not implemented") +} func (*UnimplementedQueryServer) EstimateTradeBasedOnPriceImpact(ctx context.Context, req *EstimateTradeBasedOnPriceImpactRequest) (*EstimateTradeBasedOnPriceImpactResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method EstimateTradeBasedOnPriceImpact not implemented") } @@ -2041,6 +2156,24 @@ func _Query_TotalVolumeForPool_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _Query_TradingPairTakerFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TradingPairTakerFeeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TradingPairTakerFee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.poolmanager.v1beta1.Query/TradingPairTakerFee", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TradingPairTakerFee(ctx, req.(*TradingPairTakerFeeRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_EstimateTradeBasedOnPriceImpact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(EstimateTradeBasedOnPriceImpactRequest) if err := dec(in); err != nil { @@ -2119,6 +2252,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "TotalVolumeForPool", Handler: _Query_TotalVolumeForPool_Handler, }, + { + MethodName: "TradingPairTakerFee", + Handler: _Query_TradingPairTakerFee_Handler, + }, { MethodName: "EstimateTradeBasedOnPriceImpact", Handler: _Query_EstimateTradeBasedOnPriceImpact_Handler, @@ -2992,6 +3129,76 @@ func (m *TotalVolumeForPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } +func (m *TradingPairTakerFeeRequest) 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 *TradingPairTakerFeeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TradingPairTakerFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denom_1) > 0 { + i -= len(m.Denom_1) + copy(dAtA[i:], m.Denom_1) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom_1))) + i-- + dAtA[i] = 0x12 + } + if len(m.Denom_0) > 0 { + i -= len(m.Denom_0) + copy(dAtA[i:], m.Denom_0) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom_0))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TradingPairTakerFeeResponse) 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 *TradingPairTakerFeeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TradingPairTakerFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.TakerFee.Size() + i -= size + if _, err := m.TakerFee.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *EstimateTradeBasedOnPriceImpactRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -3476,6 +3683,34 @@ func (m *TotalVolumeForPoolResponse) Size() (n int) { return n } +func (m *TradingPairTakerFeeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom_0) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Denom_1) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *TradingPairTakerFeeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.TakerFee.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + func (m *EstimateTradeBasedOnPriceImpactRequest) Size() (n int) { if m == nil { return 0 @@ -5835,6 +6070,204 @@ func (m *TotalVolumeForPoolResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *TradingPairTakerFeeRequest) 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: TradingPairTakerFeeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TradingPairTakerFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom_0", 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.Denom_0 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom_1", 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.Denom_1 = 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 *TradingPairTakerFeeResponse) 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: TradingPairTakerFeeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TradingPairTakerFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TakerFee", 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 + } + if err := m.TakerFee.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 *EstimateTradeBasedOnPriceImpactRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/poolmanager/client/queryproto/query.pb.gw.go b/x/poolmanager/client/queryproto/query.pb.gw.go index 493c24bee7a..a22f9280715 100644 --- a/x/poolmanager/client/queryproto/query.pb.gw.go +++ b/x/poolmanager/client/queryproto/query.pb.gw.go @@ -771,6 +771,42 @@ func local_request_Query_TotalVolumeForPool_0(ctx context.Context, marshaler run } +var ( + filter_Query_TradingPairTakerFee_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_TradingPairTakerFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq TradingPairTakerFeeRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_TradingPairTakerFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.TradingPairTakerFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TradingPairTakerFee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq TradingPairTakerFeeRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_TradingPairTakerFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.TradingPairTakerFee(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_Query_EstimateTradeBasedOnPriceImpact_0 = &utilities.DoubleArray{Encoding: map[string]int{"pool_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -1171,6 +1207,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_TradingPairTakerFee_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_TradingPairTakerFee_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_TradingPairTakerFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_EstimateTradeBasedOnPriceImpact_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1515,6 +1574,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_TradingPairTakerFee_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_TradingPairTakerFee_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_TradingPairTakerFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_EstimateTradeBasedOnPriceImpact_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1567,6 +1646,8 @@ var ( pattern_Query_TotalVolumeForPool_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"osmosis", "poolmanager", "v1beta1", "pools", "pool_id", "total_volume"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_TradingPairTakerFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"osmosis", "poolmanager", "v1beta1", "pools", "trading_pair_takerfee"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_EstimateTradeBasedOnPriceImpact_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"osmosis", "poolmanager", "v1beta1", "pool_id", "estimate_trade"}, "", runtime.AssumeColonVerbOpt(false))) ) @@ -1599,5 +1680,7 @@ var ( forward_Query_TotalVolumeForPool_0 = runtime.ForwardResponseMessage + forward_Query_TradingPairTakerFee_0 = runtime.ForwardResponseMessage + forward_Query_EstimateTradeBasedOnPriceImpact_0 = runtime.ForwardResponseMessage ) From a42635133946dec10fec463f802fe41d291b6e44 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 12 Oct 2023 07:54:46 +0000 Subject: [PATCH 02/12] Generated protofile changes --- x/poolmanager/client/grpc/grpc_query.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/x/poolmanager/client/grpc/grpc_query.go b/x/poolmanager/client/grpc/grpc_query.go index 2019ae16d38..f88b08037ce 100644 --- a/x/poolmanager/client/grpc/grpc_query.go +++ b/x/poolmanager/client/grpc/grpc_query.go @@ -91,17 +91,6 @@ func (q Querier) NumPools(grpcCtx context.Context, return q.Q.NumPools(ctx, *req) } - -func (q Querier) TradingPairTakerFee(grpcCtx context.Context, - req *queryproto.TradingPairTakerFeeRequest, -) (*queryproto.TradingPairTakerFeeResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "empty request") - } - ctx := sdk.UnwrapSDKContext(grpcCtx) - return q.Q.TradingPairTakerFee(ctx, *req) -} - func (q Querier) EstimateTradeBasedOnPriceImpact(grpcCtx context.Context, req *queryproto.EstimateTradeBasedOnPriceImpactRequest, ) (*queryproto.EstimateTradeBasedOnPriceImpactResponse, error) { From 56a589bda347ed6cabc6aa0903629819c9f962f2 Mon Sep 17 00:00:00 2001 From: mattverse Date: Thu, 12 Oct 2023 16:56:30 +0900 Subject: [PATCH 03/12] Add Taker fee --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ad5c2fe667..3b04ab506f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [#6421](https://github.com/osmosis-labs/osmosis/pull/6421) Moves ValidatePermissionlessPoolCreationEnabled out of poolmanager module * [#6627](https://github.com/osmosis-labs/osmosis/pull/6627) Limit pow iterations in osmomath. * [#6586](https://github.com/osmosis-labs/osmosis/pull/6586) add auth.moduleaccounts to the stargate whitelist +* [#6680](https://github.com/osmosis-labs/osmosis/pull/6680) Add Taker Fee query and add it to stargate whitelist ### Bug Fixes * [#6644](https://github.com/osmosis-labs/osmosis/pull/6644) fix: genesis bug in pool incentives linking NoLock gauges and PoolIDs From 8113527c944723122ffec34e18cf6178dc459872 Mon Sep 17 00:00:00 2001 From: mattverse Date: Thu, 12 Oct 2023 17:12:28 +0900 Subject: [PATCH 04/12] Add querier logic --- x/poolmanager/client/grpc/grpc_query.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/x/poolmanager/client/grpc/grpc_query.go b/x/poolmanager/client/grpc/grpc_query.go index f88b08037ce..184ec306a86 100644 --- a/x/poolmanager/client/grpc/grpc_query.go +++ b/x/poolmanager/client/grpc/grpc_query.go @@ -91,6 +91,16 @@ func (q Querier) NumPools(grpcCtx context.Context, return q.Q.NumPools(ctx, *req) } +func (q Querier) TradingPairTakerFee(grpcCtx context.Context, + req *queryproto.TradingPairTakerFeeRequest, +) (*queryproto.TradingPairTakerFeeResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + ctx := sdk.UnwrapSDKContext(grpcCtx) + return q.Q.TradingPairTakerFee(ctx, *req) +} + func (q Querier) EstimateTradeBasedOnPriceImpact(grpcCtx context.Context, req *queryproto.EstimateTradeBasedOnPriceImpactRequest, ) (*queryproto.EstimateTradeBasedOnPriceImpactResponse, error) { From ec927e071a843c5bf9b0b3c75556db058f5d97df Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 12 Oct 2023 08:14:47 +0000 Subject: [PATCH 05/12] Generated protofile changes --- x/poolmanager/client/grpc/grpc_query.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/x/poolmanager/client/grpc/grpc_query.go b/x/poolmanager/client/grpc/grpc_query.go index 184ec306a86..f88b08037ce 100644 --- a/x/poolmanager/client/grpc/grpc_query.go +++ b/x/poolmanager/client/grpc/grpc_query.go @@ -91,16 +91,6 @@ func (q Querier) NumPools(grpcCtx context.Context, return q.Q.NumPools(ctx, *req) } -func (q Querier) TradingPairTakerFee(grpcCtx context.Context, - req *queryproto.TradingPairTakerFeeRequest, -) (*queryproto.TradingPairTakerFeeResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "empty request") - } - ctx := sdk.UnwrapSDKContext(grpcCtx) - return q.Q.TradingPairTakerFee(ctx, *req) -} - func (q Querier) EstimateTradeBasedOnPriceImpact(grpcCtx context.Context, req *queryproto.EstimateTradeBasedOnPriceImpactRequest, ) (*queryproto.EstimateTradeBasedOnPriceImpactResponse, error) { From ced0a47d09362bc90fe6cfbff2b21340b593a6bd Mon Sep 17 00:00:00 2001 From: mattverse Date: Thu, 12 Oct 2023 21:55:42 +0900 Subject: [PATCH 06/12] Add grpc guery.go --- x/poolmanager/client/grpc/grpc_query.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/x/poolmanager/client/grpc/grpc_query.go b/x/poolmanager/client/grpc/grpc_query.go index f88b08037ce..184ec306a86 100644 --- a/x/poolmanager/client/grpc/grpc_query.go +++ b/x/poolmanager/client/grpc/grpc_query.go @@ -91,6 +91,16 @@ func (q Querier) NumPools(grpcCtx context.Context, return q.Q.NumPools(ctx, *req) } +func (q Querier) TradingPairTakerFee(grpcCtx context.Context, + req *queryproto.TradingPairTakerFeeRequest, +) (*queryproto.TradingPairTakerFeeResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + ctx := sdk.UnwrapSDKContext(grpcCtx) + return q.Q.TradingPairTakerFee(ctx, *req) +} + func (q Querier) EstimateTradeBasedOnPriceImpact(grpcCtx context.Context, req *queryproto.EstimateTradeBasedOnPriceImpactRequest, ) (*queryproto.EstimateTradeBasedOnPriceImpactResponse, error) { From 621e101559a11a41f1c754c882895870455c9895 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 12 Oct 2023 12:58:25 +0000 Subject: [PATCH 07/12] Generated protofile changes --- x/poolmanager/client/grpc/grpc_query.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/x/poolmanager/client/grpc/grpc_query.go b/x/poolmanager/client/grpc/grpc_query.go index 184ec306a86..f88b08037ce 100644 --- a/x/poolmanager/client/grpc/grpc_query.go +++ b/x/poolmanager/client/grpc/grpc_query.go @@ -91,16 +91,6 @@ func (q Querier) NumPools(grpcCtx context.Context, return q.Q.NumPools(ctx, *req) } -func (q Querier) TradingPairTakerFee(grpcCtx context.Context, - req *queryproto.TradingPairTakerFeeRequest, -) (*queryproto.TradingPairTakerFeeResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "empty request") - } - ctx := sdk.UnwrapSDKContext(grpcCtx) - return q.Q.TradingPairTakerFee(ctx, *req) -} - func (q Querier) EstimateTradeBasedOnPriceImpact(grpcCtx context.Context, req *queryproto.EstimateTradeBasedOnPriceImpactRequest, ) (*queryproto.EstimateTradeBasedOnPriceImpactResponse, error) { From 98eb12a1982c1b2d7353ce58262ed053e8f98f96 Mon Sep 17 00:00:00 2001 From: "Matt, Park" <45252226+mattverse@users.noreply.github.com> Date: Fri, 13 Oct 2023 18:15:49 +0900 Subject: [PATCH 08/12] Update proto/osmosis/poolmanager/v1beta1/query.proto Co-authored-by: Adam Tucker --- proto/osmosis/poolmanager/v1beta1/query.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/osmosis/poolmanager/v1beta1/query.proto b/proto/osmosis/poolmanager/v1beta1/query.proto index 3fb5c513656..6dcb158cd3b 100644 --- a/proto/osmosis/poolmanager/v1beta1/query.proto +++ b/proto/osmosis/poolmanager/v1beta1/query.proto @@ -119,7 +119,7 @@ service Query { "/osmosis/poolmanager/v1beta1/pools/{pool_id}/total_volume"; } - // TotalVolumeForPool returns the total volume of the specified pool. + // TradingPairTakerFee returns the taker fee for a given set of denoms rpc TradingPairTakerFee(TradingPairTakerFeeRequest) returns (TradingPairTakerFeeResponse) { option (google.api.http).get = From c32025499e85420c6d9daa93ea824b41e22599f9 Mon Sep 17 00:00:00 2001 From: "Matt, Park" <45252226+mattverse@users.noreply.github.com> Date: Fri, 13 Oct 2023 18:15:55 +0900 Subject: [PATCH 09/12] Update proto/osmosis/poolmanager/v1beta1/query.proto Co-authored-by: Adam Tucker --- proto/osmosis/poolmanager/v1beta1/query.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/osmosis/poolmanager/v1beta1/query.proto b/proto/osmosis/poolmanager/v1beta1/query.proto index 6dcb158cd3b..1d4b20a602d 100644 --- a/proto/osmosis/poolmanager/v1beta1/query.proto +++ b/proto/osmosis/poolmanager/v1beta1/query.proto @@ -288,7 +288,7 @@ message TotalVolumeForPoolResponse { ]; } -//=============================== TotalVolumeForPool +//=============================== TradingPairTakerFee message TradingPairTakerFeeRequest { string denom_0 = 1 [ (gogoproto.moretags) = "yaml:\"denom_0\"" ]; string denom_1 = 2 [ (gogoproto.moretags) = "yaml:\"denom_1\"" ]; From efccf6afa2708e674caaec3db382083736f43213 Mon Sep 17 00:00:00 2001 From: mattverse Date: Fri, 13 Oct 2023 20:04:39 +0900 Subject: [PATCH 10/12] Add cli --- x/poolmanager/client/cli/query.go | 10 ++++++++++ x/poolmanager/client/grpc/grpc_query.go | 10 ++++++++++ x/poolmanager/client/queryproto/query.pb.go | 6 +++--- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/x/poolmanager/client/cli/query.go b/x/poolmanager/client/cli/query.go index e42491632c7..cd585ab88af 100644 --- a/x/poolmanager/client/cli/query.go +++ b/x/poolmanager/client/cli/query.go @@ -30,6 +30,7 @@ func GetQueryCmd() *cobra.Command { osmocli.AddQueryCmd(cmd, queryproto.NewQueryClient, GetCmdAllPools) osmocli.AddQueryCmd(cmd, queryproto.NewQueryClient, GetCmdPool) osmocli.AddQueryCmd(cmd, queryproto.NewQueryClient, GetCmdTotalVolumeForPool) + osmocli.AddQueryCmd(cmd, queryproto.NewQueryClient, GetCmdTradingPairTakerFee) osmocli.AddQueryCmd(cmd, queryproto.NewQueryClient, GetCmdEstimateTradeBasedOnPriceImpact) cmd.AddCommand( osmocli.GetParams[*queryproto.ParamsRequest]( @@ -181,6 +182,15 @@ func GetCmdTotalVolumeForPool() (*osmocli.QueryDescriptor, *queryproto.TotalVolu }, &queryproto.TotalVolumeForPoolRequest{} } +func GetCmdTradingPairTakerFee() (*osmocli.QueryDescriptor, *queryproto.TradingPairTakerFeeRequest) { + return &osmocli.QueryDescriptor{ + Use: "trading-pair-taker-fee", + Short: "Query trading pair taker fee", + Long: `{{.Short}} + {{.CommandPrefix}} trading-pair-taker-fee uosmo uatom`, + }, &queryproto.TradingPairTakerFeeRequest{} +} + func GetCmdEstimateTradeBasedOnPriceImpact() ( *osmocli.QueryDescriptor, *queryproto.EstimateTradeBasedOnPriceImpactRequest, ) { diff --git a/x/poolmanager/client/grpc/grpc_query.go b/x/poolmanager/client/grpc/grpc_query.go index f88b08037ce..184ec306a86 100644 --- a/x/poolmanager/client/grpc/grpc_query.go +++ b/x/poolmanager/client/grpc/grpc_query.go @@ -91,6 +91,16 @@ func (q Querier) NumPools(grpcCtx context.Context, return q.Q.NumPools(ctx, *req) } +func (q Querier) TradingPairTakerFee(grpcCtx context.Context, + req *queryproto.TradingPairTakerFeeRequest, +) (*queryproto.TradingPairTakerFeeResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + ctx := sdk.UnwrapSDKContext(grpcCtx) + return q.Q.TradingPairTakerFee(ctx, *req) +} + func (q Querier) EstimateTradeBasedOnPriceImpact(grpcCtx context.Context, req *queryproto.EstimateTradeBasedOnPriceImpactRequest, ) (*queryproto.EstimateTradeBasedOnPriceImpactResponse, error) { diff --git a/x/poolmanager/client/queryproto/query.pb.go b/x/poolmanager/client/queryproto/query.pb.go index 715318c337f..baff2ec9473 100644 --- a/x/poolmanager/client/queryproto/query.pb.go +++ b/x/poolmanager/client/queryproto/query.pb.go @@ -1205,7 +1205,7 @@ func (m *TotalVolumeForPoolResponse) GetVolume() github_com_cosmos_cosmos_sdk_ty return nil } -// =============================== TotalVolumeForPool +// =============================== TradingPairTakerFee type TradingPairTakerFeeRequest struct { Denom_0 string `protobuf:"bytes,1,opt,name=denom_0,json=denom0,proto3" json:"denom_0,omitempty" yaml:"denom_0"` Denom_1 string `protobuf:"bytes,2,opt,name=denom_1,json=denom1,proto3" json:"denom_1,omitempty" yaml:"denom_1"` @@ -1642,7 +1642,7 @@ type QueryClient interface { TotalLiquidity(ctx context.Context, in *TotalLiquidityRequest, opts ...grpc.CallOption) (*TotalLiquidityResponse, error) // TotalVolumeForPool returns the total volume of the specified pool. TotalVolumeForPool(ctx context.Context, in *TotalVolumeForPoolRequest, opts ...grpc.CallOption) (*TotalVolumeForPoolResponse, error) - // TotalVolumeForPool returns the total volume of the specified pool. + // TradingPairTakerFee returns the taker fee for a given set of denoms TradingPairTakerFee(ctx context.Context, in *TradingPairTakerFeeRequest, opts ...grpc.CallOption) (*TradingPairTakerFeeResponse, error) // EstimateTradeBasedOnPriceImpact returns an estimated trade based on price // impact, if a trade cannot be estimated a 0 input and 0 output would be @@ -1839,7 +1839,7 @@ type QueryServer interface { TotalLiquidity(context.Context, *TotalLiquidityRequest) (*TotalLiquidityResponse, error) // TotalVolumeForPool returns the total volume of the specified pool. TotalVolumeForPool(context.Context, *TotalVolumeForPoolRequest) (*TotalVolumeForPoolResponse, error) - // TotalVolumeForPool returns the total volume of the specified pool. + // TradingPairTakerFee returns the taker fee for a given set of denoms TradingPairTakerFee(context.Context, *TradingPairTakerFeeRequest) (*TradingPairTakerFeeResponse, error) // EstimateTradeBasedOnPriceImpact returns an estimated trade based on price // impact, if a trade cannot be estimated a 0 input and 0 output would be From 395a70f99f1cd7dd32ade775f5f30a39b4babe1b Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 13 Oct 2023 11:11:52 +0000 Subject: [PATCH 11/12] Generated protofile changes --- x/poolmanager/client/grpc/grpc_query.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/x/poolmanager/client/grpc/grpc_query.go b/x/poolmanager/client/grpc/grpc_query.go index 7bdf362a0fa..f1d5e2b6b30 100644 --- a/x/poolmanager/client/grpc/grpc_query.go +++ b/x/poolmanager/client/grpc/grpc_query.go @@ -91,16 +91,6 @@ func (q Querier) NumPools(grpcCtx context.Context, return q.Q.NumPools(ctx, *req) } -func (q Querier) TradingPairTakerFee(grpcCtx context.Context, - req *queryproto.TradingPairTakerFeeRequest, -) (*queryproto.TradingPairTakerFeeResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "empty request") - } - ctx := sdk.UnwrapSDKContext(grpcCtx) - return q.Q.TradingPairTakerFee(ctx, *req) -} - func (q Querier) EstimateTradeBasedOnPriceImpact(grpcCtx context.Context, req *queryproto.EstimateTradeBasedOnPriceImpactRequest, ) (*queryproto.EstimateTradeBasedOnPriceImpactResponse, error) { From a36d493c8f50d7ad723dfe239ca8cd4bc9407d1f Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Fri, 13 Oct 2023 07:57:49 -0600 Subject: [PATCH 12/12] register query in query server --- proto/osmosis/poolmanager/v1beta1/query.yml | 5 +++++ x/poolmanager/client/grpc/grpc_query.go | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/proto/osmosis/poolmanager/v1beta1/query.yml b/proto/osmosis/poolmanager/v1beta1/query.yml index bf7a65369ad..08bd7c07f0a 100644 --- a/proto/osmosis/poolmanager/v1beta1/query.yml +++ b/proto/osmosis/poolmanager/v1beta1/query.yml @@ -83,3 +83,8 @@ queries: response: "*queryproto.EstimateTradeBasedOnPriceImpactResponse" cli: cmd: "EstimateTradeBasedOnPriceImpact" + TradingPairTakerFee: + proto_wrapper: + query_func: "k.GetTradingPairTakerFee" + cli: + cmd: "TradingPairTakerFee" diff --git a/x/poolmanager/client/grpc/grpc_query.go b/x/poolmanager/client/grpc/grpc_query.go index f1d5e2b6b30..a47c7e9b9d3 100644 --- a/x/poolmanager/client/grpc/grpc_query.go +++ b/x/poolmanager/client/grpc/grpc_query.go @@ -21,6 +21,16 @@ type Querier struct { var _ queryproto.QueryServer = Querier{} +func (q Querier) TradingPairTakerFee(grpcCtx context.Context, + req *queryproto.TradingPairTakerFeeRequest, +) (*queryproto.TradingPairTakerFeeResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + ctx := sdk.UnwrapSDKContext(grpcCtx) + return q.Q.TradingPairTakerFee(ctx, *req) +} + func (q Querier) TotalVolumeForPool(grpcCtx context.Context, req *queryproto.TotalVolumeForPoolRequest, ) (*queryproto.TotalVolumeForPoolResponse, error) {