diff --git a/CHANGELOG.md b/CHANGELOG.md index 6232011f..05196e17 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 behaviors. --> +## [Unreleased] + +### Added + +### Changed + +### Deprecated + +### Removed + +### Fixed + +### Improvements + ## [v7.0.0](https://github.com/archway-network/archway/releases/tag/v7.0.0) ### Added diff --git a/app/app_upgrades.go b/app/app_upgrades.go index bd0aa888..6edd7055 100644 --- a/app/app_upgrades.go +++ b/app/app_upgrades.go @@ -14,6 +14,7 @@ import ( upgrade4_0_2 "github.com/archway-network/archway/app/upgrades/4_0_2" upgrade6_0_0 "github.com/archway-network/archway/app/upgrades/6_0_0" upgrade7_0_0 "github.com/archway-network/archway/app/upgrades/7_0_0" + upgradelatest "github.com/archway-network/archway/app/upgrades/latest" ) // UPGRADES @@ -27,6 +28,8 @@ var Upgrades = []upgrades.Upgrade{ upgrade4_0_2.Upgrade, // v4.0.2 upgrade6_0_0.Upgrade, // v6.0.0 upgrade7_0_0.Upgrade, // v7.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..1672d82a --- /dev/null +++ b/app/upgrades/latest/upgrades.go @@ -0,0 +1,32 @@ +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/keepers" + "github.com/archway-network/archway/app/upgrades" +) + +// This upgrade handler is used for all the current changes to the protocol + +const Name = "latest" +const NameAsciiArt = "" + +var Upgrade = upgrades.Upgrade{ + UpgradeName: Name, + CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator, keepers keepers.ArchwayKeepers) upgradetypes.UpgradeHandler { + return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + migrations, err := mm.RunMigrations(ctx, cfg, fromVM) + if err != nil { + return nil, err + } + + ctx.Logger().Info(upgrades.ArchwayLogo + NameAsciiArt) + return migrations, nil + } + }, + StoreUpgrades: storetypes.StoreUpgrades{}, +} diff --git a/interchaintest/setup.go b/interchaintest/setup.go index aae98140..48228e2b 100644 --- a/interchaintest/setup.go +++ b/interchaintest/setup.go @@ -10,8 +10,8 @@ import ( ) const ( - initialVersion = "v6.0.3" // The last release of the chain. The one the mainnet is running on - upgradeName = "v7.0.0" // The next upgrade name. Should match the upgrade handler. + initialVersion = "v7.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" )