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

chore: spell check CI #912

Merged
merged 4 commits into from
Dec 14, 2023
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
4 changes: 4 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions .github/workflows/spell-check-ignore.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
junodd
crate
24 changes: 24 additions & 0 deletions .github/workflows/spell-check.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion app/upgrades/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v15/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion cmd/junod/cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion proto/juno/mint/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];
}
2 changes: 1 addition & 1 deletion proto/osmosis/tokenfactory/v1beta1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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 [
Expand Down
12 changes: 6 additions & 6 deletions scripts/hermes/cw20/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
}


Expand Down Expand Up @@ -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
6 changes: 3 additions & 3 deletions scripts/hermes/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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!"
}
Expand Down
4 changes: 2 additions & 2 deletions x/drip/spec/01_authorization.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions x/drip/spec/02_distribute_tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
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).
4 changes: 2 additions & 2 deletions x/mint/spec/02_state.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
```

Expand Down
2 changes: 1 addition & 1 deletion x/mint/types/genesis.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion x/tokenfactory/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion x/tokenfactory/keeper/admins_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion x/tokenfactory/types/genesis.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading