From e060393563ca5c7dbb6c8b00b1b6f0745e4a38bf Mon Sep 17 00:00:00 2001 From: Kevin Davis Date: Thu, 12 Aug 2021 14:00:19 -0600 Subject: [PATCH] fix: update claim multipliers in incentive migration (#994) --- migrate/v0_15/incentive.go | 15 +++++- .../v0_15/testdata/v0_15-incentive-state.json | 47 ++++++++++++++++--- 2 files changed, 54 insertions(+), 8 deletions(-) diff --git a/migrate/v0_15/incentive.go b/migrate/v0_15/incentive.go index b501c485..5d68c31b 100644 --- a/migrate/v0_15/incentive.go +++ b/migrate/v0_15/incentive.go @@ -25,8 +25,19 @@ func Incentive(incentiveGS v0_14incentive.GenesisState) v0_15incentive.GenesisSt Multipliers: claimMultipliers, }, { - Denom: "swp", - Multipliers: claimMultipliers, // TODO set the correct multipliers + Denom: "swp", + Multipliers: v0_15incentive.Multipliers{ + { + Name: v0_15incentive.Small, + MonthsLockup: 1, + Factor: sdk.MustNewDecFromStr("0.1"), + }, + { + Name: v0_15incentive.Large, + MonthsLockup: 12, + Factor: sdk.OneDec(), + }, + }, // TODO set the correct multipliers }, } diff --git a/migrate/v0_15/testdata/v0_15-incentive-state.json b/migrate/v0_15/testdata/v0_15-incentive-state.json index 870fbcc4..5956a256 100644 --- a/migrate/v0_15/testdata/v0_15-incentive-state.json +++ b/migrate/v0_15/testdata/v0_15-incentive-state.json @@ -173,14 +173,49 @@ "claim_end": "2026-04-08T14:00:00Z", "claim_multipliers": [ { - "factor": "0.200000000000000000", - "months_lockup": "1", - "name": "small" + "denom": "hard", + "multipliers": [ + { + "name": "small", + "months_lockup": "1", + "factor": "0.200000000000000000" + }, + { + "name": "large", + "months_lockup": "12", + "factor": "1.000000000000000000" + } + ] }, { - "factor": "1.000000000000000000", - "months_lockup": "12", - "name": "large" + "denom": "ukava", + "multipliers": [ + { + "name": "small", + "months_lockup": "1", + "factor": "0.200000000000000000" + }, + { + "name": "large", + "months_lockup": "12", + "factor": "1.000000000000000000" + } + ] + }, + { + "denom": "swp", + "multipliers": [ + { + "name": "small", + "months_lockup": "1", + "factor": "0.100000000000000000" + }, + { + "name": "large", + "months_lockup": "12", + "factor": "1.000000000000000000" + } + ] } ], "delegator_reward_periods": [