Skip to content

Commit

Permalink
update params oracle
Browse files Browse the repository at this point in the history
  • Loading branch information
DongLieu committed Nov 27, 2024
1 parent 7d6227a commit 9cbaeca
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ import (
v2_0_0 "github.com/onomyprotocol/onomy/app/upgrades/v2.0.0"
v2_1_0 "github.com/onomyprotocol/onomy/app/upgrades/v2.1.0"
v2_1_1 "github.com/onomyprotocol/onomy/app/upgrades/v2.1.1"
v2_1_2 "github.com/onomyprotocol/onomy/app/upgrades/v2.1.2"
"github.com/onomyprotocol/onomy/docs"
)

Expand Down Expand Up @@ -464,6 +465,7 @@ func (app *OnomyApp) setupUpgradeHandlers() {
app.UpgradeKeeper.SetUpgradeHandler(v2_0_0.Name, v2_0_0.CreateUpgradeHandler(app.mm, app.configurator, &app.AppKeepers))
app.UpgradeKeeper.SetUpgradeHandler(v2_1_0.Name, v2_1_0.CreateUpgradeHandler(app.mm, app.configurator, &app.AppKeepers))
app.UpgradeKeeper.SetUpgradeHandler(v2_1_1.Name, v2_1_1.CreateUpgradeHandler(app.mm, app.configurator, &app.AppKeepers))
app.UpgradeKeeper.SetUpgradeHandler(v2_1_2.Name, v2_1_2.CreateUpgradeHandler(app.mm, app.configurator, &app.AppKeepers))

upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk()
if err != nil {
Expand Down
32 changes: 32 additions & 0 deletions app/upgrades/v2.1.2/upgrade.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Package v1_1_4 is contains chain upgrade of the corresponding version.
package v2_1_1 //nolint:revive,stylecheck // app version

import (
"context"
upgradetypes "cosmossdk.io/x/upgrade/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"

"github.com/onomyprotocol/onomy/app/keepers"
)

// Name is migration name.
const Name = "v2.1.2"

// UpgradeHandler is an x/upgrade handler.
func CreateUpgradeHandler(
mm *module.Manager,
configurator module.Configurator,
keepers *keepers.AppKeepers,
) upgradetypes.UpgradeHandler {

return func(c context.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
ctx := sdk.UnwrapSDKContext(c)
vm, err := mm.RunMigrations(ctx, configurator, vm)
if err != nil {
return vm, err
}

return vm, nil
}
}

0 comments on commit 9cbaeca

Please sign in to comment.