diff --git a/app/upgrades.go b/app/upgrades.go index 67f1c442..6407fcbd 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -13,6 +13,7 @@ import ( v4 "github.com/jackalLabs/canine-chain/v4/app/upgrades/v4" v410 "github.com/jackalLabs/canine-chain/v4/app/upgrades/v410" "github.com/jackalLabs/canine-chain/v4/app/upgrades/v410beta" + "github.com/jackalLabs/canine-chain/v4/app/upgrades/v410testnet" "github.com/jackalLabs/canine-chain/v4/app/upgrades/v4alpha1" "github.com/jackalLabs/canine-chain/v4/app/upgrades/v4alpha3" "github.com/jackalLabs/canine-chain/v4/app/upgrades/v4alpha5" @@ -29,6 +30,7 @@ func (app *JackalApp) registerTestnetUpgradeHandlers() { app.registerUpgrade(v4alpha3.NewUpgrade(app.mm, app.configurator)) app.registerUpgrade(v4alpha5.NewUpgrade(app.mm, app.configurator)) app.registerUpgrade(v410beta.NewUpgrade(app.mm, app.configurator)) + app.registerUpgrade(v410testnet.NewUpgrade(app.mm, app.configurator)) } func (app *JackalApp) registerMainnetUpgradeHandlers() { diff --git a/app/upgrades/v410testnet/upgrades.go b/app/upgrades/v410testnet/upgrades.go new file mode 100644 index 00000000..a9651f67 --- /dev/null +++ b/app/upgrades/v410testnet/upgrades.go @@ -0,0 +1,44 @@ +package v410testnet + +import ( + storetypes "github.com/cosmos/cosmos-sdk/store/types" + 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/jackalLabs/canine-chain/v4/app/upgrades" +) + +var _ upgrades.Upgrade = &Upgrade{} + +type Upgrade struct { + mm *module.Manager + configurator module.Configurator +} + +// NewUpgrade returns a new Upgrade instance +func NewUpgrade(mm *module.Manager, configurator module.Configurator) *Upgrade { + return &Upgrade{ + mm: mm, + configurator: configurator, + } +} + +// Name implements upgrades.Upgrade +func (u *Upgrade) Name() string { + return "v410testnet" +} + +// Handler implements upgrades.Upgrade +func (u *Upgrade) Handler() upgradetypes.UpgradeHandler { + return func(_ sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return fromVM, nil + } +} + +// StoreUpgrades implements upgrades.Upgrade +func (u *Upgrade) StoreUpgrades() *storetypes.StoreUpgrades { + return &storetypes.StoreUpgrades{ + Added: []string{}, + Deleted: []string{}, + } +}