-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/iliad' into release/0.11
- Loading branch information
Showing
19 changed files
with
708 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
//nolint:revive,stylecheck // version underscores | ||
package v0_11_0 | ||
|
||
import ( | ||
storetypes "cosmossdk.io/store/types" | ||
|
||
"github.com/piplabs/story/client/app/upgrades" | ||
) | ||
|
||
const UpgradeName = "v0.11.0" | ||
|
||
var Upgrade = upgrades.Upgrade{ | ||
UpgradeName: UpgradeName, | ||
CreateUpgradeHandler: CreateUpgradeHandler, | ||
StoreUpgrades: storetypes.StoreUpgrades{}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
//nolint:revive,stylecheck // version underscores | ||
package v0_11_0 | ||
|
||
import ( | ||
"context" | ||
|
||
upgradetypes "cosmossdk.io/x/upgrade/types" | ||
|
||
"github.com/cosmos/cosmos-sdk/types/module" | ||
|
||
"github.com/piplabs/story/client/app/keepers" | ||
"github.com/piplabs/story/lib/errors" | ||
clog "github.com/piplabs/story/lib/log" | ||
) | ||
|
||
func CreateUpgradeHandler( | ||
mm *module.Manager, | ||
configurator module.Configurator, | ||
keepers *keepers.Keepers, | ||
) upgradetypes.UpgradeHandler { | ||
return func(ctx context.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { | ||
clog.Info(ctx, "Starting module migrations...") | ||
|
||
vm, err := mm.RunMigrations(ctx, configurator, vm) | ||
if err != nil { | ||
return vm, errors.Wrap(err, "run migrations") | ||
} | ||
|
||
clog.Info(ctx, "Upgrade v0.11.0 complete") | ||
|
||
return vm, nil | ||
} | ||
} |
Oops, something went wrong.