diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d6ecda6..04937e9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,20 @@ Contains bug fixes. Contains all the PRs that improved the code without changing the behaviours. --> +## [Unreleased] + +### Added + +### Changed + +### Deprecated + +### Removed + +### Fixed + +### Improvements + ## [v4.0.0] ### Added diff --git a/app/app_upgrades.go b/app/app_upgrades.go index aafd3c93..15b9080e 100644 --- a/app/app_upgrades.go +++ b/app/app_upgrades.go @@ -11,6 +11,7 @@ import ( upgrade2_0_0 "github.com/archway-network/archway/app/upgrades/2_0_0" upgrade3_0_0 "github.com/archway-network/archway/app/upgrades/3_0_0" upgrade4_0_0 "github.com/archway-network/archway/app/upgrades/4_0_0" + upgradelatest "github.com/archway-network/archway/app/upgrades/latest" ) // UPGRADES @@ -21,6 +22,8 @@ var Upgrades = []upgrades.Upgrade{ upgrade2_0_0.Upgrade, // v2.0.0 upgrade3_0_0.Upgrade, // v3.0.0 upgrade4_0_0.Upgrade, // v4.0.0 + + upgradelatest.Upgrade, // latest - This upgrade handler is used for all the current changes to the protocol } func (app *ArchwayApp) setupUpgrades() { diff --git a/app/upgrades/latest/upgrades.go b/app/upgrades/latest/upgrades.go new file mode 100644 index 00000000..58b1d608 --- /dev/null +++ b/app/upgrades/latest/upgrades.go @@ -0,0 +1,24 @@ +package upgradelatest + +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/archway-network/archway/app/upgrades" +) + +// This upgrade handler is used for all the current changes to the protocol + +const Name = "latest" + +var Upgrade = upgrades.Upgrade{ + UpgradeName: Name, + CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator) upgradetypes.UpgradeHandler { + return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return mm.RunMigrations(ctx, cfg, fromVM) + } + }, + StoreUpgrades: storetypes.StoreUpgrades{}, +} diff --git a/interchaintest/setup.go b/interchaintest/setup.go index 574cf43b..a2001417 100644 --- a/interchaintest/setup.go +++ b/interchaintest/setup.go @@ -8,8 +8,8 @@ import ( ) const ( - initialVersion = "v3.0.0" // The last release of the chain. The one the mainnet is running on - upgradeName = "v4.0.0" // The next upgrade name. Should match the upgrade handler. + initialVersion = "v4.0.0" // The last release of the chain. The one the mainnet is running on + upgradeName = "latest" // The next upgrade name. Should match the upgrade handler. chainName = "archway" )