Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump: opinit to latest #20

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,16 @@
apphook.NewMoveBridgeHook(ac, app.MoveKeeper).Hook,
app.MsgServiceRouter(),
authorityAddr,
ac,
vc,
cc,
)

err = app.RegisterExecutorChangePlans()
if err != nil {
panic(err)

Check warning on line 377 in app/app.go

View check run for this annotation

Codecov / codecov/patch

app/app.go#L377

Added line #L377 was not covered by tests
}

// get skipUpgradeHeights from the app options
skipUpgradeHeights := map[int64]bool{}
for _, h := range cast.ToIntSlice(appOpts.Get(server.FlagUnsafeSkipUpgrades)) {
Expand Down
21 changes: 21 additions & 0 deletions app/executor_change.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package app

// Executor change plans

func (app *MinitiaApp) RegisterExecutorChangePlans() error {
// err := app.OPChildKeeper.RegisterExecutorChangePlan(
// 1,
// 361,
// "initvaloper158x0dpu5f4x703fhtseg5kpytsj02hw04qyw0t",
// "init158x0dpu5f4x703fhtseg5kpytsj02hw0p9ahpm",
// "op2",
// "{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"GTJEksmVK7gkzPXdj+YIJxipfJ+yYUlc6jzIuh9s2t0=\"}",
// "testestestestsetsetestsetest",
// )

// if err != nil {
// return err
// }

return nil
}
3 changes: 2 additions & 1 deletion app/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,11 @@ func SetupWithGenesisAccounts(
// set validators and delegations
var opchildGenesis opchildtypes.GenesisState
app.AppCodec().MustUnmarshalJSON(genesisState[opchildtypes.ModuleName], &opchildGenesis)
opchildGenesis.Params.Admin = sdk.AccAddress(valSet.Validators[0].Address.Bytes()).String()
opchildGenesis.Params.BridgeExecutor = sdk.AccAddress(valSet.Validators[0].Address.Bytes()).String()

// set validators and delegations
opchildGenesis = *opchildtypes.NewGenesisState(opchildGenesis.Params, validators)
opchildGenesis = *opchildtypes.NewGenesisState(opchildGenesis.Params, validators, nil)
genesisState[opchildtypes.ModuleName] = app.AppCodec().MustMarshalJSON(&opchildGenesis)

// update total supply
Expand Down
120 changes: 0 additions & 120 deletions cmd/minitiad/genvalidators.go

This file was deleted.

4 changes: 3 additions & 1 deletion cmd/minitiad/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ import (

"github.com/initia-labs/initia/app/params"
minitiaapp "github.com/initia-labs/minimove/app"

opchildcli "github.com/initia-labs/OPinit/x/opchild/client/cli"
)

// NewRootCmd creates a new root command for initiad. It is called once in the
Expand Down Expand Up @@ -181,7 +183,7 @@ func genesisCommand(encodingConfig params.EncodingConfig, basicManager module.Ba

cmd.AddCommand(
genutilcli.AddGenesisAccountCmd(minitiaapp.DefaultNodeHome, ac),
AddGenesisValidatorCmd(basicManager, encodingConfig.TxConfig, banktypes.GenesisBalancesIterator{}, minitiaapp.DefaultNodeHome),
opchildcli.AddGenesisValidatorCmd(basicManager, encodingConfig.TxConfig, banktypes.GenesisBalancesIterator{}, minitiaapp.DefaultNodeHome),
genutilcli.ValidateGenesisCmd(basicManager),
genutilcli.GenTxCmd(basicManager, encodingConfig.TxConfig, banktypes.GenesisBalancesIterator{}, minitiaapp.DefaultNodeHome, ac),
)
Expand Down
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ require (
github.com/cosmos/ibc-go/v8 v8.0.0
github.com/golang/mock v1.6.0
github.com/gorilla/mux v1.8.1
github.com/initia-labs/OPinit v0.2.2
github.com/initia-labs/OPinit v0.2.3-0.20240409080116-b1905ecee383
github.com/initia-labs/initia v0.2.3
// we also need to update `LIBMOVEVM_VERSION` of images/private/Dockerfile#5
github.com/initia-labs/movevm v0.2.2
Expand Down Expand Up @@ -133,6 +133,7 @@ require (
github.com/iancoleman/strcase v0.3.0 // indirect
github.com/improbable-eng/grpc-web v0.15.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/initia-labs/OPinit/api v0.0.0-20240409080116-b1905ecee383 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/klauspost/compress v1.17.7 // indirect
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -722,8 +722,10 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
github.com/initia-labs/OPinit v0.2.2 h1:lcBQCQcn7zgkpQaKqIfNLaj15Dy6qSDYv62/XJ1iISE=
github.com/initia-labs/OPinit v0.2.2/go.mod h1:1dn1iseG1S4wfXUtnb4mUkraJdL9/lWBQPpI+HbVzL0=
github.com/initia-labs/OPinit v0.2.3-0.20240409080116-b1905ecee383 h1:cQFjJi7tzyEiypbwNbPooiZhK4IFc1oJHOUL77nhouY=
github.com/initia-labs/OPinit v0.2.3-0.20240409080116-b1905ecee383/go.mod h1:1dn1iseG1S4wfXUtnb4mUkraJdL9/lWBQPpI+HbVzL0=
github.com/initia-labs/OPinit/api v0.0.0-20240409080116-b1905ecee383 h1:e+C945Wl9Pi24OHUjZjuq8tflzYaTh2xydgTD0BdVKo=
github.com/initia-labs/OPinit/api v0.0.0-20240409080116-b1905ecee383/go.mod h1:ASCaZChzhQenOxDLIBicEgi5drhMV3YjPxzV29nGvwM=
github.com/initia-labs/cometbft v0.0.0-20240104081544-34081fc84daf h1:7k3u0huB7OpiDfQKnfcwKUvByl7HyYs3itgROO/YpFg=
github.com/initia-labs/cometbft v0.0.0-20240104081544-34081fc84daf/go.mod h1:PIi48BpzwlHqtV3mzwPyQgOyOnU94BNBimLS2ebBHOg=
github.com/initia-labs/cosmos-sdk v0.0.0-20240313050640-ff14560eeb21 h1:AwqnO5IR+3LWzjqR33MzOkce38ExWLtQwlqrLZVrMyw=
Expand Down
Loading