Skip to content

Commit

Permalink
Merge branch 'main' into sai/396
Browse files Browse the repository at this point in the history
  • Loading branch information
gsk967 committed Jun 29, 2023
2 parents 49560e1 + 945b88c commit 5de809b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
21 changes: 20 additions & 1 deletion app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,29 @@ func (app UmeeApp) RegisterUpgradeHandlers(bool) {
app.registerUpgrade4_3(upgradeInfo)
app.registerUpgrade("v4.4", upgradeInfo)
app.registerUpgrade("v5.0", upgradeInfo, ugov.ModuleName, wasm.ModuleName)
app.registerUpgrade("v5.1-alpha1", upgradeInfo, incentive.ModuleName)
app.registerUpgrade5_1(upgradeInfo)
// TODO: set correct 5.1 name and add borrowFactor migration
}

func (app *UmeeApp) registerUpgrade5_1(upgradeInfo upgradetypes.Plan) {
planName := "v5.1"
app.UpgradeKeeper.SetUpgradeHandler(planName,
func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
app.storeUpgrade(planName, upgradeInfo, storetypes.StoreUpgrades{
Added: []string{incentive.ModuleName},
})

// TODO: set the correct drain account. This will panic if executed.
if err := app.GravityKeeper.MigrateFundsToDrainAccount(
ctx,
sdk.MustAccAddressFromBech32("the_drain_account"),
); err != nil {
return nil, err
}
return app.mm.RunMigrations(ctx, app.configurator, fromVM)
})
}

// performs upgrade from v4.2 to v4.3
func (app *UmeeApp) registerUpgrade4_3(upgradeInfo upgradetypes.Plan) {
const planName = "v4.3"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ require (

replace (
github.com/CosmWasm/wasmd => github.com/notional-labs/wasmd v0.31.0-umee.46
github.com/Gravity-Bridge/Gravity-Bridge/module => github.com/umee-network/Gravity-Bridge/module v1.5.3-umee-9
github.com/Gravity-Bridge/Gravity-Bridge/module => github.com/umee-network/Gravity-Bridge/module v1.5.3-umee-10
github.com/cosmos/cosmos-sdk => github.com/umee-network/cosmos-sdk v0.46.13-umee
// dgrijalva/jwt-go is deprecated and doesn't receive security updates.
github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1463,8 +1463,8 @@ github.com/ultraware/funlen v0.0.3 h1:5ylVWm8wsNwH5aWo9438pwvsK0QiqVuUrt9bn7S/iL
github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA=
github.com/ultraware/whitespace v0.0.5 h1:hh+/cpIcopyMYbZNVov9iSxvJU3OYQg78Sfaqzi/CzI=
github.com/ultraware/whitespace v0.0.5/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA=
github.com/umee-network/Gravity-Bridge/module v1.5.3-umee-9 h1:uo8+3gFo/EhQtjbiP7AfN0Pqx6ddFf9iWcvlfeChNsY=
github.com/umee-network/Gravity-Bridge/module v1.5.3-umee-9/go.mod h1:NR6UwQPZUoLckpOtCxgROWNEDzepe2JhxQ2u9cL+pbo=
github.com/umee-network/Gravity-Bridge/module v1.5.3-umee-10 h1:aKj8zwDz6vZO/mOVCgLvEKI9PbZaF3AH4UJKv5npElg=
github.com/umee-network/Gravity-Bridge/module v1.5.3-umee-10/go.mod h1:NR6UwQPZUoLckpOtCxgROWNEDzepe2JhxQ2u9cL+pbo=
github.com/umee-network/bech32-ibc v0.3.3 h1:wUX5uSYZl8yiFdttOvunfRihsE4miYmzl7pK2FEUs+U=
github.com/umee-network/bech32-ibc v0.3.3/go.mod h1:UbhzCKN+Z7RoUdCkAanmIy+wufwQ/aQJrDEoVORhC2Y=
github.com/umee-network/cosmos-sdk v0.46.13-umee h1:EeSalZHGoWdkKkCNhNd80jzRMNEQWLyDPUU5aUJQpIs=
Expand Down

0 comments on commit 5de809b

Please sign in to comment.