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

Run account plus migration in v8 upgrade (backport #2628) #2629

Merged
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
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
Loading