Skip to content

Commit

Permalink
add v7 upgrade handler
Browse files Browse the repository at this point in the history
  • Loading branch information
affanv14 committed Aug 19, 2024
1 parent 5644e38 commit e16aa6f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 274 deletions.
12 changes: 6 additions & 6 deletions protocol/app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package app
import (
"fmt"

v6_0_0 "github.com/dydxprotocol/v4-chain/protocol/app/upgrades/v6.0.0"
v7_0_0 "github.com/dydxprotocol/v4-chain/protocol/app/upgrades/v7.0.0"

upgradetypes "cosmossdk.io/x/upgrade/types"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand All @@ -14,20 +14,20 @@ var (
// `Upgrades` defines the upgrade handlers and store loaders for the application.
// New upgrades should be added to this slice after they are implemented.
Upgrades = []upgrades.Upgrade{
v6_0_0.Upgrade,
v7_0_0.Upgrade,
}
Forks = []upgrades.Fork{}
)

// setupUpgradeHandlers registers the upgrade handlers to perform custom upgrade
// logic and state migrations for software upgrades.
func (app *App) setupUpgradeHandlers() {
if app.UpgradeKeeper.HasHandler(v6_0_0.UpgradeName) {
panic(fmt.Sprintf("Cannot register duplicate upgrade handler '%s'", v6_0_0.UpgradeName))
if app.UpgradeKeeper.HasHandler(v7_0_0.UpgradeName) {
panic(fmt.Sprintf("Cannot register duplicate upgrade handler '%s'", v7_0_0.UpgradeName))
}
app.UpgradeKeeper.SetUpgradeHandler(
v6_0_0.UpgradeName,
v6_0_0.CreateUpgradeHandler(
v7_0_0.UpgradeName,
v7_0_0.CreateUpgradeHandler(
app.ModuleManager,
app.configurator,
app.ClobKeeper,
Expand Down
266 changes: 0 additions & 266 deletions protocol/app/upgrades/v6.0.0/upgrade_container_test.go

This file was deleted.

2 changes: 1 addition & 1 deletion protocol/testing/version/VERSION_CURRENT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v6.0.0
v7.0.0
2 changes: 1 addition & 1 deletion protocol/testing/version/VERSION_PREUPGRADE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v5.2.0
v6.0.0

0 comments on commit e16aa6f

Please sign in to comment.