Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: add uprade name v7_1 #467

Merged
merged 2 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import (
v6 "github.com/classic-terra/core/v2/app/upgrades/v6"
v6_1 "github.com/classic-terra/core/v2/app/upgrades/v6_1"
v7 "github.com/classic-terra/core/v2/app/upgrades/v7"
v7_1 "github.com/classic-terra/core/v2/app/upgrades/v7_1"

customante "github.com/classic-terra/core/v2/custom/auth/ante"
custompost "github.com/classic-terra/core/v2/custom/auth/post"
Expand All @@ -68,7 +69,7 @@ var (
DefaultNodeHome string

// Upgrades defines upgrades to be applied to the network
Upgrades = []upgrades.Upgrade{v2.Upgrade, v3.Upgrade, v4.Upgrade, v5.Upgrade, v6.Upgrade, v6_1.Upgrade, v7.Upgrade}
Upgrades = []upgrades.Upgrade{v2.Upgrade, v3.Upgrade, v4.Upgrade, v5.Upgrade, v6.Upgrade, v6_1.Upgrade, v7.Upgrade, v7_1.Upgrade}

// Forks defines forks to be applied to the network
Forks = []upgrades.Fork{}
Expand Down
14 changes: 14 additions & 0 deletions app/upgrades/v7_1/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package v7_1

Check warning on line 1 in app/upgrades/v7_1/constants.go

View workflow job for this annotation

GitHub Actions / golangci-lint

var-naming: don't use an underscore in package name (revive)

import (
"github.com/classic-terra/core/v2/app/upgrades"
store "github.com/cosmos/cosmos-sdk/store/types"
)

const UpgradeName = "v7_1"

var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: CreateV7_1UpgradeHandler,
StoreUpgrades: store.StoreUpgrades{},
}
20 changes: 20 additions & 0 deletions app/upgrades/v7_1/upgrades.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package v7_1

Check warning on line 1 in app/upgrades/v7_1/upgrades.go

View workflow job for this annotation

GitHub Actions / golangci-lint

var-naming: don't use an underscore in package name (revive)

import (
"github.com/classic-terra/core/v2/app/keepers"
"github.com/classic-terra/core/v2/app/upgrades"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
)

func CreateV7_1UpgradeHandler(
mm *module.Manager,
cfg module.Configurator,
_ upgrades.BaseAppParamManager,
_ *keepers.AppKeepers,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
return mm.RunMigrations(ctx, cfg, fromVM)
}
}
2 changes: 1 addition & 1 deletion contrib/updates/prepare_cosmovisor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# These fields should be fetched automatically in the future
# Need to do more upgrade to see upgrade patterns
OLD_VERSION=v2.3.0
OLD_VERSION=v2.4.2
# this command will retrieve the folder with the largest number in format v<number>
SOFTWARE_UPGRADE_NAME=$(ls -d -- ./app/upgrades/v* | sort -Vr | head -n 1 | xargs basename)
BUILDDIR=$1
Expand Down
Loading