diff --git a/CHANGELOG.md b/CHANGELOG.md index 5dd377db13..a8d2ee7fb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Features - [860](https://github.com/umee-network/umee/pull/860) Add IBC upgrade and upgrade-client gov proposals. +- [894](https://github.com/umee-network/umee/pull/894) Add MarketSummary query ### Improvements diff --git a/proto/umee/leverage/v1beta1/query.proto b/proto/umee/leverage/v1beta1/query.proto index 88b3cb2fb6..1d1d29f9fc 100644 --- a/proto/umee/leverage/v1beta1/query.proto +++ b/proto/umee/leverage/v1beta1/query.proto @@ -120,6 +120,11 @@ service Query { rpc LiquidationTargets(QueryLiquidationTargetsRequest) returns (QueryLiquidationTargetsResponse) { option (google.api.http).get = "/umee/leverage/v1beta1/liquidation_targets"; } + + // MarketSummary queries a base asset's current borrowing and lending conditions. + rpc MarketSummary(QueryMarketSummaryRequest) returns (QueryMarketSummaryResponse) { + option (google.api.http).get = "/umee/leverage/v1/market_summary"; + } } // QueryRegisteredTokens defines the request structure for the RegisteredTokens @@ -356,3 +361,30 @@ message QueryLiquidationTargetsRequest {} message QueryLiquidationTargetsResponse { repeated string targets = 1; } + +// QueryMarketSummaryRequest defines the request structure for the +// MarketSummary gRPC service handler. +message QueryMarketSummaryRequest { + string denom = 1; +} + +// QueryMarketSummaryResponse defines the response structure for the +// MarketSummary gRPC service handler. +message QueryMarketSummaryResponse { + string symbol_denom = 1; + uint32 exponent = 2; + string oracle_price = 3 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = true]; + string uToken_exchange_rate = 4 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + string lend_APY = 5 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + string borrow_APY = 6 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + string market_size = 7 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + string available_borrow = 8 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + string reserved = 9 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; +} \ No newline at end of file diff --git a/x/leverage/keeper/grpc_query.go b/x/leverage/keeper/grpc_query.go index e1178bfa5d..2eeb9ae3bc 100644 --- a/x/leverage/keeper/grpc_query.go +++ b/x/leverage/keeper/grpc_query.go @@ -558,3 +558,45 @@ func (q Querier) LiquidationTargets( return &types.QueryLiquidationTargetsResponse{Targets: stringTargets}, nil } + +func (q Querier) MarketSummary( + goCtx context.Context, + req *types.QueryMarketSummaryRequest, +) (*types.QueryMarketSummaryResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + if req.Denom == "" { + return nil, status.Error(codes.InvalidArgument, "invalid denom") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + token, err := q.Keeper.GetRegisteredToken(ctx, req.Denom) + if err != nil { + return nil, status.Error(codes.InvalidArgument, "not accepted Token denom") + } + rate := q.Keeper.DeriveExchangeRate(ctx, req.Denom) + lendAPY := q.Keeper.DeriveLendAPY(ctx, req.Denom) + borrowAPY := q.Keeper.DeriveBorrowAPY(ctx, req.Denom) + marketSizeCoin, _ := q.Keeper.GetTotalLoaned(ctx, req.Denom) + availableBorrow := q.Keeper.GetAvailableToBorrow(ctx, req.Denom) + reserved := q.Keeper.GetReserveAmount(ctx, req.Denom) + + resp := types.QueryMarketSummaryResponse{ + SymbolDenom: token.SymbolDenom, + Exponent: token.Exponent, + UTokenExchangeRate: rate, + Lend_APY: lendAPY, + Borrow_APY: borrowAPY, + MarketSize: marketSizeCoin.Amount, + AvailableBorrow: availableBorrow, + Reserved: reserved, + } + + if oraclePrice, oracleErr := q.Keeper.TokenPrice(ctx, req.Denom); oracleErr == nil { + resp.OraclePrice = &oraclePrice + } + + return &resp, nil +} diff --git a/x/leverage/spec/03_queries.md b/x/leverage/spec/03_queries.md index 9cd785fb17..01ae91f9ba 100644 --- a/x/leverage/spec/03_queries.md +++ b/x/leverage/spec/03_queries.md @@ -14,6 +14,7 @@ Queries on accepted asset types: - **Exchange Rate** queries the [uToken Exchange Rate](01_concepts.md#uToken-Exchange-Rate) of a given uToken denomination. - **Market Size** queries the [Market Size](01_concepts.md#Market-Size) of a specified denomination. - **Token Market Size** queries the [Market Size](01_concepts.md#Market-Size) of a specified denomination, but denominated in base tokens instead of USD. This amounts to _total loaned by all lenders + interest accrued._ +- **Market Summary** combines several asset-specifying queries for more efficient frontend access. Queries on account addresses: - **Borrowed** queries for the amount of a given token denomination borrowed by a user. If a denomination is not supplied, the total for each borrowed token is returned. diff --git a/x/leverage/types/query.pb.go b/x/leverage/types/query.pb.go index 1da4d5527e..2ec9898ec5 100644 --- a/x/leverage/types/query.pb.go +++ b/x/leverage/types/query.pb.go @@ -1719,6 +1719,113 @@ func (m *QueryLiquidationTargetsResponse) GetTargets() []string { return nil } +// QueryMarketSummaryRequest defines the request structure for the +// MarketSummary gRPC service handler. +type QueryMarketSummaryRequest struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (m *QueryMarketSummaryRequest) Reset() { *m = QueryMarketSummaryRequest{} } +func (m *QueryMarketSummaryRequest) String() string { return proto.CompactTextString(m) } +func (*QueryMarketSummaryRequest) ProtoMessage() {} +func (*QueryMarketSummaryRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_32bddfd5abbfa4dc, []int{38} +} +func (m *QueryMarketSummaryRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryMarketSummaryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryMarketSummaryRequest.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 *QueryMarketSummaryRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryMarketSummaryRequest.Merge(m, src) +} +func (m *QueryMarketSummaryRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryMarketSummaryRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryMarketSummaryRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryMarketSummaryRequest proto.InternalMessageInfo + +func (m *QueryMarketSummaryRequest) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +// QueryMarketSummaryResponse defines the response structure for the +// MarketSummary gRPC service handler. +type QueryMarketSummaryResponse struct { + SymbolDenom string `protobuf:"bytes,1,opt,name=symbol_denom,json=symbolDenom,proto3" json:"symbol_denom,omitempty"` + Exponent uint32 `protobuf:"varint,2,opt,name=exponent,proto3" json:"exponent,omitempty"` + OraclePrice *github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=oracle_price,json=oraclePrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"oracle_price,omitempty"` + UTokenExchangeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=uToken_exchange_rate,json=uTokenExchangeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"uToken_exchange_rate"` + Lend_APY github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=lend_APY,json=lendAPY,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"lend_APY"` + Borrow_APY github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=borrow_APY,json=borrowAPY,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"borrow_APY"` + MarketSize github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=market_size,json=marketSize,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"market_size"` + AvailableBorrow github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,8,opt,name=available_borrow,json=availableBorrow,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"available_borrow"` + Reserved github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,9,opt,name=reserved,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"reserved"` +} + +func (m *QueryMarketSummaryResponse) Reset() { *m = QueryMarketSummaryResponse{} } +func (m *QueryMarketSummaryResponse) String() string { return proto.CompactTextString(m) } +func (*QueryMarketSummaryResponse) ProtoMessage() {} +func (*QueryMarketSummaryResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_32bddfd5abbfa4dc, []int{39} +} +func (m *QueryMarketSummaryResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryMarketSummaryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryMarketSummaryResponse.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 *QueryMarketSummaryResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryMarketSummaryResponse.Merge(m, src) +} +func (m *QueryMarketSummaryResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryMarketSummaryResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryMarketSummaryResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryMarketSummaryResponse proto.InternalMessageInfo + +func (m *QueryMarketSummaryResponse) GetSymbolDenom() string { + if m != nil { + return m.SymbolDenom + } + return "" +} + +func (m *QueryMarketSummaryResponse) GetExponent() uint32 { + if m != nil { + return m.Exponent + } + return 0 +} + func init() { proto.RegisterType((*QueryRegisteredTokens)(nil), "umeenetwork.umee.leverage.v1beta1.QueryRegisteredTokens") proto.RegisterType((*QueryAvailableBorrowRequest)(nil), "umeenetwork.umee.leverage.v1beta1.QueryAvailableBorrowRequest") @@ -1758,106 +1865,119 @@ func init() { proto.RegisterType((*QueryLiquidationLimitResponse)(nil), "umeenetwork.umee.leverage.v1beta1.QueryLiquidationLimitResponse") proto.RegisterType((*QueryLiquidationTargetsRequest)(nil), "umeenetwork.umee.leverage.v1beta1.QueryLiquidationTargetsRequest") proto.RegisterType((*QueryLiquidationTargetsResponse)(nil), "umeenetwork.umee.leverage.v1beta1.QueryLiquidationTargetsResponse") + proto.RegisterType((*QueryMarketSummaryRequest)(nil), "umeenetwork.umee.leverage.v1beta1.QueryMarketSummaryRequest") + proto.RegisterType((*QueryMarketSummaryResponse)(nil), "umeenetwork.umee.leverage.v1beta1.QueryMarketSummaryResponse") } func init() { proto.RegisterFile("umee/leverage/v1beta1/query.proto", fileDescriptor_32bddfd5abbfa4dc) } var fileDescriptor_32bddfd5abbfa4dc = []byte{ - // 1490 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0xcf, 0x6f, 0xd4, 0xd6, - 0x13, 0x8f, 0xe1, 0x4b, 0x08, 0x13, 0xf8, 0x26, 0xbc, 0xa6, 0x25, 0x18, 0xd8, 0x80, 0xf9, 0x95, - 0x00, 0x59, 0x27, 0x41, 0x2d, 0x14, 0x68, 0x4b, 0x02, 0xa5, 0x85, 0x06, 0x01, 0xcb, 0x0f, 0x15, - 0x2a, 0x75, 0xe5, 0x5d, 0xbf, 0x2e, 0x56, 0xbc, 0xf6, 0xc6, 0xf6, 0x06, 0x82, 0x7a, 0xa8, 0x7a, - 0xe8, 0xb9, 0x52, 0xef, 0xbd, 0x54, 0xea, 0xa1, 0x95, 0xda, 0x43, 0x0f, 0x3d, 0xf4, 0x52, 0xa9, - 0x95, 0x8a, 0xc4, 0xa1, 0x48, 0xbd, 0x54, 0x3d, 0xd0, 0x0a, 0xfa, 0x87, 0x54, 0x7e, 0x6f, 0xfc, - 0x6b, 0x6d, 0xc7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xb9, 0x87, 0x01, 0x94, 0x00, 0x45, 0x01, - 0xc4, 0x93, 0x68, 0xdd, 0xf4, 0xd7, 0xcb, 0x06, 0x50, 0x23, 0x12, 0xad, 0x9c, 0xc4, 0xbc, 0xb9, - 0x68, 0x2c, 0x77, 0x0d, 0x9d, 0x95, 0xdf, 0x82, 0x44, 0x3f, 0x46, 0x0f, 0x4f, 0x23, 0x91, 0xed, - 0x07, 0xb0, 0xdd, 0x8c, 0xde, 0xf5, 0x45, 0x79, 0xd4, 0xec, 0x51, 0xa2, 0xec, 0xc5, 0x70, 0x88, - 0x69, 0xbf, 0xa1, 0x39, 0x2d, 0xea, 0x85, 0xd5, 0xc4, 0x69, 0x98, 0xc8, 0xdd, 0x11, 0x45, 0x8c, - 0xc7, 0x97, 0x98, 0xbb, 0x6e, 0xa9, 0x05, 0x8f, 0x73, 0x8f, 0x76, 0xc1, 0x26, 0x86, 0x26, 0x3f, - 0x4b, 0x30, 0xda, 0x5b, 0x13, 0x91, 0x93, 0x02, 0x25, 0x48, 0x66, 0x35, 0x25, 0x9f, 0x2d, 0x8b, - 0x0c, 0x48, 0x2b, 0x33, 0x9f, 0xfe, 0xf1, 0xef, 0x17, 0x1b, 0x8e, 0x90, 0x49, 0x35, 0xbb, 0x3d, - 0x72, 0x42, 0x60, 0xdd, 0xe3, 0x6c, 0xbf, 0x94, 0x60, 0x90, 0x17, 0x44, 0xe4, 0x55, 0x51, 0xf5, - 0x89, 0xca, 0x4c, 0x7e, 0x6d, 0xbd, 0x30, 0xe4, 0x7a, 0x90, 0x71, 0x9d, 0x20, 0x7b, 0x72, 0xb8, - 0xf2, 0xc2, 0x8c, 0x7c, 0x2d, 0xc1, 0x50, 0x50, 0x7c, 0x90, 0x13, 0xa2, 0xba, 0x7a, 0xca, 0x38, - 0xf9, 0xe4, 0xfa, 0x81, 0x48, 0xf3, 0x30, 0xa3, 0xb9, 0x8f, 0x4c, 0xe4, 0xd0, 0x0c, 0x2a, 0x17, - 0xf2, 0x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ed, - 0x6d, 0x85, 0x88, 0xf0, 0x67, 0xcf, 0x69, 0xbf, 0xc4, 0xdb, 0x85, 0xbc, 0x2e, 0xac, 0x30, 0x79, - 0xa6, 0x5a, 0x34, 0xf2, 0xbb, 0x04, 0x24, 0xdd, 0x34, 0x91, 0xf9, 0x12, 0x54, 0x92, 0x2d, 0x99, - 0xbc, 0xd0, 0x8f, 0x08, 0xb4, 0x67, 0x8e, 0xd9, 0x73, 0x8c, 0x1c, 0x11, 0xb0, 0x07, 0xbb, 0xb9, - 0x85, 0x4b, 0x0f, 0x9f, 0x56, 0xa4, 0xc7, 0x4f, 0x2b, 0xd2, 0x3f, 0x4f, 0x2b, 0xd2, 0xe7, 0xcf, - 0x2a, 0x03, 0x8f, 0x9f, 0x55, 0x06, 0xfe, 0x7c, 0x56, 0x19, 0xb8, 0x33, 0x13, 0x6b, 0x40, 0x7d, - 0x79, 0xd3, 0x48, 0x8e, 0x0b, 0x5f, 0x99, 0x53, 0xef, 0x47, 0x1a, 0x58, 0x3b, 0xda, 0x18, 0x64, - 0xff, 0x3f, 0x3a, 0xfe, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x89, 0xe9, 0x8f, 0x3b, 0x01, 0x1b, - 0x00, 0x00, + // 1679 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0xcd, 0x6f, 0x1b, 0x55, + 0x10, 0xcf, 0xb6, 0x4d, 0xe2, 0x4c, 0x12, 0x92, 0x3e, 0x02, 0x75, 0x97, 0xd6, 0x49, 0xb6, 0x5f, + 0x49, 0xdb, 0xd8, 0x49, 0x2a, 0x68, 0x69, 0x0b, 0x34, 0x69, 0x29, 0xb4, 0xa4, 0x6a, 0xea, 0x7e, + 0x88, 0x16, 0x89, 0x65, 0x6d, 0x3f, 0xdc, 0x55, 0xd6, 0xbb, 0xce, 0xee, 0x3a, 0x6d, 0x2a, 0x0e, + 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78, 0xe5, 0x12, 0x46, 0xc5, 0x59, 0xcb, 0x30, 0x34, 0x97, 0xda, 0x9a, + 0xd1, 0x93, 0x0d, 0x9b, 0x18, 0x2f, 0x6d, 0x70, 0x68, 0xc5, 0x4d, 0x18, 0x2f, 0xfb, 0xaf, 0x7a, + 0xb2, 0x63, 0xac, 0x1c, 0x55, 0xa1, 0x9c, 0x43, 0x67, 0x5e, 0xb1, 0x34, 0x33, 0xbd, 0x53, 0xdd, + 0x6b, 0xe6, 0x53, 0x44, 0x41, 0xde, 0x65, 0x18, 0x30, 0xd8, 0xca, 0xd3, 0xf0, 0x27, 0x84, 0x56, + 0x2e, 0x60, 0x52, 0xe4, 0xba, 0x7b, 0x3a, 0x87, 0x1a, 0x64, 0xdb, 0xa1, 0xd0, 0x96, 0x2b, 0x30, + 0xc2, 0x15, 0xf6, 0xb4, 0xff, 0xc3, 0x46, 0x00, 0xad, 0x2c, 0x60, 0x1c, 0x14, 0xa9, 0x43, 0xed, + 0x0d, 0xba, 0xc4, 0xae, 0xc9, 0xad, 0x33, 0x6b, 0x05, 0xbd, 0xbd, 0x45, 0xe4, 0x09, 0xdf, 0xd4, + 0x97, 0x31, 0x9d, 0x06, 0xfe, 0x78, 0x95, 0xba, 0xae, 0x6e, 0x56, 0xd3, 0x6e, 0xec, 0x49, 0xc8, + 0x25, 0x01, 0x22, 0xf5, 0x2c, 0x0c, 0x52, 0xd3, 0x2b, 0x3e, 0xf8, 0xbd, 0x95, 0x29, 0x36, 0x1f, + 0x95, 0x37, 0xf1, 0x92, 0x0c, 0x64, 0xd3, 0xb2, 0xf8, 0x44, 0x42, 0x57, 0x09, 0x43, 0xa1, 0xfe, + 0x35, 0x80, 0x20, 0x34, 0x9e, 0x86, 0xbb, 0x86, 0xe0, 0x95, 0x79, 0xf4, 0xb3, 0xd7, 0xef, 0x96, + 0x6f, 0x6b, 0x66, 0x95, 0x16, 0x35, 0xb7, 0xc3, 0x8d, 0x5a, 0x47, 0x57, 0x89, 0x4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0x56, 0x01, 0xe1, 0x19, 0x03, 0xf9, 0x4d, 0x82, 0xf1, 0xd6, 0x16, + 0x9f, 0x08, 0x1f, 0x7b, 0xc2, 0x58, 0x41, 0xbc, 0x5d, 0x48, 0x9a, 0x2e, 0x74, 0x4c, 0x9e, 0x6d, + 0xa3, 0x07, 0xf2, 0x87, 0x04, 0xa4, 0x7d, 0x18, 0x40, 0x96, 0x52, 0x50, 0x89, 0x8e, 0x1a, 0xe4, + 0xe5, 0x5e, 0x20, 0xd0, 0x9e, 0x45, 0x66, 0xcf, 0x51, 0x72, 0x58, 0xc0, 0x1e, 0x9c, 0x52, 0x90, + 0x1f, 0x24, 0x18, 0x8d, 0x4c, 0x1b, 0xc4, 0xaf, 0x83, 0xb8, 0xc1, 0x86, 0xf8, 0x75, 0x10, 0x3b, + 0xe2, 0x50, 0x66, 0x98, 0x09, 0x0a, 0x99, 0x6a, 0x33, 0xc1, 0xbf, 0x8b, 0xb9, 0xc4, 0xf2, 0xc5, + 0xfb, 0x8f, 0x72, 0xd2, 0x83, 0x47, 0x39, 0xe9, 0xdf, 0x47, 0x39, 0xe9, 0xd3, 0xc7, 0xb9, 0xbe, + 0x07, 0x8f, 0x73, 0x7d, 0x7f, 0x3d, 0xce, 0xf5, 0xdd, 0x9a, 0x0f, 0xb5, 0xb4, 0x1e, 0xca, 0x1c, + 0xb2, 0xe1, 0x90, 0x1b, 0x8b, 0x85, 0xbb, 0x01, 0x2e, 0x6b, 0x70, 0x4b, 0x03, 0xec, 0x1f, 0xba, + 0xc7, 0xfe, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x5e, 0x58, 0x2f, 0x28, 0x92, 0x1e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1926,6 +2046,8 @@ type QueryClient interface { LiquidationLimit(ctx context.Context, in *QueryLiquidationLimitRequest, opts ...grpc.CallOption) (*QueryLiquidationLimitResponse, error) // LiquidationTargets queries a list of all borrower addresses eligible for liquidation. LiquidationTargets(ctx context.Context, in *QueryLiquidationTargetsRequest, opts ...grpc.CallOption) (*QueryLiquidationTargetsResponse, error) + // MarketSummary queries a base asset's current borrowing and lending conditions. + MarketSummary(ctx context.Context, in *QueryMarketSummaryRequest, opts ...grpc.CallOption) (*QueryMarketSummaryResponse, error) } type queryClient struct { @@ -2107,6 +2229,15 @@ func (c *queryClient) LiquidationTargets(ctx context.Context, in *QueryLiquidati return out, nil } +func (c *queryClient) MarketSummary(ctx context.Context, in *QueryMarketSummaryRequest, opts ...grpc.CallOption) (*QueryMarketSummaryResponse, error) { + out := new(QueryMarketSummaryResponse) + err := c.cc.Invoke(ctx, "/umeenetwork.umee.leverage.v1beta1.Query/MarketSummary", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // RegisteredTokens queries for all the registered tokens. @@ -2163,6 +2294,8 @@ type QueryServer interface { LiquidationLimit(context.Context, *QueryLiquidationLimitRequest) (*QueryLiquidationLimitResponse, error) // LiquidationTargets queries a list of all borrower addresses eligible for liquidation. LiquidationTargets(context.Context, *QueryLiquidationTargetsRequest) (*QueryLiquidationTargetsResponse, error) + // MarketSummary queries a base asset's current borrowing and lending conditions. + MarketSummary(context.Context, *QueryMarketSummaryRequest) (*QueryMarketSummaryResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -2226,6 +2359,9 @@ func (*UnimplementedQueryServer) LiquidationLimit(ctx context.Context, req *Quer func (*UnimplementedQueryServer) LiquidationTargets(ctx context.Context, req *QueryLiquidationTargetsRequest) (*QueryLiquidationTargetsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method LiquidationTargets not implemented") } +func (*UnimplementedQueryServer) MarketSummary(ctx context.Context, req *QueryMarketSummaryRequest) (*QueryMarketSummaryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MarketSummary not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -2573,6 +2709,24 @@ func _Query_LiquidationTargets_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _Query_MarketSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryMarketSummaryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).MarketSummary(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umeenetwork.umee.leverage.v1beta1.Query/MarketSummary", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).MarketSummary(ctx, req.(*QueryMarketSummaryRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "umeenetwork.umee.leverage.v1beta1.Query", HandlerType: (*QueryServer)(nil), @@ -2653,6 +2807,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "LiquidationTargets", Handler: _Query_LiquidationTargets_Handler, }, + { + MethodName: "MarketSummary", + Handler: _Query_MarketSummary_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "umee/leverage/v1beta1/query.proto", @@ -3898,6 +4056,143 @@ func (m *QueryLiquidationTargetsResponse) MarshalToSizedBuffer(dAtA []byte) (int return len(dAtA) - i, nil } +func (m *QueryMarketSummaryRequest) 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 *QueryMarketSummaryRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMarketSummaryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryMarketSummaryResponse) 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 *QueryMarketSummaryResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMarketSummaryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Reserved.Size() + i -= size + if _, err := m.Reserved.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + { + size := m.AvailableBorrow.Size() + i -= size + if _, err := m.AvailableBorrow.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + { + size := m.MarketSize.Size() + i -= size + if _, err := m.MarketSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + { + size := m.Borrow_APY.Size() + i -= size + if _, err := m.Borrow_APY.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size := m.Lend_APY.Size() + i -= size + if _, err := m.Lend_APY.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size := m.UTokenExchangeRate.Size() + i -= size + if _, err := m.UTokenExchangeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if m.OraclePrice != nil { + { + size := m.OraclePrice.Size() + i -= size + if _, err := m.OraclePrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Exponent != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Exponent)) + i-- + dAtA[i] = 0x10 + } + if len(m.SymbolDenom) > 0 { + i -= len(m.SymbolDenom) + copy(dAtA[i:], m.SymbolDenom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SymbolDenom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -4402,6 +4697,51 @@ func (m *QueryLiquidationTargetsResponse) Size() (n int) { return n } +func (m *QueryMarketSummaryRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryMarketSummaryResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SymbolDenom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Exponent != 0 { + n += 1 + sovQuery(uint64(m.Exponent)) + } + if m.OraclePrice != nil { + l = m.OraclePrice.Size() + n += 1 + l + sovQuery(uint64(l)) + } + l = m.UTokenExchangeRate.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.Lend_APY.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.Borrow_APY.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.MarketSize.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.AvailableBorrow.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.Reserved.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -7673,6 +8013,429 @@ func (m *QueryLiquidationTargetsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryMarketSummaryRequest) 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: QueryMarketSummaryRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryMarketSummaryRequest: 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", 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 = 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 *QueryMarketSummaryResponse) 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: QueryMarketSummaryResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryMarketSummaryResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SymbolDenom", 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.SymbolDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Exponent", wireType) + } + m.Exponent = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Exponent |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OraclePrice", 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 + } + var v github_com_cosmos_cosmos_sdk_types.Dec + m.OraclePrice = &v + if err := m.OraclePrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UTokenExchangeRate", 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.UTokenExchangeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Lend_APY", 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.Lend_APY.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Borrow_APY", 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.Borrow_APY.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketSize", 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.MarketSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AvailableBorrow", 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.AvailableBorrow.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reserved", 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.Reserved.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/leverage/types/query.pb.gw.go b/x/leverage/types/query.pb.gw.go index 9379fc7d13..1a1291eac8 100644 --- a/x/leverage/types/query.pb.gw.go +++ b/x/leverage/types/query.pb.gw.go @@ -20,7 +20,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,7 +30,6 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage -var _ = metadata.Join func request_Query_RegisteredTokens_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryRegisteredTokens @@ -663,17 +661,51 @@ func local_request_Query_LiquidationTargets_0(ctx context.Context, marshaler run } +var ( + filter_Query_MarketSummary_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_MarketSummary_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryMarketSummaryRequest + 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_MarketSummary_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.MarketSummary(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_MarketSummary_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryMarketSummaryRequest + 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_MarketSummary_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.MarketSummary(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. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_RegisteredTokens_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 { @@ -681,7 +713,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_RegisteredTokens_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) @@ -695,8 +726,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Params_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 { @@ -704,7 +733,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Params_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) @@ -718,8 +746,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Borrowed_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 { @@ -727,7 +753,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Borrowed_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) @@ -741,8 +766,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_BorrowedValue_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 { @@ -750,7 +773,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_BorrowedValue_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) @@ -764,8 +786,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Loaned_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 { @@ -773,7 +793,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Loaned_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) @@ -787,8 +806,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_LoanedValue_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 { @@ -796,7 +813,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_LoanedValue_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) @@ -810,8 +826,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_AvailableBorrow_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 { @@ -819,7 +833,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_AvailableBorrow_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) @@ -833,8 +846,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_BorrowAPY_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 { @@ -842,7 +853,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_BorrowAPY_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) @@ -856,8 +866,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_LendAPY_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 { @@ -865,7 +873,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_LendAPY_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) @@ -879,8 +886,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_MarketSize_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 { @@ -888,7 +893,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_MarketSize_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) @@ -902,8 +906,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_TokenMarketSize_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 { @@ -911,7 +913,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_TokenMarketSize_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) @@ -925,8 +926,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_ReserveAmount_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 { @@ -934,7 +933,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_ReserveAmount_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) @@ -948,8 +946,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_CollateralSetting_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 { @@ -957,7 +953,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_CollateralSetting_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) @@ -971,8 +966,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Collateral_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 { @@ -980,7 +973,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Collateral_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) @@ -994,8 +986,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_CollateralValue_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 { @@ -1003,7 +993,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_CollateralValue_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) @@ -1017,8 +1006,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_ExchangeRate_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 { @@ -1026,7 +1013,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_ExchangeRate_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) @@ -1040,8 +1026,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_BorrowLimit_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 { @@ -1049,7 +1033,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_BorrowLimit_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) @@ -1063,8 +1046,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_LiquidationLimit_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 { @@ -1072,7 +1053,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_LiquidationLimit_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) @@ -1086,8 +1066,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_LiquidationTargets_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 { @@ -1095,7 +1073,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_LiquidationTargets_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) @@ -1106,6 +1083,26 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_MarketSummary_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.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_MarketSummary_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_MarketSummary_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1527,6 +1524,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_MarketSummary_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_MarketSummary_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_MarketSummary_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1568,6 +1585,8 @@ var ( pattern_Query_LiquidationLimit_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "leverage", "v1beta1", "liquidation_limit"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_LiquidationTargets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "leverage", "v1beta1", "liquidation_targets"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_MarketSummary_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "leverage", "v1", "market_summary"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -1608,4 +1627,6 @@ var ( forward_Query_LiquidationLimit_0 = runtime.ForwardResponseMessage forward_Query_LiquidationTargets_0 = runtime.ForwardResponseMessage + + forward_Query_MarketSummary_0 = runtime.ForwardResponseMessage )