diff --git a/app/upgrades/v6_5_5/constants.go b/app/upgrades/v6_5_5/constants.go new file mode 100644 index 000000000..20afe8641 --- /dev/null +++ b/app/upgrades/v6_5_5/constants.go @@ -0,0 +1,20 @@ +package v6_5_5 + +import ( + store "github.com/cosmos/cosmos-sdk/store/types" + "github.com/notional-labs/composable/v6/app/upgrades" +) + +const ( + // UpgradeName defines the on-chain upgrade name for the composable upgrade. + UpgradeName = "v6_5_4" +) + +var Upgrade = upgrades.Upgrade{ + UpgradeName: UpgradeName, + CreateUpgradeHandler: CreateUpgradeHandler, + StoreUpgrades: store.StoreUpgrades{ + Added: []string{}, + Deleted: []string{}, + }, +} diff --git a/app/upgrades/v6_5_5/upgrade.go b/app/upgrades/v6_5_5/upgrade.go new file mode 100644 index 000000000..5b260d881 --- /dev/null +++ b/app/upgrades/v6_5_5/upgrade.go @@ -0,0 +1,34 @@ +package v6_5_5 + +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" +) + +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) { + // BrokenProposals := [3]uint64{2, 6, 11} + // // gov module store + // store := ctx.KVStore(keepers.GetKVStoreKey()["gov"]) + + // for _, proposalID := range BrokenProposals { + // bz := store.Get(types.ProposalKey(proposalID)) + // if bz != nil { + // store.Delete(types.ProposalKey(proposalID)) + // } + // } + return mm.RunMigrations(ctx, configurator, vm) + } +}