Skip to content

Commit

Permalink
chore: update documentation from cosmos-sdk/docs (#258)
Browse files Browse the repository at this point in the history
chore: Sync docs from cosmos-sdk/docs

Co-authored-by: tac0turtle <[email protected]>
  • Loading branch information
github-actions[bot] and tac0turtle authored Jan 14, 2025
1 parent 7ac809f commit 68a8ca2
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 6 deletions.
20 changes: 17 additions & 3 deletions docs/build/migrations/02-upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -469,9 +469,23 @@ Accounts's AccountNumber will be used as a global account number tracking replac
```go
import authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
...
err := authkeeper.MigrateAccountNumberUnsafe(ctx, &app.AuthKeeper)
if err != nil {
return nil, err
app.UpgradeKeeper.SetUpgradeHandler(planName,
func(ctx context.Context, _ upgradetypes.Plan, fromVM appmodule.VersionMap) (appmodule.VersionMap, error) {
if err := authkeeper.MigrateAccountNumberUnsafe(ctx, &app.AuthKeeper); err != nil {
return nil, err
}
return app.ModuleManager.RunMigrations(ctx, app.configurator, fromVM)
},
)
```

Add `x/accounts` store while upgrading to v0.52.x:

```go
storetypes.StoreUpgrades{
Added: []string{
accounts.StoreKey,
},
}
```

Expand Down
20 changes: 17 additions & 3 deletions versioned_docs/version-0.52/build/migrations/02-upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,23 @@ Accounts's AccountNumber will be used as a global account number tracking replac
```go
import authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
...
err := authkeeper.MigrateAccountNumberUnsafe(ctx, &app.AuthKeeper)
if err != nil {
return nil, err
app.UpgradeKeeper.SetUpgradeHandler(planName,
func(ctx context.Context, _ upgradetypes.Plan, fromVM appmodule.VersionMap) (appmodule.VersionMap, error) {
if err := authkeeper.MigrateAccountNumberUnsafe(ctx, &app.AuthKeeper); err != nil {
return nil, err
}
return app.ModuleManager.RunMigrations(ctx, app.configurator, fromVM)
},
)
```

Add `x/accounts` store while upgrading to v0.52.x:

```go
storetypes.StoreUpgrades{
Added: []string{
accounts.StoreKey,
},
}
```

Expand Down

0 comments on commit 68a8ca2

Please sign in to comment.