From 296fe7c467661db6473e7f3fb026062d3343d1b7 Mon Sep 17 00:00:00 2001 From: avery <> Date: Tue, 26 Nov 2024 10:13:57 +0100 Subject: [PATCH 1/4] update --- modules/htlc/genesis_test.go | 3 ++- modules/htlc/migrations/v2/migrate_test.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/htlc/genesis_test.go b/modules/htlc/genesis_test.go index 31906f69..6b60d436 100644 --- a/modules/htlc/genesis_test.go +++ b/modules/htlc/genesis_test.go @@ -10,6 +10,7 @@ package htlc_test // "github.com/cosmos/cosmos-sdk/codec" // sdk "github.com/cosmos/cosmos-sdk/types" +// "cosmossdk.io/math" // "mods.irisnet.org/simapp" // "mods.irisnet.org/modules/htlc/keeper" @@ -76,7 +77,7 @@ package htlc_test // name: "0 deputy fees", // genState: func() *types.GenesisState { // gs := NewHTLTGenesis(suite.addrs[0]) -// gs.Params.AssetParams[0].FixedFee = sdk.ZeroInt() +// gs.Params.AssetParams[0].FixedFee = math.ZeroInt() // return gs // }, // expectPass: true, diff --git a/modules/htlc/migrations/v2/migrate_test.go b/modules/htlc/migrations/v2/migrate_test.go index a72cbfce..42623021 100644 --- a/modules/htlc/migrations/v2/migrate_test.go +++ b/modules/htlc/migrations/v2/migrate_test.go @@ -10,6 +10,7 @@ package v2_test // tmproto "github.com/cometbft/cometbft/proto/tendermint/types" // sdk "github.com/cosmos/cosmos-sdk/types" +// "cosmossdk.io/math" // "mods.irisnet.org/simapp" // v2 "mods.irisnet.org/modules/htlc/migrations/v2" @@ -29,7 +30,7 @@ package v2_test // SupplyLimit: htlctypes.SupplyLimit{ // Limit: sdk.NewInt(350000000000000), // TimeLimited: false, -// TimeBasedLimit: sdk.ZeroInt(), +// TimeBasedLimit: math.ZeroInt(), // TimePeriod: time.Hour, // }, // Active: true, From adda8ca6c12e8defe45c62558ce27dfd04c50934 Mon Sep 17 00:00:00 2001 From: avery <> Date: Tue, 26 Nov 2024 10:20:09 +0100 Subject: [PATCH 2/4] update --- modules/farm/simulation/operations.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/modules/farm/simulation/operations.go b/modules/farm/simulation/operations.go index 54e06698..875775e0 100644 --- a/modules/farm/simulation/operations.go +++ b/modules/farm/simulation/operations.go @@ -56,11 +56,6 @@ func WeightedOperations( weightMsgStake = 50 }, ) - appParams.GetOrGenerate(OpWeightMsgStake, &weightMsgStake, nil, - func(_ *rand.Rand) { - weightMsgStake = 50 - }, - ) appParams.GetOrGenerate(OpWeightMsgUnStake, &weightMsgUnStake, nil, func(_ *rand.Rand) { weightMsgUnStake = 50 From 787a577af63fd695f52c4c9557e1a1cf3ba991a4 Mon Sep 17 00:00:00 2001 From: avery <> Date: Tue, 26 Nov 2024 10:26:39 +0100 Subject: [PATCH 3/4] update genesis --- modules/farm/simulation/genesis.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/farm/simulation/genesis.go b/modules/farm/simulation/genesis.go index f254c344..aafee538 100644 --- a/modules/farm/simulation/genesis.go +++ b/modules/farm/simulation/genesis.go @@ -30,16 +30,12 @@ func RandomizedGenState(simState *module.SimulationState) { func(r *rand.Rand) { createPoolFee = math.NewInt(5000) }, ) - simState.AppParams.GetOrGenerate( - PoolCreationFee, &createPoolFee, simState.Rand, - func(r *rand.Rand) { taxRate = math.LegacyNewDecWithPrec(4, 1) }, - ) - simState.AppParams.GetOrGenerate( MaxRewardCategoryN, &maxRewardCategoryN, simState.Rand, func(r *rand.Rand) { maxRewardCategoryN = 2 }, ) + taxRate = math.LegacyNewDecWithPrec(4, 1) farmPoolGenesis := types.NewGenesisState( types.NewParams(sdk.NewCoin(sdk.DefaultBondDenom, createPoolFee), maxRewardCategoryN, taxRate), nil, nil, 0, nil, From 8a7c6da446d5e3464746c39c34083a34dd3ea7d8 Mon Sep 17 00:00:00 2001 From: avery <> Date: Tue, 26 Nov 2024 11:02:42 +0100 Subject: [PATCH 4/4] remove optional --- modules/farm/depinject.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/farm/depinject.go b/modules/farm/depinject.go index 1561eab7..17613e67 100644 --- a/modules/farm/depinject.go +++ b/modules/farm/depinject.go @@ -47,7 +47,7 @@ type Inputs struct { AccountKeeper types.AccountKeeper BankKeeper types.BankKeeper - DistrKeeper types.DistrKeeper `optional:"true"` + DistrKeeper types.DistrKeeper GovKeeper types.GovKeeper CoinswapKeeper types.CoinswapKeeper