From 29155f5f733bd2b3e93511a48315236d869bfd7d Mon Sep 17 00:00:00 2001 From: momodaka <463435681@qq.com> Date: Sat, 23 Mar 2024 00:23:47 +0800 Subject: [PATCH 1/3] docs: fix all typos --- app/ante/cosmos/authz.go | 2 +- app/ante/cosmos/min_price.go | 2 +- app/ante/evm/eth_test.go | 2 +- app/ante/evm/utils_test.go | 4 ++-- crypto/ethsecp256k1/keys.pb.go | 2 +- ibc/testing/endpoint.go | 2 +- types/account.pb.go | 2 +- types/dynamic_fee.pb.go | 2 +- types/gasmeter.go | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/ante/cosmos/authz.go b/app/ante/cosmos/authz.go index 8bcd608..18714a4 100644 --- a/app/ante/cosmos/authz.go +++ b/app/ante/cosmos/authz.go @@ -54,7 +54,7 @@ func (ald AuthzLimiterDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate // maxNestedMsgs threshold. If there are more than that limit, it returns an error func (ald AuthzLimiterDecorator) checkDisabledMsgs(msgs []sdk.Msg, isAuthzInnerMsg bool, nestedLvl int) error { if nestedLvl >= maxNestedMsgs { - return fmt.Errorf("found more nested msgs than permited. Limit is : %d", maxNestedMsgs) + return fmt.Errorf("found more nested msgs than permitted. Limit is : %d", maxNestedMsgs) } for _, msg := range msgs { switch msg := msg.(type) { diff --git a/app/ante/cosmos/min_price.go b/app/ante/cosmos/min_price.go index d87000c..308900d 100644 --- a/app/ante/cosmos/min_price.go +++ b/app/ante/cosmos/min_price.go @@ -77,7 +77,7 @@ func (mpd MinGasPriceDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate // Fees not provided (or flag "auto"). Then use the base fee to make the check pass if feeCoins == nil { return ctx, errorsmod.Wrapf(errortypes.ErrInsufficientFee, - "fee not provided. Please use the --fees flag or the --gas-price flag along with the --gas flag to estimate the fee. The minimun global fee for this tx is: %s", + "fee not provided. Please use the --fees flag or the --gas-price flag along with the --gas flag to estimate the fee. The minimum global fee for this tx is: %s", requiredFees) } diff --git a/app/ante/evm/eth_test.go b/app/ante/evm/eth_test.go index f165715..e8b9420 100644 --- a/app/ante/evm/eth_test.go +++ b/app/ante/evm/eth_test.go @@ -142,7 +142,7 @@ func (suite *AnteTestSuite) TestEthNonceVerificationDecorator() { {"invalid transaction type", &testutiltx.InvalidTx{}, func() {}, false, false}, {"sender account not found", tx, func() {}, false, false}, { - "sender nonce missmatch", + "sender nonce mismatch", tx, func() { acc := suite.app.AccountKeeper.NewAccountWithAddress(suite.ctx, addr.Bytes()) diff --git a/app/ante/evm/utils_test.go b/app/ante/evm/utils_test.go index 42d40b1..7561741 100644 --- a/app/ante/evm/utils_test.go +++ b/app/ante/evm/utils_test.go @@ -213,7 +213,7 @@ func (suite *AnteTestSuite) CreateTestEIP712MsgCreateValidator(from sdk.AccAddre valAddr, privEd.PubKey(), sdk.NewCoin(evmtypes.DefaultEVMDenom, sdk.NewInt(20)), - stakingtypes.NewDescription("moniker", "indentity", "website", "security_contract", "details"), + stakingtypes.NewDescription("moniker", "identity", "website", "security_contract", "details"), stakingtypes.NewCommissionRates(sdk.OneDec(), sdk.OneDec(), sdk.OneDec()), sdk.OneInt(), ) @@ -230,7 +230,7 @@ func (suite *AnteTestSuite) CreateTestEIP712MsgCreateValidator2(from sdk.AccAddr privEd.PubKey(), sdk.NewCoin(evmtypes.DefaultEVMDenom, sdk.NewInt(20)), // Ensure optional fields can be left blank - stakingtypes.NewDescription("moniker", "indentity", "", "", ""), + stakingtypes.NewDescription("moniker", "identity", "", "", ""), stakingtypes.NewCommissionRates(sdk.OneDec(), sdk.OneDec(), sdk.OneDec()), sdk.OneInt(), ) diff --git a/crypto/ethsecp256k1/keys.pb.go b/crypto/ethsecp256k1/keys.pb.go index 6ba162d..1b3788d 100644 --- a/crypto/ethsecp256k1/keys.pb.go +++ b/crypto/ethsecp256k1/keys.pb.go @@ -494,7 +494,7 @@ func skipKeys(dAtA []byte) (n int, err error) { } var ( - ErrInvalidLengthKeys = fmt.Errorf("proto: negative length found during unmarshaling") + ErrInvalidLengthKeys = fmt.Errorf("proto: negative length found during unmarshalling") ErrIntOverflowKeys = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupKeys = fmt.Errorf("proto: unexpected end of group") ) diff --git a/ibc/testing/endpoint.go b/ibc/testing/endpoint.go index c4f4693..a2f4eed 100644 --- a/ibc/testing/endpoint.go +++ b/ibc/testing/endpoint.go @@ -57,7 +57,7 @@ func NewDefaultEndpoint(chain *ibctesting.TestChain) *Endpoint { } } -// QueryProof queries proof associated with this endpoint using the lastest client state +// QueryProof queries proof associated with this endpoint using the latest client state // height on the counterparty chain. func (endpoint *Endpoint) QueryProof(key []byte) ([]byte, clienttypes.Height) { // obtain the counterparty client representing the chain associated with the endpoint diff --git a/types/account.pb.go b/types/account.pb.go index 70ae876..a363c41 100644 --- a/types/account.pb.go +++ b/types/account.pb.go @@ -370,7 +370,7 @@ func skipAccount(dAtA []byte) (n int, err error) { } var ( - ErrInvalidLengthAccount = fmt.Errorf("proto: negative length found during unmarshaling") + ErrInvalidLengthAccount = fmt.Errorf("proto: negative length found during unmarshalling") ErrIntOverflowAccount = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupAccount = fmt.Errorf("proto: unexpected end of group") ) diff --git a/types/dynamic_fee.pb.go b/types/dynamic_fee.pb.go index f88c1cf..09cdce6 100644 --- a/types/dynamic_fee.pb.go +++ b/types/dynamic_fee.pb.go @@ -315,7 +315,7 @@ func skipDynamicFee(dAtA []byte) (n int, err error) { } var ( - ErrInvalidLengthDynamicFee = fmt.Errorf("proto: negative length found during unmarshaling") + ErrInvalidLengthDynamicFee = fmt.Errorf("proto: negative length found during unmarshalling") ErrIntOverflowDynamicFee = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupDynamicFee = fmt.Errorf("proto: unexpected end of group") ) diff --git a/types/gasmeter.go b/types/gasmeter.go index 5dca0de..c7140de 100644 --- a/types/gasmeter.go +++ b/types/gasmeter.go @@ -86,7 +86,7 @@ func (g *infiniteGasMeterWithLimit) ConsumeGas(amount sdk.Gas, descriptor string // RefundGas will deduct the given amount from the gas consumed. If the amount is greater than the // gas consumed, the function will panic. // -// Use case: This functionality enables refunding gas to the trasaction or block gas pools so that +// Use case: This functionality enables refunding gas to the transaction or block gas pools so that // EVM-compatible chains can fully support the go-ethereum StateDb interface. // See https://github.com/cosmos/cosmos-sdk/pull/9403 for reference. func (g *infiniteGasMeterWithLimit) RefundGas(amount sdk.Gas, descriptor string) { From cf983e14d5bcd3843bbc6c7cd2d2ad25d37996eb Mon Sep 17 00:00:00 2001 From: momodaka <463435681@qq.com> Date: Sat, 23 Mar 2024 00:25:27 +0800 Subject: [PATCH 2/3] docs: fix all typos --- rpc/backend/account_info_test.go | 2 +- rpc/backend/node_info.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rpc/backend/account_info_test.go b/rpc/backend/account_info_test.go index 8307576..c2269c5 100644 --- a/rpc/backend/account_info_test.go +++ b/rpc/backend/account_info_test.go @@ -91,7 +91,7 @@ func (suite *BackendTestSuite) TestGetProof() { expAccRes *rpctypes.AccountResult }{ { - "fail - BlockNumeber = 1 (invalidBlockNumber)", + "fail - BlockNumber = 1 (invalidBlockNumber)", address1, []string{}, rpctypes.BlockNumberOrHash{BlockNumber: &blockNrInvalid}, diff --git a/rpc/backend/node_info.go b/rpc/backend/node_info.go index 4d6c276..0f6fcbd 100644 --- a/rpc/backend/node_info.go +++ b/rpc/backend/node_info.go @@ -114,10 +114,10 @@ func (b *Backend) SetEtherbase(etherbase common.Address) bool { return false } - // Fetch minimun gas price to calculate fees using the configuration. + // Fetch minimum gas price to calculate fees using the configuration. minGasPrices := b.cfg.GetMinGasPrices() if len(minGasPrices) == 0 || minGasPrices.Empty() { - b.logger.Debug("the minimun fee is not set") + b.logger.Debug("the minimum fee is not set") return false } minGasPriceValue := minGasPrices[0].Amount From 8127ac424dd38b75b500fb80ae84c78c3698cebd Mon Sep 17 00:00:00 2001 From: momodaka <463435681@qq.com> Date: Sat, 23 Mar 2024 00:26:04 +0800 Subject: [PATCH 3/3] docs: fix all typos --- _typos.toml | 5 +++++ rpc/backend/chain_info_test.go | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 _typos.toml diff --git a/_typos.toml b/_typos.toml new file mode 100644 index 0000000..146c75d --- /dev/null +++ b/_typos.toml @@ -0,0 +1,5 @@ +[files] +# Temporarily commenting a lot so that at least *.sol files are included. +extend-exclude = [ + "x/**", +] diff --git a/rpc/backend/chain_info_test.go b/rpc/backend/chain_info_test.go index b4ee489..ad62eab 100644 --- a/rpc/backend/chain_info_test.go +++ b/rpc/backend/chain_info_test.go @@ -296,8 +296,8 @@ func (suite *BackendTestSuite) TestGlobalMinGasPrice() { { "fail - Can't get FeeMarket params", func() { - feeMarketCleint := suite.backend.queryClient.FeeMarket.(*mocks.FeeMarketQueryClient) - RegisterFeeMarketParamsError(feeMarketCleint, int64(1)) + feeMarketClient := suite.backend.queryClient.FeeMarket.(*mocks.FeeMarketQueryClient) + RegisterFeeMarketParamsError(feeMarketClient, int64(1)) }, sdk.ZeroDec(), false,