Skip to content

Commit

Permalink
add upgrade handler for amino patch
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown unknown committed Oct 1, 2024
1 parent 0046910 commit f29f4b0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/app_upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"

upgradetypes "cosmossdk.io/x/upgrade/types"

Check failure on line 6 in app/app_upgrades.go

View workflow job for this annotation

GitHub Actions / lint

File is not `goimports`-ed with -local github.com/archway-network/archway (goimports)
"github.com/archway-network/archway/app/upgrades/constantineupgrades"

"github.com/archway-network/archway/app/upgrades"
upgrade_0_6 "github.com/archway-network/archway/app/upgrades/06"
Expand All @@ -30,6 +31,9 @@ var Upgrades = []upgrades.Upgrade{
upgrade7_0_0.Upgrade, // v7.0.0
// upgrade8_0_0.Upgrade, // v8.0.0: was reserved for a consensus breaking wasmd upgrade
upgrade9_0_0.Upgrade, // v9.0.0

// constantine only
constantineupgrades.WASMD_50_Amino_Patch,
}

func (app *ArchwayApp) RegisterUpgradeHandlers() {
Expand Down
21 changes: 21 additions & 0 deletions app/upgrades/constantineupgrades/contantineupgrades.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package constantineupgrades

import (
"context"

storetypes "cosmossdk.io/store/types"
upgradetypes "cosmossdk.io/x/upgrade/types"

Check failure on line 7 in app/upgrades/constantineupgrades/contantineupgrades.go

View workflow job for this annotation

GitHub Actions / lint

File is not `goimports`-ed with -local github.com/archway-network/archway (goimports)

Check failure on line 7 in app/upgrades/constantineupgrades/contantineupgrades.go

View workflow job for this annotation

GitHub Actions / lint

File is not `goimports`-ed with -local github.com/archway-network/archway (goimports)
"github.com/archway-network/archway/app/keepers"
"github.com/archway-network/archway/app/upgrades"
"github.com/cosmos/cosmos-sdk/types/module"
)

var WASMD_50_Amino_Patch = upgrades.Upgrade{
UpgradeName: "wasmd_50_amino_patch",
CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator, _ keepers.ArchwayKeepers) upgradetypes.UpgradeHandler {
return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
return mm.RunMigrations(ctx, cfg, fromVM)
}
},
StoreUpgrades: storetypes.StoreUpgrades{},
}

0 comments on commit f29f4b0

Please sign in to comment.