diff --git a/.github/config/.codespellignore b/.github/config/.codespellignore new file mode 100644 index 0000000..a08537a --- /dev/null +++ b/.github/config/.codespellignore @@ -0,0 +1,11 @@ +cips +pullrequest +keypair +pastTime +hasTables +Nam +EyT +upTo +initia +minitia +expRes diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml new file mode 100644 index 0000000..3c9e159 --- /dev/null +++ b/.github/workflows/spellcheck.yml @@ -0,0 +1,28 @@ +name: Spell Check + +on: + pull_request: + +jobs: + spellcheck: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Run codespell + continue-on-error: true + run: | + sudo apt-get install codespell -y + codespell -w --skip="*.pulsar.go,*.pb.go,*.pb.gw.go,*.cosmos_orm.go,*.json,*.git,*.js,crypto/keys,fuzz,*.h,proto/tendermint,*.bin,go.sum,go.work.sum,go.mod,statik.go,*.map,swagger.yaml" --ignore-words=.github/config/.codespellignore + - uses: peter-evans/create-pull-request@v7.0.5 + if: github.event_name != 'pull_request' + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: "chore: fix typos" + title: "chore: fix typos" + branch: "chore/fix-typos" + delete-branch: true + body: | + This PR fixes typos in the codebase. + Please review it, and merge if everything is fine. + If there are proto changes, run `make proto-gen` and commit the changes. diff --git a/contrib/launchtools/config.go b/contrib/launchtools/config.go index e9d699b..6f412e7 100644 --- a/contrib/launchtools/config.go +++ b/contrib/launchtools/config.go @@ -251,8 +251,8 @@ func (l1config *L1Config) Finalize(buf *bufio.Reader) error { if l1config.RPC_URL == "" { defaultRPC := fmt.Sprintf("https://rpc.%s.initia.xyz:443", l1config.ChainID) - promt := fmt.Sprintf("Use default L1 rpc [%s]?", defaultRPC) - useDefault, err := input.GetConfirmation(promt, buf, os.Stderr) + prompt := fmt.Sprintf("Use default L1 rpc [%s]?", defaultRPC) + useDefault, err := input.GetConfirmation(prompt, buf, os.Stderr) if err != nil { return err } diff --git a/contrib/launchtools/steps/ibc.go b/contrib/launchtools/steps/ibc.go index e83c054..e349f4c 100644 --- a/contrib/launchtools/steps/ibc.go +++ b/contrib/launchtools/steps/ibc.go @@ -82,7 +82,7 @@ func initializeConfig(r *Relayer) error { } // initializeChains creates chain configuration files and initializes chains for the relayer -// "chains" in cosmos/relayer lingo means srcChain and dstChain. Speficic ports are not created here. +// "chains" in cosmos/relayer lingo means srcChain and dstChain. Specific ports are not created here. // see initializePaths. func initializeChains(config *launchtools.Config, basePath string) func(*Relayer) error { // ChainConfig is a struct that represents the configuration of a chain diff --git a/proto/opinit/ophost/v1/types.proto b/proto/opinit/ophost/v1/types.proto index affeee1..08a462d 100644 --- a/proto/opinit/ophost/v1/types.proto +++ b/proto/opinit/ophost/v1/types.proto @@ -45,7 +45,7 @@ message BridgeConfig { (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; - // The minium time duration that must elapse before a withdrawal can be finalized. + // The minimum time duration that must elapse before a withdrawal can be finalized. google.protobuf.Duration finalization_period = 5 [ (gogoproto.stdduration) = true, (gogoproto.jsontag) = "finalization_period,omitempty", diff --git a/specs/l2_output_oracle.md b/specs/l2_output_oracle.md index d8f4f93..5c7620a 100644 --- a/specs/l2_output_oracle.md +++ b/specs/l2_output_oracle.md @@ -10,7 +10,7 @@ The first version of the implementation does not include a dispute system, but u L2 output oracle receives `output_root` with L2 block number to check the checkpoint of L2. The checkpoints are the multiple of `submission_interval`. A proposer must submit the `output_root` at the every checkpoints. -The followings are the components of `output_root`. +The following are the components of `output_root`. - `version`: the version of output root - `state_root`: l2 state root diff --git a/x/opchild/keeper/msg_server.go b/x/opchild/keeper/msg_server.go index b220a5b..575a425 100644 --- a/x/opchild/keeper/msg_server.go +++ b/x/opchild/keeper/msg_server.go @@ -406,7 +406,7 @@ func (ms MsgServer) FinalizeTokenDeposit(ctx context.Context, req *types.MsgFina depositSuccess, reason = ms.safeDepositToken(ctx, toAddr, sdk.NewCoins(coin)) } - // updae l1 sequence + // update l1 sequence if _, err := ms.IncreaseNextL1Sequence(ctx); err != nil { return nil, err } @@ -459,7 +459,7 @@ func (ms MsgServer) FinalizeTokenDeposit(ctx context.Context, req *types.MsgFina // emit deposit event sdkCtx.EventManager().EmitEvent(event) - // if the deposit is failed, initate a withdrawal + // if the deposit is failed, initiate a withdrawal if !depositSuccess || !hookSuccess { if depositSuccess { // reclaim and burn coins diff --git a/x/opchild/types/errors.go b/x/opchild/types/errors.go index 7f486a6..57be19a 100644 --- a/x/opchild/types/errors.go +++ b/x/opchild/types/errors.go @@ -19,7 +19,7 @@ var ( ErrZeroMaxValidators = errorsmod.Register(ModuleName, 12, "max validators must be non-zero") ErrInvalidExecuteMsg = errorsmod.Register(ModuleName, 13, "invalid execute message") ErrUnroutableExecuteMsg = errorsmod.Register(ModuleName, 14, "unroutable execute message") - ErrInvalidExecutorChangePlan = errorsmod.Register(ModuleName, 15, "invalid executor chane plan") + ErrInvalidExecutorChangePlan = errorsmod.Register(ModuleName, 15, "invalid executor change plan") ErrAlreadyRegisteredHeight = errorsmod.Register(ModuleName, 16, "executor change plan already exists at the height") ErrInvalidBridgeInfo = errorsmod.Register(ModuleName, 17, "invalid bridge info") ErrInvalidHeight = errorsmod.Register(ModuleName, 18, "invalid oracle height") diff --git a/x/ophost/keeper/msg_server.go b/x/ophost/keeper/msg_server.go index b530dc9..ef3ec42 100644 --- a/x/ophost/keeper/msg_server.go +++ b/x/ophost/keeper/msg_server.go @@ -183,7 +183,7 @@ func (ms MsgServer) DeleteOutput(ctx context.Context, req *types.MsgDeleteOutput return nil, err } - // gov, current propoer or current challenger can delete output. + // gov, current proper or current challenger can delete output. if ms.authority != challenger && bridgeConfig.Proposer != challenger && bridgeConfig.Challenger != challenger { return nil, errors.ErrUnauthorized.Wrapf("invalid challenger; expected %s, %s or %s, got %s", ms.authority, bridgeConfig.Proposer, bridgeConfig.Challenger, challenger) }