From 221ed1ff3df7dcd44d85b217a9bae37f4142deca Mon Sep 17 00:00:00 2001 From: jelysn <129082781+jelysn@users.noreply.github.com> Date: Fri, 21 Jun 2024 11:22:16 +0800 Subject: [PATCH] EdenApr and externalApr calculation forward looking (#604) * edenApr and externalApr calculation forward looking * fix GetDailyRewardsAmountForPool --- docs/static/openapi.yml | 24 +- proto/elys/masterchef/params.proto | 45 -- proto/elys/masterchef/pool.proto | 38 +- x/incentive/keeper/keeper.go | 2 +- x/masterchef/keeper/abci.go | 18 +- x/masterchef/keeper/params.go | 13 - x/masterchef/keeper/pool.go | 15 - x/masterchef/migrations/v2_migration.go | 28 - x/masterchef/types/params.go | 6 - x/masterchef/types/params.pb.go | 775 +----------------------- x/masterchef/types/pool.pb.go | 676 ++------------------- 11 files changed, 93 insertions(+), 1547 deletions(-) diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 247fff5b6..3ae12a7d6 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -42247,10 +42247,10 @@ paths: title: Eden APR, updated at every distribution dex_apr: type: string - title: Dex APR, updated at every distribution + title: Dex APR, updated based on 24hr accumulation gas_apr: type: string - title: Gas APR, updated at every distribution + title: Gas APR, updated based on 24hr accumulation external_incentive_apr: type: string title: External Incentive APR, updated at every distribution @@ -44842,7 +44842,7 @@ paths: type: string tags: - Query - /elys-network/elys/tier/leverage_lp_total/{user}/{realtime}: + /elys-network/elys/tier/leverage_lp_total/{user}: get: summary: Queries a list of LeverageLpTotal items. operationId: ElysTierLeverageLpTotal @@ -44851,6 +44851,9 @@ paths: description: A successful response. schema: type: object + properties: + total: + type: string default: description: An unexpected error response. schema: @@ -44874,10 +44877,6 @@ paths: in: path required: true type: string - - name: realtime - in: path - required: true - type: boolean tags: - Query /elys-network/elys/tokenomics/airdrop: @@ -87438,10 +87437,10 @@ definitions: title: Eden APR, updated at every distribution dex_apr: type: string - title: Dex APR, updated at every distribution + title: Dex APR, updated based on 24hr accumulation gas_apr: type: string - title: Gas APR, updated at every distribution + title: Gas APR, updated based on 24hr accumulation external_incentive_apr: type: string title: External Incentive APR, updated at every distribution @@ -87583,10 +87582,10 @@ definitions: title: Eden APR, updated at every distribution dex_apr: type: string - title: Dex APR, updated at every distribution + title: Dex APR, updated based on 24hr accumulation gas_apr: type: string - title: Gas APR, updated at every distribution + title: Gas APR, updated based on 24hr accumulation external_incentive_apr: type: string title: External Incentive APR, updated at every distribution @@ -89209,6 +89208,9 @@ definitions: type: string elys.tier.QueryLeverageLpTotalResponse: type: object + properties: + total: + type: string elys.tier.QueryParamsResponse: type: object properties: diff --git a/proto/elys/masterchef/params.proto b/proto/elys/masterchef/params.proto index 2febb1cd8..7cc6a58d0 100644 --- a/proto/elys/masterchef/params.proto +++ b/proto/elys/masterchef/params.proto @@ -43,48 +43,3 @@ message SupportedRewardDenom { (gogoproto.nullable) = false ]; } - -message LegacyDexRewardsTracker { - // Number of blocks since start of epoch (distribution epoch) - string num_blocks = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - // Accumulated amount at distribution epoch - recalculated at every - // distribution epoch - string amount = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// Params defines the parameters for the module. -message LegacyParams { - option (gogoproto.goproto_stringer) = false; - IncentiveInfo lp_incentives = 1; - - // gas fees and swap fees portion for lps, `100 - reward_portion_for_lps - - // reward_portion_for_stakers = revenue percent for protocol`. - string reward_portion_for_lps = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // gas fees and swap fees portion for stakers, `100 - reward_portion_for_lps - - // reward_portion_for_stakers = revenue percent for protocol`. - string reward_portion_for_stakers = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // Tracking dex rewards given to LPs - LegacyDexRewardsTracker dex_rewards_lps = 4 [ (gogoproto.nullable) = false ]; - - // Maximum eden reward apr for lps - [0 - 0.3] - string max_eden_reward_apr_lps = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - repeated SupportedRewardDenom supported_reward_denoms = 6; - string protocol_revenue_address = 7; -} diff --git a/proto/elys/masterchef/pool.proto b/proto/elys/masterchef/pool.proto index 4a27ad34e..15829f0b7 100644 --- a/proto/elys/masterchef/pool.proto +++ b/proto/elys/masterchef/pool.proto @@ -19,12 +19,12 @@ message PoolInfo { (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; - // Dex APR, updated at every distribution + // Dex APR, updated based on 24hr accumulation string dex_apr = 5 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; - // Gas APR, updated at every distribution + // Gas APR, updated based on 24hr accumulation string gas_apr = 6 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false @@ -79,37 +79,3 @@ message PoolRewardsAccum { (gogoproto.nullable) = false ]; } - -message LegacyPoolInfo { - uint64 pool_id = 1; - string reward_wallet = 2; - string multiplier = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string num_blocks = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - string dex_reward_amount_given = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string eden_reward_amount_given = 6 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - string eden_apr = 7 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string dex_apr = 8 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string external_incentive_apr = 9 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - repeated string external_reward_denoms = 10; -} diff --git a/x/incentive/keeper/keeper.go b/x/incentive/keeper/keeper.go index 9b325e80e..dc7a0c278 100644 --- a/x/incentive/keeper/keeper.go +++ b/x/incentive/keeper/keeper.go @@ -106,7 +106,7 @@ func (k Keeper) GetDailyRewardsAmountForPool(ctx sdk.Context, poolId uint64) (sd dailyGasRewardsTotal := math.LegacyZeroDec() dailyEdenRewardsTotal := math.LegacyZeroDec() firstAccum := k.masterchef.FirstPoolRewardsAccum(ctx, poolId) - lastAccum := k.masterchef.FirstPoolRewardsAccum(ctx, poolId) + lastAccum := k.masterchef.LastPoolRewardsAccum(ctx, poolId) if lastAccum.Timestamp != 0 { if firstAccum.Timestamp == lastAccum.Timestamp { dailyDexRewardsTotal = lastAccum.DexReward diff --git a/x/masterchef/keeper/abci.go b/x/masterchef/keeper/abci.go index 47f0da869..ef798433c 100644 --- a/x/masterchef/keeper/abci.go +++ b/x/masterchef/keeper/abci.go @@ -256,6 +256,13 @@ func (k Keeper) UpdateLPRewards(ctx sdk.Context) error { } k.DeletePoolRewardsAccum(ctx, firstAccum) } + + pool.EdenApr = newEdenAllocatedForPool. + MulInt64(totalBlocksPerYear). + Mul(edenDenomPrice). + Quo(tvl) + + k.SetPool(ctx, pool) } // Update APR for amm pools @@ -547,11 +554,6 @@ func (k Keeper) UpdateAmmPoolAPR(ctx sdk.Context, totalBlocksPerYear int64, tota MulInt64(totalBlocksPerYear). Mul(usdcDenomPrice). Quo(tvl) - - poolInfo.EdenApr = lastAccum.EdenReward. - MulInt(sdk.NewInt(totalBlocksPerYear)). - Mul(edenDenomPrice). - Quo(tvl) } else { duration := lastAccum.Timestamp - firstAccum.Timestamp secondsInYear := int64(86400 * 360) @@ -567,12 +569,6 @@ func (k Keeper) UpdateAmmPoolAPR(ctx sdk.Context, totalBlocksPerYear int64, tota QuoInt64(int64(duration)). Mul(usdcDenomPrice). Quo(tvl) - - poolInfo.EdenApr = lastAccum.EdenReward.Sub(firstAccum.EdenReward). - MulInt64(secondsInYear). - QuoInt64(int64(duration)). - Mul(edenDenomPrice). - Quo(tvl) } k.SetPool(ctx, poolInfo) return false diff --git a/x/masterchef/keeper/params.go b/x/masterchef/keeper/params.go index 3a56dded2..c737047ba 100644 --- a/x/masterchef/keeper/params.go +++ b/x/masterchef/keeper/params.go @@ -24,16 +24,3 @@ func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { b := k.cdc.MustMarshal(¶ms) store.Set([]byte(types.ParamsKey), b) } - -// GetParams get all parameters as types.Params -func (k Keeper) GetLegacyParams(ctx sdk.Context) (params types.LegacyParams) { - store := ctx.KVStore(k.storeKey) - - b := store.Get([]byte(types.ParamsKey)) - if b == nil { - return - } - - k.cdc.MustUnmarshal(b, ¶ms) - return -} diff --git a/x/masterchef/keeper/pool.go b/x/masterchef/keeper/pool.go index 80929bbc2..f190b2a36 100644 --- a/x/masterchef/keeper/pool.go +++ b/x/masterchef/keeper/pool.go @@ -71,18 +71,3 @@ func (k Keeper) UpdatePoolMultipliers(ctx sdk.Context, poolMultipliers []types.P return true } - -func (k Keeper) GetAllLegacyPools(ctx sdk.Context) (list []types.LegacyPoolInfo) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.PoolInfoKeyPrefix)) - iterator := sdk.KVStorePrefixIterator(store, []byte{}) - - defer iterator.Close() - - for ; iterator.Valid(); iterator.Next() { - var val types.LegacyPoolInfo - k.cdc.MustUnmarshal(iterator.Value(), &val) - list = append(list, val) - } - - return -} diff --git a/x/masterchef/migrations/v2_migration.go b/x/masterchef/migrations/v2_migration.go index 219d985da..11a1a1323 100644 --- a/x/masterchef/migrations/v2_migration.go +++ b/x/masterchef/migrations/v2_migration.go @@ -1,37 +1,9 @@ package migrations import ( - "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/elys-network/elys/x/masterchef/types" ) func (m Migrator) V2Migration(ctx sdk.Context) error { - // migrate params - legacy := m.keeper.GetLegacyParams(ctx) - params := types.NewParams( - legacy.LpIncentives, - legacy.RewardPortionForLps, - legacy.RewardPortionForStakers, - legacy.MaxEdenRewardAprLps, - legacy.ProtocolRevenueAddress, - ) - m.keeper.SetParams(ctx, params) - - // migrate pools - legacyPools := m.keeper.GetAllLegacyPools(ctx) - for _, legacyPool := range legacyPools { - m.keeper.SetPool(ctx, types.PoolInfo{ - PoolId: legacyPool.PoolId, - RewardWallet: legacyPool.RewardWallet, - Multiplier: legacyPool.Multiplier, - EdenApr: legacyPool.EdenApr, - DexApr: legacyPool.DexApr, - GasApr: math.LegacyZeroDec(), - ExternalIncentiveApr: legacyPool.ExternalIncentiveApr, - ExternalRewardDenoms: legacyPool.ExternalRewardDenoms, - }) - } - return nil } diff --git a/x/masterchef/types/params.go b/x/masterchef/types/params.go index 1dcc9b408..7b542249b 100644 --- a/x/masterchef/types/params.go +++ b/x/masterchef/types/params.go @@ -106,9 +106,3 @@ func validateDexRewardsLps(i interface{}) error { return nil } - -// String implements the Stringer interface. -func (p LegacyParams) String() string { - out, _ := yaml.Marshal(p) - return string(out) -} diff --git a/x/masterchef/types/params.pb.go b/x/masterchef/types/params.pb.go index 064e9b7b9..bb0cd4970 100644 --- a/x/masterchef/types/params.pb.go +++ b/x/masterchef/types/params.pb.go @@ -135,171 +135,44 @@ func (m *SupportedRewardDenom) GetDenom() string { return "" } -type LegacyDexRewardsTracker struct { - // Number of blocks since start of epoch (distribution epoch) - NumBlocks github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=num_blocks,json=numBlocks,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"num_blocks"` - // Accumulated amount at distribution epoch - recalculated at every - // distribution epoch - Amount github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"amount"` -} - -func (m *LegacyDexRewardsTracker) Reset() { *m = LegacyDexRewardsTracker{} } -func (m *LegacyDexRewardsTracker) String() string { return proto.CompactTextString(m) } -func (*LegacyDexRewardsTracker) ProtoMessage() {} -func (*LegacyDexRewardsTracker) Descriptor() ([]byte, []int) { - return fileDescriptor_bc83f5a7f5a55e20, []int{2} -} -func (m *LegacyDexRewardsTracker) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LegacyDexRewardsTracker) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LegacyDexRewardsTracker.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 *LegacyDexRewardsTracker) XXX_Merge(src proto.Message) { - xxx_messageInfo_LegacyDexRewardsTracker.Merge(m, src) -} -func (m *LegacyDexRewardsTracker) XXX_Size() int { - return m.Size() -} -func (m *LegacyDexRewardsTracker) XXX_DiscardUnknown() { - xxx_messageInfo_LegacyDexRewardsTracker.DiscardUnknown(m) -} - -var xxx_messageInfo_LegacyDexRewardsTracker proto.InternalMessageInfo - -// Params defines the parameters for the module. -type LegacyParams struct { - LpIncentives *IncentiveInfo `protobuf:"bytes,1,opt,name=lp_incentives,json=lpIncentives,proto3" json:"lp_incentives,omitempty"` - // gas fees and swap fees portion for lps, `100 - reward_portion_for_lps - - // reward_portion_for_stakers = revenue percent for protocol`. - RewardPortionForLps github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=reward_portion_for_lps,json=rewardPortionForLps,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"reward_portion_for_lps"` - // gas fees and swap fees portion for stakers, `100 - reward_portion_for_lps - - // reward_portion_for_stakers = revenue percent for protocol`. - RewardPortionForStakers github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=reward_portion_for_stakers,json=rewardPortionForStakers,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"reward_portion_for_stakers"` - // Tracking dex rewards given to LPs - DexRewardsLps LegacyDexRewardsTracker `protobuf:"bytes,4,opt,name=dex_rewards_lps,json=dexRewardsLps,proto3" json:"dex_rewards_lps"` - // Maximum eden reward apr for lps - [0 - 0.3] - MaxEdenRewardAprLps github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=max_eden_reward_apr_lps,json=maxEdenRewardAprLps,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_eden_reward_apr_lps"` - SupportedRewardDenoms []*SupportedRewardDenom `protobuf:"bytes,6,rep,name=supported_reward_denoms,json=supportedRewardDenoms,proto3" json:"supported_reward_denoms,omitempty"` - ProtocolRevenueAddress string `protobuf:"bytes,7,opt,name=protocol_revenue_address,json=protocolRevenueAddress,proto3" json:"protocol_revenue_address,omitempty"` -} - -func (m *LegacyParams) Reset() { *m = LegacyParams{} } -func (*LegacyParams) ProtoMessage() {} -func (*LegacyParams) Descriptor() ([]byte, []int) { - return fileDescriptor_bc83f5a7f5a55e20, []int{3} -} -func (m *LegacyParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LegacyParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LegacyParams.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 *LegacyParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_LegacyParams.Merge(m, src) -} -func (m *LegacyParams) XXX_Size() int { - return m.Size() -} -func (m *LegacyParams) XXX_DiscardUnknown() { - xxx_messageInfo_LegacyParams.DiscardUnknown(m) -} - -var xxx_messageInfo_LegacyParams proto.InternalMessageInfo - -func (m *LegacyParams) GetLpIncentives() *IncentiveInfo { - if m != nil { - return m.LpIncentives - } - return nil -} - -func (m *LegacyParams) GetDexRewardsLps() LegacyDexRewardsTracker { - if m != nil { - return m.DexRewardsLps - } - return LegacyDexRewardsTracker{} -} - -func (m *LegacyParams) GetSupportedRewardDenoms() []*SupportedRewardDenom { - if m != nil { - return m.SupportedRewardDenoms - } - return nil -} - -func (m *LegacyParams) GetProtocolRevenueAddress() string { - if m != nil { - return m.ProtocolRevenueAddress - } - return "" -} - func init() { proto.RegisterType((*Params)(nil), "elys.masterchef.Params") proto.RegisterType((*SupportedRewardDenom)(nil), "elys.masterchef.SupportedRewardDenom") - proto.RegisterType((*LegacyDexRewardsTracker)(nil), "elys.masterchef.LegacyDexRewardsTracker") - proto.RegisterType((*LegacyParams)(nil), "elys.masterchef.LegacyParams") } func init() { proto.RegisterFile("elys/masterchef/params.proto", fileDescriptor_bc83f5a7f5a55e20) } var fileDescriptor_bc83f5a7f5a55e20 = []byte{ - // 572 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0x4d, 0x6b, 0x13, 0x51, - 0x14, 0xcd, 0xd8, 0x24, 0xd2, 0xd7, 0x96, 0xc2, 0x58, 0x9b, 0x21, 0xc8, 0x24, 0x04, 0x94, 0x6c, - 0x3a, 0x03, 0x71, 0x23, 0xee, 0x12, 0x63, 0x21, 0x50, 0xa1, 0x4c, 0xc5, 0x85, 0x20, 0xc3, 0xcb, - 0xcc, 0x4d, 0x3a, 0xcc, 0xbc, 0x0f, 0xde, 0x9b, 0x69, 0x13, 0xdc, 0xf9, 0x0b, 0x5c, 0xba, 0x74, - 0xe1, 0x0f, 0xf0, 0x67, 0x74, 0xd9, 0xa5, 0xb8, 0x28, 0x92, 0xfc, 0x11, 0x99, 0xf7, 0x92, 0x58, - 0x92, 0x58, 0x21, 0xa0, 0x2b, 0x57, 0xc9, 0xcc, 0xb9, 0xef, 0x9c, 0x7b, 0xde, 0xbd, 0x87, 0x41, - 0x8f, 0x20, 0x19, 0x4b, 0x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x99, 0x2a, 0xe6, 0xda, - 0x52, 0x71, 0x33, 0x4b, 0x04, 0x8f, 0x5e, 0x86, 0x40, 0x3d, 0x45, 0xd6, 0xe6, 0xca, 0xd2, 0x3b, - 0x54, 0x91, 0x19, 0xcf, 0xed, 0x40, 0x38, 0x97, 0x09, 0x81, 0x32, 0x22, 0xad, 0x52, 0x7d, 0xab, - 0xb9, 0xd3, 0x7a, 0xbc, 0x32, 0x86, 0xb3, 0x79, 0xbd, 0x26, 0xea, 0xe6, 0xd5, 0xde, 0x43, 0xb9, - 0xe6, 0xad, 0x34, 0x9f, 0x21, 0x4b, 0xcd, 0x3b, 0x60, 0x89, 0x2f, 0xe0, 0x02, 0x68, 0x06, 0x3e, - 0x0e, 0x43, 0x01, 0x52, 0x5a, 0xe5, 0xdc, 0x85, 0x77, 0x38, 0xc7, 0x3d, 0x0d, 0xb7, 0x35, 0xfa, - 0xbc, 0xf8, 0xe9, 0x73, 0xad, 0xd0, 0x78, 0x8f, 0x0e, 0xd6, 0xc9, 0x99, 0x07, 0xa8, 0xa4, 0xba, - 0x54, 0xbb, 0xb2, 0xed, 0xe9, 0x07, 0xf3, 0x15, 0x42, 0x24, 0xa2, 0x3e, 0x26, 0x2c, 0xa3, 0xe9, - 0x06, 0x83, 0xef, 0xd1, 0xd4, 0xdb, 0x26, 0x11, 0x6d, 0x2b, 0x82, 0xc6, 0x57, 0x03, 0x55, 0x4e, - 0x60, 0x88, 0x83, 0x71, 0x17, 0x46, 0x5a, 0x5d, 0xbe, 0x16, 0x38, 0x88, 0x41, 0xe4, 0x52, 0x34, - 0x23, 0x7e, 0x3f, 0x61, 0x41, 0xac, 0x37, 0x76, 0x03, 0x29, 0x9a, 0x91, 0x8e, 0x22, 0x30, 0x8f, - 0x51, 0x79, 0xe3, 0xae, 0xf3, 0xd9, 0xce, 0x4e, 0x37, 0x3e, 0x94, 0xd0, 0xae, 0x6e, 0xf9, 0x7f, - 0xb8, 0xee, 0x0a, 0xd7, 0x1b, 0xb4, 0x1f, 0xc2, 0x68, 0xb6, 0xf0, 0x72, 0x11, 0xaa, 0x9d, 0x56, - 0x73, 0xe5, 0x62, 0x7e, 0xb3, 0x01, 0x9d, 0x62, 0xde, 0x8b, 0xb7, 0x17, 0x2e, 0x80, 0xdc, 0xc4, - 0x1d, 0xa1, 0x2d, 0xfd, 0x93, 0xd0, 0x96, 0xff, 0x72, 0x68, 0xef, 0xff, 0x39, 0xb4, 0x9d, 0xde, - 0xd5, 0xc4, 0x36, 0xae, 0x27, 0xb6, 0xf1, 0x63, 0x62, 0x1b, 0x1f, 0xa7, 0x76, 0xe1, 0x7a, 0x6a, - 0x17, 0xbe, 0x4d, 0xed, 0xc2, 0x5b, 0xf7, 0x96, 0xeb, 0xbc, 0xc3, 0x23, 0x0a, 0xe9, 0x25, 0x13, - 0xb1, 0x7a, 0x70, 0x47, 0xb7, 0xbf, 0x15, 0xea, 0x0a, 0xfa, 0x65, 0x25, 0xf4, 0xf4, 0x67, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x0d, 0x53, 0x7e, 0x0f, 0xb1, 0x06, 0x00, 0x00, + // 460 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0x3f, 0x6b, 0xdb, 0x40, + 0x18, 0xc6, 0xa5, 0xc6, 0x31, 0xf8, 0xd2, 0x52, 0x50, 0xdd, 0x58, 0x98, 0x22, 0x9b, 0x40, 0x8b, + 0x97, 0x48, 0x90, 0x2e, 0xa5, 0x9b, 0xd3, 0xb4, 0x60, 0x68, 0x21, 0x28, 0x5b, 0xa1, 0x88, 0x8b, + 0xee, 0xb5, 0x23, 0xac, 0xfb, 0xc3, 0xbd, 0xe7, 0xc4, 0xa1, 0x5f, 0xa2, 0x63, 0xc7, 0x0e, 0xfd, + 0x30, 0x19, 0x33, 0x96, 0x0e, 0xa1, 0xd8, 0x5f, 0xa4, 0xe8, 0xce, 0x4e, 0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 0x25, 0x9f, 0xd7, 0x6d, 0xcb, 0xb7, 0xff, 0x03, + 0x00, 0x00, 0xff, 0xff, 0xa4, 0x15, 0xb2, 0x19, 0x79, 0x03, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -428,145 +301,6 @@ func (m *SupportedRewardDenom) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *LegacyDexRewardsTracker) 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 *LegacyDexRewardsTracker) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LegacyDexRewardsTracker) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size := m.NumBlocks.Size() - i -= size - if _, err := m.NumBlocks.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *LegacyParams) 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 *LegacyParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LegacyParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ProtocolRevenueAddress) > 0 { - i -= len(m.ProtocolRevenueAddress) - copy(dAtA[i:], m.ProtocolRevenueAddress) - i = encodeVarintParams(dAtA, i, uint64(len(m.ProtocolRevenueAddress))) - i-- - dAtA[i] = 0x3a - } - if len(m.SupportedRewardDenoms) > 0 { - for iNdEx := len(m.SupportedRewardDenoms) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SupportedRewardDenoms[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - { - size := m.MaxEdenRewardAprLps.Size() - i -= size - if _, err := m.MaxEdenRewardAprLps.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - { - size, err := m.DexRewardsLps.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size := m.RewardPortionForStakers.Size() - i -= size - if _, err := m.RewardPortionForStakers.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size := m.RewardPortionForLps.Size() - i -= size - if _, err := m.RewardPortionForLps.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if m.LpIncentives != nil { - { - size, err := m.LpIncentives.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func encodeVarintParams(dAtA []byte, offset int, v uint64) int { offset -= sovParams(v) base := offset @@ -622,50 +356,6 @@ func (m *SupportedRewardDenom) Size() (n int) { return n } -func (m *LegacyDexRewardsTracker) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.NumBlocks.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.Amount.Size() - n += 1 + l + sovParams(uint64(l)) - return n -} - -func (m *LegacyParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.LpIncentives != nil { - l = m.LpIncentives.Size() - n += 1 + l + sovParams(uint64(l)) - } - l = m.RewardPortionForLps.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.RewardPortionForStakers.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.DexRewardsLps.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.MaxEdenRewardAprLps.Size() - n += 1 + l + sovParams(uint64(l)) - if len(m.SupportedRewardDenoms) > 0 { - for _, e := range m.SupportedRewardDenoms { - l = e.Size() - n += 1 + l + sovParams(uint64(l)) - } - } - l = len(m.ProtocolRevenueAddress) - if l > 0 { - n += 1 + l + sovParams(uint64(l)) - } - return n -} - func sovParams(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1042,411 +732,6 @@ func (m *SupportedRewardDenom) Unmarshal(dAtA []byte) error { } return nil } -func (m *LegacyDexRewardsTracker) 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 ErrIntOverflowParams - } - 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: LegacyDexRewardsTracker: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LegacyDexRewardsTracker: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NumBlocks", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - 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 ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.NumBlocks.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - 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 ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LegacyParams) 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 ErrIntOverflowParams - } - 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: LegacyParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LegacyParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LpIncentives", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LpIncentives == nil { - m.LpIncentives = &IncentiveInfo{} - } - if err := m.LpIncentives.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardPortionForLps", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - 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 ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.RewardPortionForLps.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardPortionForStakers", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - 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 ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.RewardPortionForStakers.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DexRewardsLps", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.DexRewardsLps.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxEdenRewardAprLps", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - 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 ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MaxEdenRewardAprLps.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SupportedRewardDenoms", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SupportedRewardDenoms = append(m.SupportedRewardDenoms, &SupportedRewardDenom{}) - if err := m.SupportedRewardDenoms[len(m.SupportedRewardDenoms)-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 ProtocolRevenueAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - 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 ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProtocolRevenueAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipParams(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/masterchef/types/pool.pb.go b/x/masterchef/types/pool.pb.go index 61617da07..fdfbdcd3f 100644 --- a/x/masterchef/types/pool.pb.go +++ b/x/masterchef/types/pool.pb.go @@ -32,9 +32,9 @@ type PoolInfo struct { Multiplier github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=multiplier,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"multiplier"` // Eden APR, updated at every distribution EdenApr github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=eden_apr,json=edenApr,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"eden_apr"` - // Dex APR, updated at every distribution + // Dex APR, updated based on 24hr accumulation DexApr github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=dex_apr,json=dexApr,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"dex_apr"` - // Gas APR, updated at every distribution + // Gas APR, updated based on 24hr accumulation GasApr github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=gas_apr,json=gasApr,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"gas_apr"` // External Incentive APR, updated at every distribution ExternalIncentiveApr github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,7,opt,name=external_incentive_apr,json=externalIncentiveApr,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"external_incentive_apr"` @@ -282,129 +282,54 @@ func (m *PoolRewardsAccum) GetTimestamp() uint64 { return 0 } -type LegacyPoolInfo struct { - PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` - RewardWallet string `protobuf:"bytes,2,opt,name=reward_wallet,json=rewardWallet,proto3" json:"reward_wallet,omitempty"` - Multiplier github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=multiplier,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"multiplier"` - NumBlocks github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=num_blocks,json=numBlocks,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"num_blocks"` - DexRewardAmountGiven github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=dex_reward_amount_given,json=dexRewardAmountGiven,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"dex_reward_amount_given"` - EdenRewardAmountGiven github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=eden_reward_amount_given,json=edenRewardAmountGiven,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"eden_reward_amount_given"` - EdenApr github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,7,opt,name=eden_apr,json=edenApr,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"eden_apr"` - DexApr github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,8,opt,name=dex_apr,json=dexApr,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"dex_apr"` - ExternalIncentiveApr github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,9,opt,name=external_incentive_apr,json=externalIncentiveApr,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"external_incentive_apr"` - ExternalRewardDenoms []string `protobuf:"bytes,10,rep,name=external_reward_denoms,json=externalRewardDenoms,proto3" json:"external_reward_denoms,omitempty"` -} - -func (m *LegacyPoolInfo) Reset() { *m = LegacyPoolInfo{} } -func (m *LegacyPoolInfo) String() string { return proto.CompactTextString(m) } -func (*LegacyPoolInfo) ProtoMessage() {} -func (*LegacyPoolInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_eeebce6928738c2c, []int{4} -} -func (m *LegacyPoolInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LegacyPoolInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LegacyPoolInfo.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 *LegacyPoolInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_LegacyPoolInfo.Merge(m, src) -} -func (m *LegacyPoolInfo) XXX_Size() int { - return m.Size() -} -func (m *LegacyPoolInfo) XXX_DiscardUnknown() { - xxx_messageInfo_LegacyPoolInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_LegacyPoolInfo proto.InternalMessageInfo - -func (m *LegacyPoolInfo) GetPoolId() uint64 { - if m != nil { - return m.PoolId - } - return 0 -} - -func (m *LegacyPoolInfo) GetRewardWallet() string { - if m != nil { - return m.RewardWallet - } - return "" -} - -func (m *LegacyPoolInfo) GetExternalRewardDenoms() []string { - if m != nil { - return m.ExternalRewardDenoms - } - return nil -} - func init() { proto.RegisterType((*PoolInfo)(nil), "elys.masterchef.PoolInfo") proto.RegisterType((*PoolRewardInfo)(nil), "elys.masterchef.PoolRewardInfo") proto.RegisterType((*UserRewardInfo)(nil), "elys.masterchef.UserRewardInfo") proto.RegisterType((*PoolRewardsAccum)(nil), "elys.masterchef.PoolRewardsAccum") - proto.RegisterType((*LegacyPoolInfo)(nil), "elys.masterchef.LegacyPoolInfo") } func init() { proto.RegisterFile("elys/masterchef/pool.proto", fileDescriptor_eeebce6928738c2c) } var fileDescriptor_eeebce6928738c2c = []byte{ - // 692 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x96, 0xcd, 0x4e, 0xdb, 0x4a, - 0x14, 0x80, 0xf3, 0x47, 0x12, 0x9f, 0x70, 0x73, 0xd1, 0x08, 0x2e, 0xb9, 0xe8, 0x2a, 0x70, 0x53, - 0xa9, 0x62, 0x51, 0x92, 0x45, 0xfb, 0x02, 0x41, 0x48, 0x34, 0x52, 0x29, 0xc8, 0x15, 0xaa, 0xd4, - 0x8d, 0x35, 0xb1, 0x0f, 0x8e, 0x85, 0x3d, 0x63, 0xcd, 0x8c, 0x21, 0xbc, 0x41, 0x97, 0xed, 0x5b, - 0xb1, 0x64, 0x59, 0xb5, 0x12, 0xaa, 0xa0, 0x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 0xf3, 0xc3, 0xfa, 0x2d, 0xf3, 0x03, - 0xee, 0x9f, 0x1f, 0xbb, 0x93, 0xcb, 0x9b, 0x7e, 0xf5, 0xea, 0xa6, 0x5f, 0xfd, 0x7c, 0xd3, 0xaf, - 0xbe, 0xbb, 0xed, 0x57, 0xae, 0x6e, 0xfb, 0x95, 0x0f, 0xb7, 0xfd, 0xca, 0x9b, 0x51, 0xc1, 0x1a, - 0xfd, 0x3e, 0xd9, 0x61, 0xa8, 0xce, 0xb9, 0x38, 0x35, 0x1f, 0xa3, 0x79, 0xf1, 0x29, 0x63, 0x4c, - 0x9b, 0x36, 0xcd, 0x2b, 0xe5, 0xe9, 0xb7, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe4, 0x8a, 0xb2, 0x80, - 0xea, 0x08, 0x00, 0x00, + // 589 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x41, 0x6f, 0xd3, 0x30, + 0x14, 0xc7, 0x9b, 0xb6, 0xb4, 0xcb, 0xeb, 0x18, 0x93, 0x35, 0xa0, 0x4c, 0x28, 0x1b, 0x45, 0x42, + 0x3b, 0xb0, 0xe6, 0x00, 0x5f, 0x60, 0xd3, 0x24, 0xe8, 0x01, 0x36, 0x05, 0x4d, 0x48, 0x5c, 0x22, + 0xd7, 0x7e, 0x4b, 0xa2, 0x25, 0x71, 0x64, 0xbb, 0xac, 0xfb, 0x06, 0x1c, 0xe1, 0x5b, 0xed, 0xb8, + 0x23, 0x02, 0x69, 0x42, 0x1b, 0x1f, 0x04, 0xd9, 0x49, 0xd7, 0x48, 0x48, 0x3d, 0xe4, 0x94, 0xf8, + 0x3d, 0xfb, 0xe7, 0xf7, 0x9e, 0xff, 0xef, 0xc1, 0x36, 0xa6, 0x97, 0xca, 0xcf, 0xa8, 0xd2, 0x28, + 0x59, 0x8c, 0x67, 0x7e, 0x21, 0x44, 0x3a, 0x2e,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74, 0x82, 0x81, 0xb5, 0xbd, 0xb7, 0x26, 0xf2, 0x1c, 0x5c, 0x9d, 0x64, 0xa8, + 0x34, 0xcd, 0x0a, 0x5b, 0x98, 0x6e, 0xb0, 0x34, 0x90, 0x0f, 0x00, 0xa6, 0x1d, 0xcb, 0x18, 0x1a, + 0x56, 0xc5, 0xe5, 0x38, 0x2f, 0xc3, 0x35, 0x38, 0xd3, 0x94, 0x15, 0xae, 0x59, 0x41, 0xdc, 0x88, + 0xaa, 0x0a, 0x77, 0x0c, 0x03, 0x3b, 0x77, 0x2a, 0x5e, 0xb3, 0x3e, 0x07, 0x83, 0x28, 0x81, 0x87, + 0x93, 0xab, 0x5b, 0xcf, 0xb9, 0xbe, 0xf5, 0x9c, 0x3f, 0xb7, 0x9e, 0xf3, 0xfd, 0xce, 0x6b, 0x5d, + 0xdf, 0x79, 0xad, 0x9f, 0x77, 0x5e, 0xeb, 0x8b, 0x5f, 0xa3, 0x99, 0x79, 0xbd, 0x9f, 0xa3, 0xbe, + 0x10, 0xf2, 0xdc, 0x2e, 0xfc, 0x79, 0x7d, 0xb4, 0x5b, 0xf4, 0xb4, 0x67, 0xa7, 0xf6, 0x9b, 0x7f, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x8d, 0x9e, 0x65, 0x2b, 0xfa, 0x05, 0x00, 0x00, } func (m *PoolInfo) Marshal() (dAtA []byte, err error) { @@ -681,120 +606,6 @@ func (m *PoolRewardsAccum) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *LegacyPoolInfo) 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 *LegacyPoolInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LegacyPoolInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ExternalRewardDenoms) > 0 { - for iNdEx := len(m.ExternalRewardDenoms) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ExternalRewardDenoms[iNdEx]) - copy(dAtA[i:], m.ExternalRewardDenoms[iNdEx]) - i = encodeVarintPool(dAtA, i, uint64(len(m.ExternalRewardDenoms[iNdEx]))) - i-- - dAtA[i] = 0x52 - } - } - { - size := m.ExternalIncentiveApr.Size() - i -= size - if _, err := m.ExternalIncentiveApr.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - { - size := m.DexApr.Size() - i -= size - if _, err := m.DexApr.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - { - size := m.EdenApr.Size() - i -= size - if _, err := m.EdenApr.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - { - size := m.EdenRewardAmountGiven.Size() - i -= size - if _, err := m.EdenRewardAmountGiven.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - { - size := m.DexRewardAmountGiven.Size() - i -= size - if _, err := m.DexRewardAmountGiven.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - { - size := m.NumBlocks.Size() - i -= size - if _, err := m.NumBlocks.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size := m.Multiplier.Size() - i -= size - if _, err := m.Multiplier.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if len(m.RewardWallet) > 0 { - i -= len(m.RewardWallet) - copy(dAtA[i:], m.RewardWallet) - i = encodeVarintPool(dAtA, i, uint64(len(m.RewardWallet))) - i-- - dAtA[i] = 0x12 - } - if m.PoolId != 0 { - i = encodeVarintPool(dAtA, i, uint64(m.PoolId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - func encodeVarintPool(dAtA []byte, offset int, v uint64) int { offset -= sovPool(v) base := offset @@ -907,42 +718,6 @@ func (m *PoolRewardsAccum) Size() (n int) { return n } -func (m *LegacyPoolInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PoolId != 0 { - n += 1 + sovPool(uint64(m.PoolId)) - } - l = len(m.RewardWallet) - if l > 0 { - n += 1 + l + sovPool(uint64(l)) - } - l = m.Multiplier.Size() - n += 1 + l + sovPool(uint64(l)) - l = m.NumBlocks.Size() - n += 1 + l + sovPool(uint64(l)) - l = m.DexRewardAmountGiven.Size() - n += 1 + l + sovPool(uint64(l)) - l = m.EdenRewardAmountGiven.Size() - n += 1 + l + sovPool(uint64(l)) - l = m.EdenApr.Size() - n += 1 + l + sovPool(uint64(l)) - l = m.DexApr.Size() - n += 1 + l + sovPool(uint64(l)) - l = m.ExternalIncentiveApr.Size() - n += 1 + l + sovPool(uint64(l)) - if len(m.ExternalRewardDenoms) > 0 { - for _, s := range m.ExternalRewardDenoms { - l = len(s) - n += 1 + l + sovPool(uint64(l)) - } - } - return n -} - func sovPool(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1816,377 +1591,6 @@ func (m *PoolRewardsAccum) Unmarshal(dAtA []byte) error { } return nil } -func (m *LegacyPoolInfo) 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 ErrIntOverflowPool - } - 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: LegacyPoolInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LegacyPoolInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) - } - m.PoolId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PoolId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardWallet", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPool - } - 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 ErrInvalidLengthPool - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RewardWallet = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Multiplier", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPool - } - 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 ErrInvalidLengthPool - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Multiplier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NumBlocks", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPool - } - 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 ErrInvalidLengthPool - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.NumBlocks.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DexRewardAmountGiven", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPool - } - 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 ErrInvalidLengthPool - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.DexRewardAmountGiven.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EdenRewardAmountGiven", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPool - } - 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 ErrInvalidLengthPool - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.EdenRewardAmountGiven.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EdenApr", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPool - } - 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 ErrInvalidLengthPool - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.EdenApr.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DexApr", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPool - } - 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 ErrInvalidLengthPool - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.DexApr.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExternalIncentiveApr", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPool - } - 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 ErrInvalidLengthPool - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ExternalIncentiveApr.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExternalRewardDenoms", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPool - } - 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 ErrInvalidLengthPool - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExternalRewardDenoms = append(m.ExternalRewardDenoms, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipPool(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0