From 2dff66721ab84f3d20d40d280848bcb0e7413e94 Mon Sep 17 00:00:00 2001 From: Servio Zambrano Date: Fri, 20 Sep 2024 13:16:11 -0300 Subject: [PATCH] [Perpetual] net open interest was added (#804) * net open interest was added * test was fixed * logic was migrated to query * logic was migrated to query * logic was migrated to query * test was fixed --- proto/elys/perpetual/query.proto | 30 +- x/perpetual/client/cli/query_pool_test.go | 20 +- x/perpetual/keeper/get_net_open_interest.go | 23 + x/perpetual/keeper/pool_test.go | 21 + x/perpetual/keeper/query_pool.go | 30 +- x/perpetual/keeper/query_pool_test.go | 2 +- x/perpetual/types/query.pb.go | 811 +++++++++++++++++--- 7 files changed, 821 insertions(+), 116 deletions(-) create mode 100644 x/perpetual/keeper/get_net_open_interest.go diff --git a/proto/elys/perpetual/query.proto b/proto/elys/perpetual/query.proto index 8381fc07f..114404996 100644 --- a/proto/elys/perpetual/query.proto +++ b/proto/elys/perpetual/query.proto @@ -156,7 +156,7 @@ message QueryGetPoolRequest { } message QueryGetPoolResponse { - Pool pool = 1 [(gogoproto.nullable) = false]; + PoolResponse pool = 1 [(gogoproto.nullable) = false]; } message QueryAllPoolRequest { @@ -164,7 +164,7 @@ message QueryAllPoolRequest { } message QueryAllPoolResponse { - repeated Pool pool = 1 [(gogoproto.nullable) = false]; + repeated PoolResponse pool = 1 [(gogoproto.nullable) = false]; cosmos.base.query.v1beta1.PageResponse pagination = 2; } @@ -215,3 +215,29 @@ message QueryGetAllToPayResponse { repeated ToPay to_pay = 1; } +message PoolResponse { + uint64 amm_pool_id = 1; + string health = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + bool enabled = 3; + bool closed = 4; + string borrow_interest_rate = 5 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + repeated PoolAsset pool_assets_long = 6 [(gogoproto.nullable) = false]; + repeated PoolAsset pool_assets_short = 7 [(gogoproto.nullable) = false]; + int64 last_height_borrow_interest_rate_computed = 8; + // funding rate, if positive longs pay shorts, if negative shorts pay longs + string funding_rate = 9 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + string net_open_interest = 10 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; +} + diff --git a/x/perpetual/client/cli/query_pool_test.go b/x/perpetual/client/cli/query_pool_test.go index 6446bf7fd..b6192d793 100644 --- a/x/perpetual/client/cli/query_pool_test.go +++ b/x/perpetual/client/cli/query_pool_test.go @@ -10,6 +10,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/elys-network/elys/testutil/network" "github.com/elys-network/elys/testutil/nullify" "github.com/elys-network/elys/x/perpetual/client/cli" @@ -32,7 +33,22 @@ func networkWithPoolObjects(t *testing.T, n int) (*network.Network, []types.Pool } func TestShowPool(t *testing.T) { - net, objs := networkWithPoolObjects(t, 2) + net, objspool := networkWithPoolObjects(t, 2) + + objs := make([]types.PoolResponse, len(objspool)) + + for k, v := range objspool { + objs[k].AmmPoolId = v.AmmPoolId + objs[k].BorrowInterestRate = v.BorrowInterestRate + objs[k].Health = v.Health + objs[k].Closed = v.Closed + objs[k].Enabled = v.Enabled + objs[k].FundingRate = v.FundingRate + objs[k].LastHeightBorrowInterestRateComputed = v.LastHeightBorrowInterestRateComputed + objs[k].PoolAssetsLong = v.PoolAssetsLong + objs[k].PoolAssetsShort = v.PoolAssetsShort + objs[k].NetOpenInterest = sdk.ZeroInt() + } ctx := net.Validators[0].ClientCtx common := []string{ @@ -44,7 +60,7 @@ func TestShowPool(t *testing.T) { args []string err error - obj types.Pool + obj types.PoolResponse }{ { desc: "found", diff --git a/x/perpetual/keeper/get_net_open_interest.go b/x/perpetual/keeper/get_net_open_interest.go new file mode 100644 index 000000000..5e7e8a9cf --- /dev/null +++ b/x/perpetual/keeper/get_net_open_interest.go @@ -0,0 +1,23 @@ +package keeper + +import ( + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/elys-network/elys/x/perpetual/types" +) + +func (k Keeper) GetNetOpenInterest(pool types.Pool) math.Int { + assetLiabilitiesLong := sdk.ZeroInt() + assetLiabilitiesShort := sdk.ZeroInt() + + for _, asset := range pool.PoolAssetsLong { + assetLiabilitiesLong = assetLiabilitiesLong.Add(asset.Liabilities) + } + + for _, asset := range pool.PoolAssetsShort { + assetLiabilitiesShort = assetLiabilitiesShort.Add(asset.Liabilities) + } + + netOpenInterest := assetLiabilitiesLong.Sub(assetLiabilitiesShort) + return netOpenInterest +} diff --git a/x/perpetual/keeper/pool_test.go b/x/perpetual/keeper/pool_test.go index 51e999f30..706ed227e 100644 --- a/x/perpetual/keeper/pool_test.go +++ b/x/perpetual/keeper/pool_test.go @@ -21,6 +21,27 @@ func createNPool(keeper *keeper.Keeper, ctx sdk.Context, n int) []types.Pool { return items } +func createNPoolResponse(keeper *keeper.Keeper, ctx sdk.Context, n int) []types.PoolResponse { + items := make([]types.PoolResponse, n) + for i := range items { + items[i] = types.PoolResponse{ + AmmPoolId: uint64(i), + Health: sdk.NewDec(100), + Enabled: true, + Closed: false, + BorrowInterestRate: sdk.MustNewDecFromStr("0.000000000000000001"), + PoolAssetsLong: []types.PoolAsset{}, + PoolAssetsShort: []types.PoolAsset{}, + LastHeightBorrowInterestRateComputed: 0, + FundingRate: sdk.ZeroDec(), + NetOpenInterest: sdk.ZeroInt(), + } + + keeper.SetPool(ctx, types.NewPool(uint64(i))) + } + return items +} + func TestPoolGet(t *testing.T) { keeper, ctx := keepertest.PerpetualKeeper(t) items := createNPool(keeper, ctx, 10) diff --git a/x/perpetual/keeper/query_pool.go b/x/perpetual/keeper/query_pool.go index 5adf314cb..2016a1336 100644 --- a/x/perpetual/keeper/query_pool.go +++ b/x/perpetual/keeper/query_pool.go @@ -16,7 +16,7 @@ func (k Keeper) Pools(goCtx context.Context, req *types.QueryAllPoolRequest) (*t return nil, status.Error(codes.InvalidArgument, "invalid request") } - var pools []types.Pool + var pools []types.PoolResponse ctx := sdk.UnwrapSDKContext(goCtx) store := ctx.KVStore(k.storeKey) @@ -34,7 +34,18 @@ func (k Keeper) Pools(goCtx context.Context, req *types.QueryAllPoolRequest) (*t } if ammPool.PoolParams.UseOracle { - pools = append(pools, pool) + pools = append(pools, types.PoolResponse{ + AmmPoolId: pool.AmmPoolId, + Health: pool.Health, + Enabled: pool.Enabled, + Closed: pool.Closed, + BorrowInterestRate: pool.BorrowInterestRate, + PoolAssetsLong: pool.PoolAssetsLong, + PoolAssetsShort: pool.PoolAssetsShort, + LastHeightBorrowInterestRateComputed: pool.LastHeightBorrowInterestRateComputed, + FundingRate: pool.FundingRate, + NetOpenInterest: k.GetNetOpenInterest(pool), + }) } return nil @@ -60,5 +71,18 @@ func (k Keeper) Pool(goCtx context.Context, req *types.QueryGetPoolRequest) (*ty return nil, status.Error(codes.NotFound, "not found") } - return &types.QueryGetPoolResponse{Pool: val}, nil + pool := types.PoolResponse{ + AmmPoolId: val.AmmPoolId, + Health: val.Health, + Enabled: val.Enabled, + Closed: val.Closed, + BorrowInterestRate: val.BorrowInterestRate, + PoolAssetsLong: val.PoolAssetsLong, + PoolAssetsShort: val.PoolAssetsShort, + LastHeightBorrowInterestRateComputed: val.LastHeightBorrowInterestRateComputed, + FundingRate: val.FundingRate, + NetOpenInterest: k.GetNetOpenInterest(val), + } + + return &types.QueryGetPoolResponse{Pool: pool}, nil } diff --git a/x/perpetual/keeper/query_pool_test.go b/x/perpetual/keeper/query_pool_test.go index 5efe09307..f647e72d3 100644 --- a/x/perpetual/keeper/query_pool_test.go +++ b/x/perpetual/keeper/query_pool_test.go @@ -77,7 +77,7 @@ func TestPools_Success(t *testing.T) { func TestPoolQuerySingle(t *testing.T) { keeper, ctx := keepertest.PerpetualKeeper(t) wctx := sdk.WrapSDKContext(ctx) - msgs := createNPool(keeper, ctx, 2) + msgs := createNPoolResponse(keeper, ctx, 2) tests := []struct { desc string request *types.QueryGetPoolRequest diff --git a/x/perpetual/types/query.pb.go b/x/perpetual/types/query.pb.go index 7002c1c6f..98622d91a 100644 --- a/x/perpetual/types/query.pb.go +++ b/x/perpetual/types/query.pb.go @@ -744,7 +744,7 @@ func (m *QueryGetPoolRequest) GetIndex() uint64 { } type QueryGetPoolResponse struct { - Pool Pool `protobuf:"bytes,1,opt,name=pool,proto3" json:"pool"` + Pool PoolResponse `protobuf:"bytes,1,opt,name=pool,proto3" json:"pool"` } func (m *QueryGetPoolResponse) Reset() { *m = QueryGetPoolResponse{} } @@ -780,11 +780,11 @@ func (m *QueryGetPoolResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryGetPoolResponse proto.InternalMessageInfo -func (m *QueryGetPoolResponse) GetPool() Pool { +func (m *QueryGetPoolResponse) GetPool() PoolResponse { if m != nil { return m.Pool } - return Pool{} + return PoolResponse{} } type QueryAllPoolRequest struct { @@ -832,7 +832,7 @@ func (m *QueryAllPoolRequest) GetPagination() *query.PageRequest { } type QueryAllPoolResponse struct { - Pool []Pool `protobuf:"bytes,1,rep,name=pool,proto3" json:"pool"` + Pool []PoolResponse `protobuf:"bytes,1,rep,name=pool,proto3" json:"pool"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -869,7 +869,7 @@ func (m *QueryAllPoolResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryAllPoolResponse proto.InternalMessageInfo -func (m *QueryAllPoolResponse) GetPool() []Pool { +func (m *QueryAllPoolResponse) GetPool() []PoolResponse { if m != nil { return m.Pool } @@ -1234,6 +1234,95 @@ func (m *QueryGetAllToPayResponse) GetToPay() []*ToPay { return nil } +type PoolResponse struct { + AmmPoolId uint64 `protobuf:"varint,1,opt,name=amm_pool_id,json=ammPoolId,proto3" json:"amm_pool_id,omitempty"` + Health github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=health,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"health"` + Enabled bool `protobuf:"varint,3,opt,name=enabled,proto3" json:"enabled,omitempty"` + Closed bool `protobuf:"varint,4,opt,name=closed,proto3" json:"closed,omitempty"` + BorrowInterestRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=borrow_interest_rate,json=borrowInterestRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"borrow_interest_rate"` + PoolAssetsLong []PoolAsset `protobuf:"bytes,6,rep,name=pool_assets_long,json=poolAssetsLong,proto3" json:"pool_assets_long"` + PoolAssetsShort []PoolAsset `protobuf:"bytes,7,rep,name=pool_assets_short,json=poolAssetsShort,proto3" json:"pool_assets_short"` + LastHeightBorrowInterestRateComputed int64 `protobuf:"varint,8,opt,name=last_height_borrow_interest_rate_computed,json=lastHeightBorrowInterestRateComputed,proto3" json:"last_height_borrow_interest_rate_computed,omitempty"` + // funding rate, if positive longs pay shorts, if negative shorts pay longs + FundingRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,9,opt,name=funding_rate,json=fundingRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"funding_rate"` + NetOpenInterest github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,10,opt,name=net_open_interest,json=netOpenInterest,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"net_open_interest"` +} + +func (m *PoolResponse) Reset() { *m = PoolResponse{} } +func (m *PoolResponse) String() string { return proto.CompactTextString(m) } +func (*PoolResponse) ProtoMessage() {} +func (*PoolResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9a2c961615c1b7fe, []int{24} +} +func (m *PoolResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PoolResponse.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 *PoolResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_PoolResponse.Merge(m, src) +} +func (m *PoolResponse) XXX_Size() int { + return m.Size() +} +func (m *PoolResponse) XXX_DiscardUnknown() { + xxx_messageInfo_PoolResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_PoolResponse proto.InternalMessageInfo + +func (m *PoolResponse) GetAmmPoolId() uint64 { + if m != nil { + return m.AmmPoolId + } + return 0 +} + +func (m *PoolResponse) GetEnabled() bool { + if m != nil { + return m.Enabled + } + return false +} + +func (m *PoolResponse) GetClosed() bool { + if m != nil { + return m.Closed + } + return false +} + +func (m *PoolResponse) GetPoolAssetsLong() []PoolAsset { + if m != nil { + return m.PoolAssetsLong + } + return nil +} + +func (m *PoolResponse) GetPoolAssetsShort() []PoolAsset { + if m != nil { + return m.PoolAssetsShort + } + return nil +} + +func (m *PoolResponse) GetLastHeightBorrowInterestRateComputed() int64 { + if m != nil { + return m.LastHeightBorrowInterestRateComputed + } + return 0 +} + func init() { proto.RegisterType((*ParamsRequest)(nil), "elys.perpetual.ParamsRequest") proto.RegisterType((*ParamsResponse)(nil), "elys.perpetual.ParamsResponse") @@ -1259,113 +1348,125 @@ func init() { proto.RegisterType((*QueryOpenEstimationResponse)(nil), "elys.perpetual.QueryOpenEstimationResponse") proto.RegisterType((*QueryGetAllToPayRequest)(nil), "elys.perpetual.QueryGetAllToPayRequest") proto.RegisterType((*QueryGetAllToPayResponse)(nil), "elys.perpetual.QueryGetAllToPayResponse") + proto.RegisterType((*PoolResponse)(nil), "elys.perpetual.PoolResponse") } func init() { proto.RegisterFile("elys/perpetual/query.proto", fileDescriptor_9a2c961615c1b7fe) } var fileDescriptor_9a2c961615c1b7fe = []byte{ - // 1609 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0x5f, 0x6f, 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 0x84, 0x96, 0x10, - 0x08, 0xb2, 0x4c, 0x3b, 0xb7, 0x40, 0xf2, 0x58, 0x5a, 0x00, 0xfd, 0x1f, 0x66, 0x2c, 0xfa, 0xb8, - 0x4e, 0x4d, 0x59, 0xf9, 0x0a, 0x7b, 0x72, 0x20, 0xec, 0xe9, 0x08, 0x50, 0x00, 0xfe, 0x00, 0x52, - 0x24, 0xe8, 0x2a, 0x62, 0x1a, 0xae, 0x63, 0x65, 0x52, 0x6f, 0x0d, 0xbc, 0xe9, 0xf0, 0xf2, 0x64, - 0x13, 0xa4, 0xe4, 0x58, 0xa8, 0x00, 0xb3, 0x2d, 0xa0, 0x86, 0x49, 0x1c, 0x66, 0x67, 0xd2, 0xb2, - 0x31, 0x66, 0xa2, 0xa6, 0xb7, 0xc5, 0x04, 0x2a, 0xc1, 0x2c, 0xde, 0xc3, 0xd4, 0xc2, 0x15, 0x8b, - 0x18, 0x01, 0x45, 0xca, 0x1b, 0x99, 0xa9, 0xfe, 0xea, 0x0d, 0x35, 0x7d, 0xff, 0x1d, 0xba, 0x8a, - 0x52, 0xf1, 0x2d, 0xea, 0xba, 0xa2, 0xc1, 0xa7, 0x07, 0x2b, 0x95, 0xd0, 0x1f, 0xbd, 0x0f, 0x73, - 0xfb, 0x84, 0xd6, 0x1e, 0x71, 0xa3, 0x82, 0x2d, 0xec, 0x54, 0x89, 0xe1, 0x89, 0x04, 0x66, 0x66, - 0x06, 0xc2, 0x45, 0x01, 0xd6, 0x7a, 0x00, 0x55, 0x16, 0x48, 0x22, 0x42, 0x85, 0x79, 0x1e, 0xdb, - 0x37, 0xa8, 0xc3, 0x89, 0x47, 0x7c, 0x2e, 0x42, 0x90, 0x0c, 0x1a, 0x2c, 0x42, 0x80, 0xb5, 0xa9, - 0xa0, 0xca, 0x98, 0x13, 0x74, 0x1f, 0x26, 0x77, 0xea, 0x8e, 0x3c, 0xa4, 0x24, 0xf2, 0xec, 0x40, - 0xc8, 0x49, 0x85, 0x11, 0x42, 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12, 0x5d, - 0x8a, 0xc4, 0x7c, 0xc7, 0x39, 0x15, 0xfb, 0x86, 0x8c, 0xbd, 0x8c, 0x8a, 0xbd, 0x8a, 0x3a, 0x5a, - 0xc7, 0xd4, 0x3c, 0x40, 0xdf, 0x6a, 0x90, 0x6e, 0x15, 0x06, 0xf1, 0xce, 0xeb, 0x2e, 0xf6, 0xe2, - 0x9d, 0x77, 0x84, 0xd2, 0xd0, 0x57, 0x25, 0xc9, 0x02, 0xba, 0x76, 0x24, 0x49, 0xf1, 0x24, 0xcc, - 0x93, 0x43, 0x3a, 0xdf, 0x68, 0x90, 0x8c, 0xdc, 0x59, 0x68, 0xb1, 0x5b, 0x51, 0xb4, 0x5d, 0x78, - 0xd9, 0xcb, 0xbd, 0x0d, 0xdf, 0xaa, 0x94, 0x6b, 0x84, 0x1b, 0xd8, 0xb2, 0x8c, 0xe0, 0xa6, 0x5c, - 0xbf, 0xfb, 0xe2, 0x75, 0x4e, 0x7b, 0xf9, 0x3a, 0xa7, 0xfd, 0xf2, 0x3a, 0xa7, 0x7d, 0xf1, 0x26, - 0x37, 0xf4, 0xf2, 0x4d, 0x6e, 0xe8, 0xa7, 0x37, 0xb9, 0xa1, 0xed, 0x42, 0xe4, 0xe6, 0x8e, 0x03, - 0x3e, 0x69, 0xff, 0x83, 0xba, 0x32, 0x2e, 0xff, 0x66, 0xbe, 0xfe, 0x7b, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xae, 0xce, 0xc5, 0x54, 0x68, 0x17, 0x00, 0x00, + // 1786 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x59, 0xcd, 0x6f, 0x1b, 0xc7, + 0x15, 0xf7, 0x4a, 0x22, 0x2d, 0x3e, 0x7e, 0x48, 0x1c, 0x29, 0xce, 0x9a, 0x76, 0x99, 0x74, 0xfd, + 0x1d, 0x99, 0x64, 0xad, 0x08, 0x09, 0xda, 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5, 0x65, 0xe4, 0x2b, 0xec, 0xc2, 0x4c, 0xd8, 0xcb, 0x09, 0xa0, 0x08, 0x7c, + 0x17, 0x8a, 0x24, 0xca, 0x2a, 0x62, 0x5b, 0xbe, 0xe7, 0xe8, 0xc5, 0x73, 0x03, 0x6f, 0x7b, 0xdc, + 0x2c, 0xf4, 0x41, 0x9a, 0x9e, 0x83, 0xea, 0xb0, 0x32, 0x00, 0x6a, 0xd9, 0xc4, 0x63, 0xae, 0x5e, + 0x92, 0x89, 0x51, 0x4e, 0x8a, 0x3e, 0x16, 0x13, 0xa8, 0x09, 0x2b, 0xf8, 0x08, 0x53, 0x07, 0xb7, + 0x1c, 0x62, 0x45, 0x14, 0x29, 0xef, 0xe9, 0x4b, 0xd3, 0xc5, 0x1b, 0xea, 0xeb, 0x7e, 0x14, 0xab, + 0x8a, 0x50, 0x09, 0x1d, 0xea, 0xfb, 0x22, 0xc1, 0x97, 0x67, 0x0b, 0x95, 0x58, 0x1f, 0xfd, 0x04, + 0x56, 0x8f, 0x09, 0xed, 0x1c, 0x70, 0xab, 0x85, 0x1d, 0xec, 0xb5, 0x89, 0x15, 0x08, 0x07, 0xea, + 0xe5, 0x99, 0x70, 0x51, 0x84, 0xb5, 0x19, 0x41, 0x99, 0x02, 0x49, 0x58, 0x68, 0xb1, 0x20, 0x60, + 0xc7, 0x16, 0xf5, 0x38, 0x09, 0x48, 0xc8, 0x85, 0x09, 0xa2, 0xa3, 0xd9, 0x2c, 0x44, 0x58, 0xdb, + 0x0a, 0xca, 0xc4, 0x9c, 0xa0, 0x8f, 0xa1, 0xb0, 0xdf, 0xf5, 0xe4, 0x21, 0x25, 0x91, 0x57, 0x66, + 0x42, 0xce, 0x2b, 0x8c, 0x18, 0x52, 0x86, 0xa2, 0x45, 0x5d, 0x1f, 0xb7, 0xb9, 0xbe, 0x3a, 0x1b, + 0xa4, 0xc4, 0xd8, 0x96, 0x10, 0xc6, 0x55, 0x78, 0x33, 0xbe, 0x52, 0x3d, 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0x22, 0x9d, + 0x79, 0x67, 0x3c, 0x8b, 0x8d, 0x0d, 0x49, 0xb2, 0x8e, 0xee, 0x9f, 0x49, 0x52, 0x94, 0xac, 0x1a, + 0x39, 0xa5, 0xf3, 0x27, 0x0d, 0xf2, 0x89, 0x0b, 0x16, 0xba, 0x33, 0x2e, 0x28, 0x86, 0x6e, 0x67, + 0x95, 0xbb, 0x93, 0x05, 0xcf, 0x15, 0xca, 0x1d, 0xc2, 0x2d, 0xec, 0x38, 0x56, 0x74, 0xad, 0xdb, + 0x7c, 0xfa, 0xd9, 0xab, 0xaa, 0xf6, 0xf9, 0xab, 0xaa, 0xf6, 0x9f, 0x57, 0x55, 0xed, 0x77, 0xaf, + 0xab, 0x97, 0x3e, 0x7f, 0x5d, 0xbd, 0xf4, 0xaf, 0xd7, 0xd5, 0x4b, 0x7b, 0xf5, 0x44, 0x61, 0x4d, + 0x03, 0x7e, 0x3a, 0xfc, 0xeb, 0x4a, 0x2b, 0x2b, 0x7f, 0x23, 0x79, 0xf7, 0xff, 0x01, 0x00, 0x00, + 0xff, 0xff, 0x9a, 0xb5, 0x80, 0x8b, 0x25, 0x1a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2965,6 +3066,127 @@ func (m *QueryGetAllToPayResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } +func (m *PoolResponse) 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 *PoolResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.NetOpenInterest.Size() + i -= size + if _, err := m.NetOpenInterest.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + { + size := m.FundingRate.Size() + i -= size + if _, err := m.FundingRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + if m.LastHeightBorrowInterestRateComputed != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.LastHeightBorrowInterestRateComputed)) + i-- + dAtA[i] = 0x40 + } + if len(m.PoolAssetsShort) > 0 { + for iNdEx := len(m.PoolAssetsShort) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PoolAssetsShort[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if len(m.PoolAssetsLong) > 0 { + for iNdEx := len(m.PoolAssetsLong) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PoolAssetsLong[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + { + size := m.BorrowInterestRate.Size() + i -= size + if _, err := m.BorrowInterestRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if m.Closed { + i-- + if m.Closed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.Enabled { + i-- + if m.Enabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + { + size := m.Health.Size() + i -= size + if _, err := m.Health.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.AmmPoolId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.AmmPoolId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -3371,6 +3593,47 @@ func (m *QueryGetAllToPayResponse) Size() (n int) { return n } +func (m *PoolResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AmmPoolId != 0 { + n += 1 + sovQuery(uint64(m.AmmPoolId)) + } + l = m.Health.Size() + n += 1 + l + sovQuery(uint64(l)) + if m.Enabled { + n += 2 + } + if m.Closed { + n += 2 + } + l = m.BorrowInterestRate.Size() + n += 1 + l + sovQuery(uint64(l)) + if len(m.PoolAssetsLong) > 0 { + for _, e := range m.PoolAssetsLong { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.PoolAssetsShort) > 0 { + for _, e := range m.PoolAssetsShort { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.LastHeightBorrowInterestRateComputed != 0 { + n += 1 + sovQuery(uint64(m.LastHeightBorrowInterestRateComputed)) + } + l = m.FundingRate.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.NetOpenInterest.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -5001,7 +5264,7 @@ func (m *QueryAllPoolResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Pool = append(m.Pool, Pool{}) + m.Pool = append(m.Pool, PoolResponse{}) if err := m.Pool[len(m.Pool)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -6313,6 +6576,338 @@ func (m *QueryGetAllToPayResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *PoolResponse) 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: PoolResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PoolResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AmmPoolId", wireType) + } + m.AmmPoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AmmPoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Health", 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.Health.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Enabled = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Closed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Closed = bool(v != 0) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BorrowInterestRate", 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.BorrowInterestRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolAssetsLong", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PoolAssetsLong = append(m.PoolAssetsLong, PoolAsset{}) + if err := m.PoolAssetsLong[len(m.PoolAssetsLong)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolAssetsShort", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PoolAssetsShort = append(m.PoolAssetsShort, PoolAsset{}) + if err := m.PoolAssetsShort[len(m.PoolAssetsShort)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LastHeightBorrowInterestRateComputed", wireType) + } + m.LastHeightBorrowInterestRateComputed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LastHeightBorrowInterestRateComputed |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FundingRate", 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.FundingRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetOpenInterest", 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.NetOpenInterest.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