diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 000000000..70d36bce6 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,4 @@ +[codespell] +skip = *.rs,*.json,*.js,*.html,*.d,*.sum,go.mod,*/statik.go,./docs,*.pb.*,./interchaintest +quiet-level = 2 +ignore-words = .github/workflows/spell-check-ignore.txt \ No newline at end of file diff --git a/.github/workflows/spell-check-ignore.txt b/.github/workflows/spell-check-ignore.txt new file mode 100644 index 000000000..be9fab424 --- /dev/null +++ b/.github/workflows/spell-check-ignore.txt @@ -0,0 +1,2 @@ +junodd +crate \ No newline at end of file diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml new file mode 100644 index 000000000..7fa0a485a --- /dev/null +++ b/.github/workflows/spell-check.yml @@ -0,0 +1,24 @@ +name: Spell Check + +on: + pull_request: + +jobs: + spellcheck: + name: Run codespell + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Install codespell + run: pip install codespell + + - name: Run codespell + run: codespell \ No newline at end of file diff --git a/app/upgrades/types.go b/app/upgrades/types.go index cdc376cfe..508f8a8bf 100644 --- a/app/upgrades/types.go +++ b/app/upgrades/types.go @@ -13,7 +13,7 @@ import ( "github.com/CosmosContracts/juno/v19/app/keepers" ) -// BaseAppParamManager defines an interrace that BaseApp is expected to fullfil +// BaseAppParamManager defines an interrace that BaseApp is expected to fulfil // that allows upgrade handlers to modify BaseApp parameters. type BaseAppParamManager interface { GetConsensusParams(ctx sdk.Context) *tmproto.ConsensusParams diff --git a/app/upgrades/v15/upgrades.go b/app/upgrades/v15/upgrades.go index d257332f3..7b7fee4eb 100644 --- a/app/upgrades/v15/upgrades.go +++ b/app/upgrades/v15/upgrades.go @@ -27,7 +27,7 @@ func CreateV15PatchUpgradeHandler( logger.Info(fmt.Sprintf("post migrate version map: %v", versionMap)) // x/TokenFactory - // Use denom creation gas consumtion instead of fee for contract developers + // Use denom creation gas consumption instead of fee for contract developers updatedTf := tokenfactorytypes.Params{ DenomCreationFee: nil, DenomCreationGasConsume: NewDenomCreationGasConsume, diff --git a/cmd/junod/cmd/config.go b/cmd/junod/cmd/config.go index a77fe9fdf..4746a99e1 100644 --- a/cmd/junod/cmd/config.go +++ b/cmd/junod/cmd/config.go @@ -151,7 +151,7 @@ func runConfigCmd(cmd *cobra.Command, args []string) error { } default: - panic("cound not execute config command") + panic("could not execute config command") } return nil diff --git a/proto/juno/mint/genesis.proto b/proto/juno/mint/genesis.proto index 80eca7dea..bdb5bdda3 100755 --- a/proto/juno/mint/genesis.proto +++ b/proto/juno/mint/genesis.proto @@ -11,6 +11,6 @@ message GenesisState { // minter is a space for holding current inflation information. Minter minter = 1 [ (gogoproto.nullable) = false ]; - // params defines all the paramaters of the module. + // params defines all the parameters of the module. Params params = 2 [ (gogoproto.nullable) = false ]; } diff --git a/proto/osmosis/tokenfactory/v1beta1/genesis.proto b/proto/osmosis/tokenfactory/v1beta1/genesis.proto index 09df7e3f8..57612b9b9 100755 --- a/proto/osmosis/tokenfactory/v1beta1/genesis.proto +++ b/proto/osmosis/tokenfactory/v1beta1/genesis.proto @@ -9,7 +9,7 @@ option go_package = "github.com/CosmosContracts/juno/x/tokenfactory/types"; // GenesisState defines the tokenfactory module's genesis state. message GenesisState { - // params defines the paramaters of the module. + // params defines the parameters of the module. Params params = 1 [ (gogoproto.nullable) = false ]; repeated GenesisDenom factory_denoms = 2 [ diff --git a/scripts/hermes/cw20/run.sh b/scripts/hermes/cw20/run.sh index 0d5ac90d5..b42a754b5 100644 --- a/scripts/hermes/cw20/run.sh +++ b/scripts/hermes/cw20/run.sh @@ -22,11 +22,11 @@ function upload_cw20 { echo "Storing $TYPE contract..." TX=$(junod tx wasm store ./scripts/hermes/cw20/cw20_base.wasm $JUNOD_COMMAND_ARGS | jq -r '.txhash') && echo "$TX" CW_CODE_ID=$(junod q tx $TX --output json --node http://localhost:26657 | jq -r '.logs[0].events[] | select(.type == "store_code").attributes[] | select(.key == "code_id").value') && echo "Code Id: $CW_CODE_ID" - + echo "Instantiating $TYPE contract..." INIT_JSON=`printf '{"name":"reece","symbol":"pbcup","decimals":6,"initial_balances":[{"address":"%s","amount":"10000"}]}' $KEY_ADDR` TX_UPLOAD=$(junod tx wasm instantiate "$CW_CODE_ID" $INIT_JSON --label "e2e-$TYPE" $JUNOD_COMMAND_ARGS --admin $KEY_ADDR | jq -r '.txhash') && echo $TX_UPLOAD - export CW20_CONTRACT=$(junod query tx $TX_UPLOAD --output json | jq -r '.logs[0].events[0].attributes[0].value') && echo "CW20_CONTRACT: $CW20_CONTRACT" + export CW20_CONTRACT=$(junod query tx $TX_UPLOAD --output json | jq -r '.logs[0].events[0].attributes[0].value') && echo "CW20_CONTRACT: $CW20_CONTRACT" } # This only allows the above CW20_CONTRACT token to be sent. Can add more if you want with the execute "allow" JSON @@ -37,12 +37,12 @@ function upload_cw20_ics20 { echo "Storing $TYPE contract..." TX=$(junod tx wasm store ./scripts/hermes/cw20/cw20_ics20.wasm $JUNOD_COMMAND_ARGS | jq -r '.txhash') && echo "$TX" CW_CODE_ID=$(junod q tx $TX --output json --node http://localhost:26657 | jq -r '.logs[0].events[] | select(.type == "store_code").attributes[] | select(.key == "code_id").value') && echo "Code Id: $CW_CODE_ID" - + echo "Instantiating $TYPE contract..." # INIT_JSON=`printf '{"name":"reece","symbol":"pbcup","decimals":6,"initial_balances":[{"address":"%s","amount":"10000"}]}' $KEY_ADDR` - INIT_JSON=`printf '{"default_timeout":10000,"gov_contract":"%s","allowlist":[{"contract":"%s","gas_limit":500000}]}' $KEY_ADDR $CW20_CONTRACT` + INIT_JSON=`printf '{"default_timeout":10000,"gov_contract":"%s","allowlist":[{"contract":"%s","gas_limit":500000}]}' $KEY_ADDR $CW20_CONTRACT` TX_UPLOAD=$(junod tx wasm instantiate "$CW_CODE_ID" $INIT_JSON --label "e2e-$TYPE" $JUNOD_COMMAND_ARGS --admin $KEY_ADDR | jq -r '.txhash') && echo $TX_UPLOAD - export ICS20_CONTRACT=$(junod query tx $TX_UPLOAD --output json | jq -r '.logs[0].events[0].attributes[0].value') && echo "ICS20_CONTRACT: $ICS20_CONTRACT" + export ICS20_CONTRACT=$(junod query tx $TX_UPLOAD --output json | jq -r '.logs[0].events[0].attributes[0].value') && echo "ICS20_CONTRACT: $ICS20_CONTRACT" } @@ -71,5 +71,5 @@ junod query wasm contract-state smart "$CW20_CONTRACT" '{"balance":{"address":"j junod q ibc-transfer denom-traces --node http://localhost:36657 -# Has a new IBC token denom which is the transfered one +# Has a new IBC token denom which is the transferred one junod q bank balances juno1efd63aw40lxf3n4mhf7dzhjkr453axurv2zdzk --node http://localhost:36657 \ No newline at end of file diff --git a/scripts/hermes/start.sh b/scripts/hermes/start.sh index 2070e12c9..50a0ab92a 100644 --- a/scripts/hermes/start.sh +++ b/scripts/hermes/start.sh @@ -31,9 +31,9 @@ export HERMES="hermes --config $FOLDER/$config" # export HERMES="hermes --config ./scripts/hermes/config.toml" # First, lets make sure our chains are running and are healthy. -# Exit if theres an error. -{ - set -e +# Exit if there's an error. +{ + set -e $HERMES health-check || echo "Chains are not healthy! don't forget to run them" $HERMES config validate || echo "Something is wrong with the config!" } diff --git a/x/drip/spec/01_authorization.md b/x/drip/spec/01_authorization.md index 9ca115070..c23951797 100644 --- a/x/drip/spec/01_authorization.md +++ b/x/drip/spec/01_authorization.md @@ -4,9 +4,9 @@ order: 1 # Authorization -For security reasons, only specific addresses can distribute tokens to $JUNO stakers. We accept any kind of address: multisig, smart contracts, regular and [https://daodao.zone](DAODAO) DAOs. +For security reasons, only specific addresses can distribute tokens to $JUNO stakers. We accept any kind of address: multisig, smart contracts, regular and [https://daodao.zone](DAODAO) DAOs. -Governance can decide wether to approve or deny a new address to be added to the authorized list. +Governance can decide whether to approve or deny a new address to be added to the authorized list. ## Query the allowed addresses diff --git a/x/drip/spec/02_distribute_tokens.md b/x/drip/spec/02_distribute_tokens.md index fba6dcea7..a00b952fe 100644 --- a/x/drip/spec/02_distribute_tokens.md +++ b/x/drip/spec/02_distribute_tokens.md @@ -4,14 +4,14 @@ order: 2 # Distributing Tokens -Once an address is authorized, at any time it can use the `MsgDistributToken` message to distribute all the attached funds at the next block. +Once an address is authorized, at any time it can use the `MsgDistributToken` message to distribute all the attached funds at the next block. -From command line is as easy as running the follwing instruction +From command line is as easy as running the following instruction ``` junod tx drip distribute-tokens 100000tf/yourcontract/yourtoken ``` -Only native tokens and the ones made with tokenfactory are allowed. +Only native tokens and the ones made with tokenfactory are allowed. -If you have a CW-20 token, you can wrap it to native using [https://github.com/CosmosContracts/tokenfactory-contracts/tree/main/contracts/migrate](this contract). \ No newline at end of file +If you have a CW-20 token, you can wrap it to native using [https://github.com/CosmosContracts/tokenfactory-contracts/tree/main/contracts/migrate](this contract). \ No newline at end of file diff --git a/x/mint/spec/02_state.md b/x/mint/spec/02_state.md index 27a27b0e2..8db16b3d2 100644 --- a/x/mint/spec/02_state.md +++ b/x/mint/spec/02_state.md @@ -14,8 +14,8 @@ The minter is a space for holding current inflation information. type Minter struct { Inflation sdk.Dec // current annual inflation rate Phase uint64 // current phase inflation - StartPhaseBlock uint64 // current phase start block - AnnualProvisions sdk.Dec // current annual exptected provisions + StartPhaseBlock uint64 // current phase start block + AnnualProvisions sdk.Dec // current annual expected provisions } ``` diff --git a/x/mint/types/genesis.pb.go b/x/mint/types/genesis.pb.go index d9c0f8732..4765dc2bf 100644 --- a/x/mint/types/genesis.pb.go +++ b/x/mint/types/genesis.pb.go @@ -27,7 +27,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type GenesisState struct { // minter is a space for holding current inflation information. Minter Minter `protobuf:"bytes,1,opt,name=minter,proto3" json:"minter"` - // params defines all the paramaters of the module. + // params defines all the parameters of the module. Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` } diff --git a/x/tokenfactory/README.md b/x/tokenfactory/README.md index 7d6644e45..c6dd45d7f 100644 --- a/x/tokenfactory/README.md +++ b/x/tokenfactory/README.md @@ -81,7 +81,7 @@ message MsgBurn { **State Modifications:** -- Saftey check the following +- Safety check the following - Check that the denom minting is created via `tokenfactory` module - Check that the sender of the message is the admin of the denom - Burn designated amount of tokens for the denom via `bank` module diff --git a/x/tokenfactory/keeper/admins_test.go b/x/tokenfactory/keeper/admins_test.go index 27450c7c3..507b8f5b1 100644 --- a/x/tokenfactory/keeper/admins_test.go +++ b/x/tokenfactory/keeper/admins_test.go @@ -78,7 +78,7 @@ func (suite *KeeperTestSuite) TestAdminMsgs() { } // TestMintDenom ensures the following properties of the MintMessage: -// * Noone can mint tokens for a denom that doesn't exist +// * No one can mint tokens for a denom that doesn't exist // * Only the admin of a denom can mint tokens for it // * The admin of a denom can mint tokens for it func (suite *KeeperTestSuite) TestMintDenom() { diff --git a/x/tokenfactory/types/genesis.pb.go b/x/tokenfactory/types/genesis.pb.go index eade1da5e..7365e5dc9 100644 --- a/x/tokenfactory/types/genesis.pb.go +++ b/x/tokenfactory/types/genesis.pb.go @@ -25,7 +25,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the tokenfactory module's genesis state. type GenesisState struct { - // params defines the paramaters of the module. + // params defines the parameters of the module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` FactoryDenoms []GenesisDenom `protobuf:"bytes,2,rep,name=factory_denoms,json=factoryDenoms,proto3" json:"factory_denoms" yaml:"factory_denoms"` }