diff --git a/app/upgrades/v6_4_5/constants.go b/app/upgrades/v6_4_5/constants.go index 27afc17b0..19a44a04c 100644 --- a/app/upgrades/v6_4_5/constants.go +++ b/app/upgrades/v6_4_5/constants.go @@ -1,7 +1,9 @@ package v6_4_5 import ( + store "github.com/cosmos/cosmos-sdk/store/types" "github.com/notional-labs/composable/v6/app/upgrades" + ibctransfermiddleware "github.com/notional-labs/composable/v6/x/ibctransfermiddleware/types" ) const ( @@ -12,4 +14,8 @@ const ( var Upgrade = upgrades.Upgrade{ UpgradeName: UpgradeName, CreateUpgradeHandler: CreateUpgradeHandler, + StoreUpgrades: store.StoreUpgrades{ + Added: []string{ibctransfermiddleware.StoreKey}, + Deleted: []string{}, + }, } diff --git a/app/upgrades/v6_4_5/upgrade.go b/app/upgrades/v6_4_5/upgrade.go index 6318f114a..91b0cf81a 100644 --- a/app/upgrades/v6_4_5/upgrade.go +++ b/app/upgrades/v6_4_5/upgrade.go @@ -8,6 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/notional-labs/composable/v6/app/keepers" "github.com/notional-labs/composable/v6/app/upgrades" + ibctransfermiddleware "github.com/notional-labs/composable/v6/x/ibctransfermiddleware/types" ) func CreateUpgradeHandler( @@ -35,6 +36,9 @@ func CreateUpgradeHandler( keepers.BankKeeper.BurnCoins(ctx, "gov", coins) } + custommiddlewareparams := ibctransfermiddleware.DefaultGenesisState() + keepers.IbcTransferMiddlewareKeeper.SetParams(ctx, custommiddlewareparams.Params) + return mm.RunMigrations(ctx, configurator, vm) } } diff --git a/app/upgrades/v6_4_6/constants.go b/app/upgrades/v6_4_6/constants.go deleted file mode 100644 index 981d04382..000000000 --- a/app/upgrades/v6_4_6/constants.go +++ /dev/null @@ -1,22 +0,0 @@ -package v6_4_6 - -import ( - store "github.com/cosmos/cosmos-sdk/store/types" - - "github.com/notional-labs/composable/v6/app/upgrades" - ibctransfermiddleware "github.com/notional-labs/composable/v6/x/ibctransfermiddleware/types" -) - -const ( - // UpgradeName defines the on-chain upgrade name for the composable upgrade. - UpgradeName = "v6_4_6" -) - -var Upgrade = upgrades.Upgrade{ - UpgradeName: UpgradeName, - CreateUpgradeHandler: CreateUpgradeHandler, - StoreUpgrades: store.StoreUpgrades{ - Added: []string{ibctransfermiddleware.StoreKey}, - Deleted: []string{}, - }, -} diff --git a/app/upgrades/v6_4_6/upgrade.go b/app/upgrades/v6_4_6/upgrade.go deleted file mode 100644 index 183e63e80..000000000 --- a/app/upgrades/v6_4_6/upgrade.go +++ /dev/null @@ -1,28 +0,0 @@ -package v6_4_6 - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - - "github.com/cosmos/cosmos-sdk/codec" - "github.com/notional-labs/composable/v6/app/keepers" - "github.com/notional-labs/composable/v6/app/upgrades" - ibctransfermiddleware "github.com/notional-labs/composable/v6/x/ibctransfermiddleware/types" -) - -func CreateUpgradeHandler( - mm *module.Manager, - configurator module.Configurator, - _ upgrades.BaseAppParamManager, - _ codec.Codec, - keepers *keepers.AppKeepers, -) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { - // Add params for custom middleware - custommiddlewareparams := ibctransfermiddleware.DefaultGenesisState() - keepers.IbcTransferMiddlewareKeeper.SetParams(ctx, custommiddlewareparams.Params) - - return mm.RunMigrations(ctx, configurator, vm) - } -}