diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml new file mode 100644 index 0000000..0d974e9 --- /dev/null +++ b/.github/workflows/typos.yml @@ -0,0 +1,13 @@ +name: Check for typos + +on: [pull_request] + +jobs: + check-for-typos: + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v4 + + - name: Check for typos + uses: crate-ci/typos@v1.24.5 diff --git a/docs/modules/ROOT/pages/guides/predeployed_contracts.adoc b/docs/modules/ROOT/pages/guides/predeployed_contracts.adoc index 84bc5fe..2be2476 100644 --- a/docs/modules/ROOT/pages/guides/predeployed_contracts.adoc +++ b/docs/modules/ROOT/pages/guides/predeployed_contracts.adoc @@ -48,4 +48,4 @@ If you do not want any contract to be predeployed, you can use the `--no-predepl == Limitations -* Contructors are not executed at the moment. So if your contract needs any initialization, consider deploying it as usual. \ No newline at end of file +* Constructors are not executed at the moment. So if your contract needs any initialization, consider deploying it as usual. \ No newline at end of file diff --git a/docs/modules/ROOT/pages/pallets/multisig.adoc b/docs/modules/ROOT/pages/pallets/multisig.adoc index d2ddcfc..42899fc 100644 --- a/docs/modules/ROOT/pages/pallets/multisig.adoc +++ b/docs/modules/ROOT/pages/pallets/multisig.adoc @@ -52,7 +52,7 @@ The result is equivalent to the dispatched result if the threshold is exactly TIP: If this is the final approval, you will want to use `as_multi` instead. `approve_as_multi` won’t trigger the dispatch, even if there are enough approvals. -The reason is: `as_multi` needs `call` parameter, whereas `approve_as_mutli` needs `call_hash`. `call_hash` is enough to find the multisig operation entry in the storage, and increment the vote count. We don’t need the `call` itself to increment the vote count. Whereas, if `call` is supplied, and if we have enough approvals, the logic for execution will be triggered. This is a design choice. +The reason is: `as_multi` needs `call` parameter, whereas `approve_as_multi` needs `call_hash`. `call_hash` is enough to find the multisig operation entry in the storage, and increment the vote count. We don’t need the `call` itself to increment the vote count. Whereas, if `call` is supplied, and if we have enough approvals, the logic for execution will be triggered. This is a design choice. **Params:** diff --git a/docs/modules/ROOT/pages/pallets/parachain-system.adoc b/docs/modules/ROOT/pages/pallets/parachain-system.adoc index 2bfe50f..6e9d357 100644 --- a/docs/modules/ROOT/pages/pallets/parachain-system.adoc +++ b/docs/modules/ROOT/pages/pallets/parachain-system.adoc @@ -27,7 +27,7 @@ This pallet is a core element of each parachain. It will: ** `DmpQueue` — a handler for the incoming *downward* messages from relay chain ** `ReservedDmpWeight` — xref:glossary.adoc#weight[weight] reserved for DMP message processing. This config seems to be is not used as the function that processes these messages (`enqueue_inbound_downward_messages`) returns used weight. ** `XcmpMessageHandler` — a handler for the incoming _horizontal_ messages from other parachains -** `ReservedXcmpWeight` — default weight limit for the for the XCMP message processing. May be overriden by storage `ReservedXcmpWeightOverride` . If incoming messages in block will exceed the weight limit, they won’t be processed. +** `ReservedXcmpWeight` — default weight limit for the for the XCMP message processing. May be overridden by storage `ReservedXcmpWeightOverride` . If incoming messages in block will exceed the weight limit, they won’t be processed. ** `CheckAssociatedRelayNumber` — type that implements `trait CheckAssociatedRelayNumber` . Currently there are three implementations: no check (`AnyRelayNumber`), strict increase (`RelayNumberStrictlyIncreases`), monotonic increase (`RelayNumberMonotonicallyIncreases`). It is needed to maintain some order between blocks in relay chain and parachain. ** `ConsensusHook` — this is a feature-enabled config ( for the management of the xref:glossary.adoc#unincluded_segment[unincluded segment]. Requires the implementation of `trait ConsensusHook`. There are several implementations of it, in `parachain-system` crate (`FixedCapacityUnincludedSegment`) and in `aura-ext` crate (`FixedVelocityConsensusHook`). It is needed to maintain the logic of segment length handling. * Common parameters for all pallets: diff --git a/docs/modules/ROOT/pages/pallets/transaction_payment.adoc b/docs/modules/ROOT/pages/pallets/transaction_payment.adoc index 0f7e0f0..55d6ab2 100644 --- a/docs/modules/ROOT/pages/pallets/transaction_payment.adoc +++ b/docs/modules/ROOT/pages/pallets/transaction_payment.adoc @@ -36,7 +36,7 @@ The inputs are defined below in the glossary and config sections. ** `WeightToFee` -- Mapping between the smallest unit of weight and smallest unit of fee. Type must implement the trait `WeightToFee>`. ** `LengthToFee` -- Convert a length value into a deductible fee based on the currency type. Type must implement the trait `WeightToFee>`. * Pallet-specific constants: -** `OperationalFeeMultiplier` -- A fee mulitiplier for `Operational` extrinsics to compute "virtual tip" to boost their `priority`. Type must implement the trait `Get`. +** `OperationalFeeMultiplier` -- A fee multiplier for `Operational` extrinsics to compute "virtual tip" to boost their `priority`. Type must implement the trait `Get`. * Common configs: ** `RuntimeEvent` diff --git a/evm-template/node/src/cli.rs b/evm-template/node/src/cli.rs index e20567d..3ee871e 100644 --- a/evm-template/node/src/cli.rs +++ b/evm-template/node/src/cli.rs @@ -45,7 +45,7 @@ pub enum Subcommand { /// Try-runtime has migrated to a standalone /// [CLI](). The subcommand exists as a stub and - /// deprecation notice. It will be removed entirely some time after Janurary + /// deprecation notice. It will be removed entirely some time after January /// 2024. TryRuntime, } diff --git a/evm-template/node/src/eth.rs b/evm-template/node/src/eth.rs index fed3d62..679a72e 100644 --- a/evm-template/node/src/eth.rs +++ b/evm-template/node/src/eth.rs @@ -30,7 +30,7 @@ pub fn db_config_dir(config: &Configuration) -> PathBuf { config.base_path.config_dir(config.chain_spec.id()) } -/// Avalailable frontier backend types. +/// Available frontier backend types. #[derive(Debug, Copy, Clone, Default, clap::ValueEnum)] pub enum BackendType { /// Either RocksDb or ParityDb as per inherited from the global backend settings. diff --git a/evm-template/runtime/src/constants.rs b/evm-template/runtime/src/constants.rs index e5e9c1b..d917cba 100644 --- a/evm-template/runtime/src/constants.rs +++ b/evm-template/runtime/src/constants.rs @@ -14,7 +14,7 @@ pub mod currency { pub const GRAND: Balance = 1_000 * DOLLARS; /// NB: Notice, that existential deposit was set to 0 intentionally to increase compatibility with EVM. - /// Hovewer, it leads to some risks, most importantly state bloating. + /// However, it leads to some risks, most importantly state bloating. /// We acknowledge that there is such a risk and we have an opened issue to resolve it: /// https://github.com/OpenZeppelin/polkadot-runtime-templates/issues/195 /// If you read this message please check out this issue to see if it is resolved and what can you do to implement the fix. diff --git a/evm-template/template-fuzzer/src/main.rs b/evm-template/template-fuzzer/src/main.rs index c13eaec..f1a0ad7 100644 --- a/evm-template/template-fuzzer/src/main.rs +++ b/evm-template/template-fuzzer/src/main.rs @@ -75,13 +75,13 @@ fn main() { }; ziggy::fuzz!(|data: &[u8]| { - let mut iteratable = Data::from_data(data); + let mut iterable = Data::from_data(data); // Max weight for a block. let max_weight: Weight = Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND * 2, 0); let extrinsics: Vec<(Option, usize, RuntimeCall)> = - iteratable.extract_extrinsics::(); + iterable.extract_extrinsics::(); if extrinsics.is_empty() { return; @@ -278,7 +278,7 @@ fn main() { let total_issuance = pallet_balances::TotalIssuance::::get(); let counted_issuance = counted_free + counted_reserved; - // The reason we do not simply use `!=` here is that some balance might be transfered to another chain via XCM. + // The reason we do not simply use `!=` here is that some balance might be transferred to another chain via XCM. // If we find some kind of workaround for this, we could replace `<` by `!=` here and make the check stronger. assert!( total_issuance <= counted_issuance, diff --git a/generic-template/node/src/cli.rs b/generic-template/node/src/cli.rs index e756900..8b01cf3 100644 --- a/generic-template/node/src/cli.rs +++ b/generic-template/node/src/cli.rs @@ -40,7 +40,7 @@ pub enum Subcommand { /// Try-runtime has migrated to a standalone /// [CLI](). The subcommand exists as a stub and - /// deprecation notice. It will be removed entirely some time after Janurary + /// deprecation notice. It will be removed entirely some time after January /// 2024. TryRuntime, } diff --git a/generic-template/template-fuzzer/src/main.rs b/generic-template/template-fuzzer/src/main.rs index 0efab5c..855545f 100644 --- a/generic-template/template-fuzzer/src/main.rs +++ b/generic-template/template-fuzzer/src/main.rs @@ -68,13 +68,13 @@ fn main() { }; ziggy::fuzz!(|data: &[u8]| { - let mut iteratable = Data::from_data(data); + let mut iterable = Data::from_data(data); // Max weight for a block. let max_weight: Weight = Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND * 2, 0); let extrinsics: Vec<(Option, usize, RuntimeCall)> = - iteratable.extract_extrinsics::(); + iterable.extract_extrinsics::(); if extrinsics.is_empty() { return; @@ -271,7 +271,7 @@ fn main() { let total_issuance = pallet_balances::TotalIssuance::::get(); let counted_issuance = counted_free + counted_reserved; - // The reason we do not simply use `!=` here is that some balance might be transfered to another chain via XCM. + // The reason we do not simply use `!=` here is that some balance might be transferred to another chain via XCM. // If we find some kind of workaround for this, we could replace `<` by `!=` here and make the check stronger. assert!( total_issuance <= counted_issuance,