Skip to content

Commit

Permalink
Run account plus migration in v8 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
jayy04 committed Dec 6, 2024
1 parent 8c7d85f commit 76682cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions protocol/app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func (app *App) setupUpgradeHandlers() {
app.PricesKeeper,
app.PerpetualsKeeper,
app.ClobKeeper,
app.AccountPlusKeeper,
),
)
}
Expand Down
3 changes: 3 additions & 0 deletions protocol/app/upgrades/v8.0/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,14 @@ func CreateUpgradeHandler(
pricesKeeper pricestypes.PricesKeeper,
perpetualsKeeper perptypes.PerpetualsKeeper,
clobKeeper clobtypes.ClobKeeper,
accountplusKeeper accountpluskeeper.Keeper,
) upgradetypes.UpgradeHandler {
return func(ctx context.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
sdkCtx := lib.UnwrapSDKContext(ctx, "app/upgrades")
sdkCtx.Logger().Info(fmt.Sprintf("Running %s Upgrade...", UpgradeName))

MigrateAccountplusAccountState(sdkCtx, accountplusKeeper)

// Set market, perpetual, and clob ids to a set number
setMarketListingBaseIds(sdkCtx, pricesKeeper, perpetualsKeeper, clobKeeper)

Expand Down

0 comments on commit 76682cb

Please sign in to comment.