Skip to content

Commit

Permalink
add cosmos move
Browse files Browse the repository at this point in the history
  • Loading branch information
sh-cha committed Oct 30, 2024
1 parent 0d03d73 commit f31a628
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bytes"
"context"
"errors"
"fmt"

sdkerrors "cosmossdk.io/errors"
upgradetypes "cosmossdk.io/x/upgrade/types"
Expand Down Expand Up @@ -55,6 +56,10 @@ func (app *InitiaApp) RegisterUpgradeHandlers(cfg module.Configurator) {

err = app.MoveKeeper.VMStore.Walk(ctx, nil, func(key, value []byte) (stop bool, err error) {
cursor := movetypes.AddressBytesLength
if len(key) <= cursor {
return true, fmt.Errorf("invalid key length: %d", len(key))
}

separator := key[cursor]

if separator == movetypes.ModuleSeparator {
Expand Down Expand Up @@ -87,7 +92,7 @@ func (app *InitiaApp) RegisterUpgradeHandlers(cfg module.Configurator) {
}

// 3. update new modules
codesBz, err := vmprecompile.ReadStdlib("object_code_deployment.move", "coin.move", "dex.move", "json.move", "bech32.move", "hash.move")
codesBz, err := vmprecompile.ReadStdlib("object_code_deployment.move", "coin.move", "cosmos.move", "dex.move", "json.move", "bech32.move", "hash.move")
if err != nil {
return nil, err
}
Expand Down

0 comments on commit f31a628

Please sign in to comment.