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/submodules/evm-nft/collect.go b/submodules/evm-nft/collect.go index f3e2180..a6884b2 100644 --- a/submodules/evm-nft/collect.go +++ b/submodules/evm-nft/collect.go @@ -140,7 +140,7 @@ func (sm EvmNFTSubmodule) handlerTransferEvent(ctx context.Context, event *types token, err := sm.tokenMap.Get(ctx, tpk) if err != nil { - sm.Logger(ctx).Debug("failed to get nft from prev owner and object addres", "collection-addr", event.Address, "token-id", event.TokenId, "prevOwner", event.From, "error", err) + sm.Logger(ctx).Debug("failed to get nft from prev owner and object address", "collection-addr", event.Address, "token-id", event.TokenId, "prevOwner", event.From, "error", err) return cosmoserr.Wrap(err, "failed to get nft from tokenMap") } token.OwnerAddr = event.To.String() diff --git a/submodules/move-nft/collect.go b/submodules/move-nft/collect.go index c39400e..d3773a3 100644 --- a/submodules/move-nft/collect.go +++ b/submodules/move-nft/collect.go @@ -161,7 +161,7 @@ func (sm MoveNftSubmodule) handlerTransferEvent(ctx context.Context, event types sm.Logger(ctx).Debug("nft not found, maybe not NFT related object transfer", "object", objectSdkAddr.String(), "prevOwner", fromSdkAddr.String()) return nil } - sm.Logger(ctx).Info("failed to get nft from prev owner and object addres", "err", err, "object", objectSdkAddr.String(), "prev", fromSdkAddr.String()) + sm.Logger(ctx).Info("failed to get nft from prev owner and object address", "err", err, "object", objectSdkAddr.String(), "prev", fromSdkAddr.String()) return err } diff --git a/submodules/pair/types/types.go b/submodules/pair/types/types.go index 212e506..3acb440 100644 --- a/submodules/pair/types/types.go +++ b/submodules/pair/types/types.go @@ -29,7 +29,7 @@ type TokenPairsResponse struct { type MetadataResource struct { Resource struct { - Adddress string `json:"address"` + Address string `json:"address"` StructTag string `json:"struct_tag"` MoveResource string `json:"move_resource"` RawBytes []byte `json:"raw_bytes"` diff --git a/submodules/wasm-pair/types/types.go b/submodules/wasm-pair/types/types.go index 18f424b..e07a731 100644 --- a/submodules/wasm-pair/types/types.go +++ b/submodules/wasm-pair/types/types.go @@ -29,7 +29,7 @@ type TokenPairsResponse struct { type MetadataResource struct { Resource struct { - Adddress string `json:"address"` + Address string `json:"address"` StructTag string `json:"struct_tag"` MoveResource string `json:"move_resource"` RawBytes []byte `json:"raw_bytes"` diff --git a/x/kvindexer/keeper/keeper.go b/x/kvindexer/keeper/keeper.go index b9dd734..c40bf1f 100644 --- a/x/kvindexer/keeper/keeper.go +++ b/x/kvindexer/keeper/keeper.go @@ -50,7 +50,7 @@ func (k Keeper) Close() error { } // NewKeeper creates a new indexer Keeper instance -// TODO: remove unncessary arguments +// TODO: remove unnecessary arguments func NewKeeper( cdc codec.Codec, vmType string,