Skip to content

Commit

Permalink
Backport GL wasmd patch to 3.1.3/3.1.4 (#513)
Browse files Browse the repository at this point in the history
  • Loading branch information
StrathCole committed Sep 5, 2024
1 parent 203aa53 commit b06d49f
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import (
v7_1 "github.com/classic-terra/core/v3/app/upgrades/v7_1"
v8 "github.com/classic-terra/core/v3/app/upgrades/v8"
v8_1 "github.com/classic-terra/core/v3/app/upgrades/v8_1"
v8_2 "github.com/classic-terra/core/v3/app/upgrades/v8_2"

customante "github.com/classic-terra/core/v3/custom/auth/ante"
custompost "github.com/classic-terra/core/v3/custom/auth/post"
Expand Down Expand Up @@ -87,6 +88,7 @@ var (
v7_1.Upgrade,
v8.Upgrade,
v8_1.Upgrade,
v8_2.Upgrade,
}

// Forks defines forks to be applied to the network
Expand Down
13 changes: 13 additions & 0 deletions app/upgrades/v8_2/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//nolint:revive
package v8_2

import (
"github.com/classic-terra/core/v3/app/upgrades"
)

const UpgradeName = "v8_2"

var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: CreateV82UpgradeHandler,
}
21 changes: 21 additions & 0 deletions app/upgrades/v8_2/upgrades.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//nolint:revive
package v8_2

import (
"github.com/classic-terra/core/v3/app/keepers"
"github.com/classic-terra/core/v3/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 CreateV82UpgradeHandler(
mm *module.Manager,
cfg module.Configurator,
_ upgrades.BaseAppParamManager,
keepers *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=v3.0.3
OLD_VERSION=v3.1.3
# 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

0 comments on commit b06d49f

Please sign in to comment.