From 5fda96c0004eb2e4bc9aba4ea9ded1ad03985cbd Mon Sep 17 00:00:00 2001 From: cryptokage <26vivek06@gmail.com> Date: Fri, 28 Jun 2024 00:04:08 +0530 Subject: [PATCH] feat: leverageLp amm info (#632) --- proto/elys/amm/types.proto | 1 + .../client/wasm/query_earn_mining_pool_all.go | 3 + x/amm/types/types.pb.go | 140 ++++++++++++------ 3 files changed, 96 insertions(+), 48 deletions(-) diff --git a/proto/elys/amm/types.proto b/proto/elys/amm/types.proto index 3dd2f643d..323475d2c 100644 --- a/proto/elys/amm/types.proto +++ b/proto/elys/amm/types.proto @@ -41,6 +41,7 @@ message EarnPool { string swap_fee = 13 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; string fee_denom = 14; bool use_oracle = 15; + bool is_leveragelp = 16; } message QueryEarnPoolResponse { diff --git a/x/amm/client/wasm/query_earn_mining_pool_all.go b/x/amm/client/wasm/query_earn_mining_pool_all.go index e58223da1..80c3891fa 100644 --- a/x/amm/client/wasm/query_earn_mining_pool_all.go +++ b/x/amm/client/wasm/query_earn_mining_pool_all.go @@ -61,6 +61,7 @@ func (oq *Querier) generateEarnPool(ctx sdk.Context, ammPool *types.Pool, filter borrowApr := sdk.ZeroDec() leverageLpPercent := sdk.ZeroDec() perpetualPercent := sdk.ZeroDec() + isLeverageLpEnabled := false poolInfo, found := oq.masterchefKeeper.GetPool(ctx, ammPool.PoolId) if found { @@ -82,6 +83,7 @@ func (oq *Querier) generateEarnPool(ctx sdk.Context, ammPool *types.Pool, filter leverageLpPool, found := oq.leveragelpKeeper.GetPool(ctx, ammPool.PoolId) if found { + isLeverageLpEnabled = true leverageLpPercent = leverageLpPool.LeveragedLpAmount.ToLegacyDec().Quo(ammPool.TotalShares.Amount.ToLegacyDec()).Mul(sdk.NewDec(100)) } @@ -106,6 +108,7 @@ func (oq *Querier) generateEarnPool(ctx sdk.Context, ammPool *types.Pool, filter SwapFee: ammPool.PoolParams.SwapFee, FeeDenom: ammPool.PoolParams.FeeDenom, UseOracle: ammPool.PoolParams.UseOracle, + IsLeveragelp: isLeverageLpEnabled, } } diff --git a/x/amm/types/types.pb.go b/x/amm/types/types.pb.go index 668fe65f1..9c4db81f8 100644 --- a/x/amm/types/types.pb.go +++ b/x/amm/types/types.pb.go @@ -136,6 +136,7 @@ type EarnPool struct { SwapFee github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,13,opt,name=swap_fee,json=swapFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"swap_fee"` FeeDenom string `protobuf:"bytes,14,opt,name=fee_denom,json=feeDenom,proto3" json:"fee_denom,omitempty"` UseOracle bool `protobuf:"varint,15,opt,name=use_oracle,json=useOracle,proto3" json:"use_oracle,omitempty"` + IsLeveragelp bool `protobuf:"varint,16,opt,name=is_leveragelp,json=isLeveragelp,proto3" json:"is_leveragelp,omitempty"` } func (m *EarnPool) Reset() { *m = EarnPool{} } @@ -213,6 +214,13 @@ func (m *EarnPool) GetUseOracle() bool { return false } +func (m *EarnPool) GetIsLeveragelp() bool { + if m != nil { + return m.IsLeveragelp + } + return false +} + type QueryEarnPoolResponse struct { Pools []EarnPool `protobuf:"bytes,1,rep,name=pools,proto3" json:"pools"` } @@ -267,54 +275,55 @@ func init() { func init() { proto.RegisterFile("elys/amm/types.proto", fileDescriptor_5382be80734a352d) } var fileDescriptor_5382be80734a352d = []byte{ - // 749 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0x41, 0x6f, 0xe3, 0x44, - 0x14, 0xc7, 0xe3, 0x26, 0xdb, 0xda, 0xcf, 0xdd, 0x6c, 0x98, 0x66, 0xb5, 0xd3, 0x45, 0xa4, 0x51, - 0x0f, 0x4b, 0xb4, 0xd2, 0xda, 0x34, 0x88, 0x3b, 0x0d, 0x25, 0x68, 0xa5, 0xa2, 0x06, 0x53, 0x84, - 0xc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x43, 0xc1, 0xd0, 0x06, 0x2f, 0x97, 0x02, 0x23, 0x98, 0xde, - 0x7f, 0x93, 0x21, 0xc0, 0x5a, 0x39, 0xad, 0x77, 0x9d, 0x9e, 0xdf, 0x7f, 0x11, 0x94, 0xfa, 0x02, - 0xa3, 0x2f, 0xb0, 0xdb, 0x0c, 0x2a, 0x95, 0xc1, 0x88, 0xcd, 0xb0, 0x52, 0x13, 0x6d, 0x64, 0x1e, - 0xff, 0xec, 0x82, 0xbb, 0x52, 0x4b, 0x9e, 0xc1, 0x5e, 0x25, 0x93, 0x3a, 0x5d, 0xa7, 0xd7, 0x88, - 0x76, 0x4b, 0x95, 0xe4, 0x04, 0x76, 0xed, 0x39, 0x28, 0xba, 0xd3, 0xad, 0xf7, 0xfc, 0xfe, 0xc1, - 0x5a, 0x9f, 0x49, 0x3c, 0x35, 0xb1, 0x41, 0xe3, 0xdd, 0x87, 0xa3, 0x5a, 0x54, 0x2d, 0x24, 0x9f, - 0x00, 0x58, 0x96, 0x34, 0x75, 0xac, 0x40, 0x2f, 0xf2, 0x8c, 0x27, 0x32, 0x0e, 0x72, 0x01, 0xbe, - 0xc4, 0x05, 0x93, 0x89, 0x8a, 0x99, 0x90, 0xb4, 0x61, 0xe2, 0x83, 0xc0, 0x10, 0xfe, 0xf8, 0x70, - 0xf4, 0x62, 0x96, 0xea, 0xab, 0xf9, 0x38, 0x98, 0xf0, 0x3c, 0xac, 0x8e, 0xbc, 0xfc, 0x79, 0xa5, - 0x92, 0xeb, 0xea, 0xe2, 0xcf, 0x70, 0x12, 0x41, 0x85, 0x38, 0x15, 0x92, 0x7c, 0x0b, 0x30, 0xe6, - 0x52, 0xf2, 0x85, 0xe5, 0x3d, 0xda, 0x8a, 0xe7, 0x95, 0x04, 0x83, 0xbb, 0x00, 0x3f, 0xc3, 0x1b, - 0x94, 0x6c, 0x86, 0x71, 0x26, 0xe8, 0xee, 0x76, 0xfa, 0x56, 0x88, 0x73, 0x41, 0xce, 0xc1, 0x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x0d, 0x3c, 0xfd, 0xd7, 0xbb, 0xa5, 0x04, 0x2f, 0x14, 0x92, 0x00, - 0x1e, 0x99, 0x99, 0x2d, 0x5f, 0x2d, 0xbf, 0x4f, 0xd6, 0x73, 0xbf, 0x5a, 0x5a, 0x8d, 0x7d, 0xb9, - 0xec, 0xa5, 0x06, 0x58, 0x3f, 0x58, 0xe4, 0x31, 0x78, 0xa5, 0x75, 0x9a, 0x65, 0xad, 0x1a, 0x39, - 0x80, 0x27, 0xa5, 0x39, 0x5a, 0xf5, 0x71, 0xcb, 0x21, 0x4f, 0xe1, 0xa3, 0xd2, 0x39, 0x4c, 0xdf, - 0x62, 0xf2, 0x23, 0xa6, 0xb3, 0x2b, 0xdd, 0xda, 0x21, 0xcf, 0xe0, 0xa0, 0x74, 0x9f, 0x2d, 0x0b, - 0x96, 0xa7, 0x93, 0x2a, 0x50, 0x27, 0x04, 0x9a, 0x65, 0xe0, 0xbc, 0x9a, 0xad, 0x56, 0x63, 0x30, - 0x78, 0x77, 0xdb, 0x71, 0xde, 0xdf, 0x76, 0x9c, 0xbf, 0x6e, 0x3b, 0xce, 0x2f, 0x77, 0x9d, 0xda, - 0xfb, 0xbb, 0x4e, 0xed, 0xf7, 0xbb, 0x4e, 0xed, 0xa7, 0xcd, 0x2e, 0x30, 0xd2, 0x5f, 0x15, 0xa8, - 0x17, 0x5c, 0x5e, 0x5b, 0x23, 0x7c, 0xbb, 0xfe, 0x23, 0x19, 0xef, 0xda, 0x27, 0xfc, 0xf3, 0xbf, - 0x03, 0x00, 0x00, 0xff, 0xff, 0xb8, 0x8c, 0x07, 0xf8, 0x61, 0x06, 0x00, 0x00, + // 765 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0x51, 0x6f, 0xe3, 0x44, + 0x10, 0xc7, 0xe3, 0x26, 0xd7, 0xda, 0xe3, 0xb4, 0x17, 0xb6, 0x3d,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, 0xfc, + 0x13, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x16, 0xfd, 0xcb, 0x86, 0x06, 0x00, 0x00, } func (m *QueryEarnPoolRequest) Marshal() (dAtA []byte, err error) { @@ -395,6 +404,18 @@ func (m *EarnPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.IsLeveragelp { + i-- + if m.IsLeveragelp { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x80 + } if m.UseOracle { i-- if m.UseOracle { @@ -666,6 +687,9 @@ func (m *EarnPool) Size() (n int) { if m.UseOracle { n += 2 } + if m.IsLeveragelp { + n += 3 + } return n } @@ -1376,6 +1400,26 @@ func (m *EarnPool) Unmarshal(dAtA []byte) error { } } m.UseOracle = bool(v != 0) + case 16: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsLeveragelp", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsLeveragelp = bool(v != 0) default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:])