diff --git a/crates/bridge-pot-currency-swap/src/lib.rs b/crates/bridge-pot-currency-swap/src/lib.rs index c9da023f2..0be36bcda 100644 --- a/crates/bridge-pot-currency-swap/src/lib.rs +++ b/crates/bridge-pot-currency-swap/src/lib.rs @@ -1,6 +1,6 @@ //! Bridge pot currency swap implementation. -// Either generate code at stadard mode, or `no_std`, based on the `std` feature presence. +// Either generate code at standard mode, or `no_std`, based on the `std` feature presence. #![cfg_attr(not(feature = "std"), no_std)] use frame_support::{ diff --git a/crates/crypto-utils-evm/src/lib.rs b/crates/crypto-utils-evm/src/lib.rs index a55ee7250..b30137bf0 100644 --- a/crates/crypto-utils-evm/src/lib.rs +++ b/crates/crypto-utils-evm/src/lib.rs @@ -85,7 +85,7 @@ impl KeyData { }) } - /// Construct the key info from the BIP39 mnemonic using BIP44 convenions. + /// Construct the key info from the BIP39 mnemonic using BIP44 convensions. pub fn from_mnemonic_bip44( mnemonic: &bip39::Mnemonic, password: &str, @@ -99,7 +99,7 @@ impl KeyData { .map_err(FromMnemonicBip44Error::FromMnemonicBip39) } - /// Construct the key info from the BIP39 mnemonic phrase (in English) using BIP44 convenions. + /// Construct the key info from the BIP39 mnemonic phrase (in English) using BIP44 convensions. /// If you need other language - use [`Self::from_mnemonic_bip44`]. pub fn from_phrase_bip44( phrase: &str, diff --git a/crates/devutil-auth-ticket/src/lib.rs b/crates/devutil-auth-ticket/src/lib.rs index e81ed3d94..2e9a327ce 100644 --- a/crates/devutil-auth-ticket/src/lib.rs +++ b/crates/devutil-auth-ticket/src/lib.rs @@ -6,7 +6,7 @@ use robonode_crypto::ed25519_dalek::Signer; /// The input required to generate an auth ticket. pub struct Input { - /// The robonode secret key to use for authticket reponse signing. + /// The robonode secret key to use for authticket response signing. pub robonode_secret_key: Vec, /// The auth ticket to sign. pub auth_ticket: AuthTicket, diff --git a/crates/eip712-common/src/lib.rs b/crates/eip712-common/src/lib.rs index f3cba42a7..b5e4554df 100644 --- a/crates/eip712-common/src/lib.rs +++ b/crates/eip712-common/src/lib.rs @@ -68,8 +68,8 @@ pub fn make_payload_hash<'a>( ) -> [u8; 32] { let datahashes = datahashes.into_iter(); let (datahashes_size, _) = datahashes.size_hint(); - // Datahashes number is enough limited at EIP-712 message for this oveflow - // to be practicly impossible. + // Datahashes number is enough limited at EIP-712 message for this overflow + // to be practically impossible. let mut buf = sp_std::prelude::Vec::with_capacity( 32_usize .checked_add(datahashes_size.checked_mul(32).unwrap()) diff --git a/crates/facetec-api-client/src/enrollment3d.rs b/crates/facetec-api-client/src/enrollment3d.rs index bb46695f9..825ffc4c9 100644 --- a/crates/facetec-api-client/src/enrollment3d.rs +++ b/crates/facetec-api-client/src/enrollment3d.rs @@ -32,9 +32,9 @@ pub struct Request<'a> { } /// The response from `/enrollment-3d`. -/// The schema for this particular call if fucked beyound belief; without a proper API docs from -/// the FaceTec side, implemeting this properly will be a waste of time, and error prone. -/// Plus, even the spec won't help - they need to fix thier approach to the API design. +/// The schema for this particular call if fucked beyond belief; without a proper API docs from +/// the FaceTec side, implementing this properly will be a waste of time, and error prone. +/// Plus, even the spec won't help - they need to fix their approach to the API design. #[derive(Debug, Deserialize, PartialEq)] #[serde(rename_all = "camelCase")] pub struct Response { diff --git a/crates/facetec-api-client/src/lib.rs b/crates/facetec-api-client/src/lib.rs index 7c67ea658..02b52b8ff 100644 --- a/crates/facetec-api-client/src/lib.rs +++ b/crates/facetec-api-client/src/lib.rs @@ -52,7 +52,7 @@ pub struct ServerError { /// The robonode client. #[derive(Debug)] pub struct Client { - /// Underyling HTTP client used to execute network calls. + /// Underlying HTTP client used to execute network calls. pub reqwest: reqwest::Client, /// The base URL to use for the routes. pub base_url: String, diff --git a/crates/humanode-peer/src/build_info.rs b/crates/humanode-peer/src/build_info.rs index 024dd7c2d..e1d1fa911 100644 --- a/crates/humanode-peer/src/build_info.rs +++ b/crates/humanode-peer/src/build_info.rs @@ -1,4 +1,4 @@ -//! Build envrionment information. +//! Build environment information. /// The git sha of the code during the build. pub const GIT_SHA: &str = env!("VERGEN_GIT_SHA"); diff --git a/crates/humanode-peer/src/chain_spec.rs b/crates/humanode-peer/src/chain_spec.rs index 4a8b79c9a..ab31217b2 100644 --- a/crates/humanode-peer/src/chain_spec.rs +++ b/crates/humanode-peer/src/chain_spec.rs @@ -391,10 +391,10 @@ fn testnet_genesis( /// The standard properties we use. fn properties() -> sc_chain_spec::Properties { - let properites = serde_json::json!({ + let properties = serde_json::json!({ "tokenDecimals": 18, }); - serde_json::from_value(properites).unwrap() // embedded value, should never fail + serde_json::from_value(properties).unwrap() // embedded value, should never fail } #[cfg(test)] diff --git a/crates/humanode-peer/src/cli/root.rs b/crates/humanode-peer/src/cli/root.rs index dc659bcc0..569af87ad 100644 --- a/crates/humanode-peer/src/cli/root.rs +++ b/crates/humanode-peer/src/cli/root.rs @@ -61,7 +61,7 @@ impl SubstrateCli for Root { impl Root { /// Create a [`Runner`] for the command provided in argument. /// This will create a [`crate::configuration::Configuration`] from the command line arguments - /// and the rest of the environemnt. + /// and the rest of the environment. pub fn create_humanode_runner( &self, command: &T, diff --git a/crates/humanode-peer/src/cli/runner.rs b/crates/humanode-peer/src/cli/runner.rs index 0ac003ad4..6242deac7 100644 --- a/crates/humanode-peer/src/cli/runner.rs +++ b/crates/humanode-peer/src/cli/runner.rs @@ -11,7 +11,7 @@ use sp_core::crypto::Ss58AddressFormat; use super::{utils::application_error, CliConfigurationExt, Root}; use crate::configuration::Configuration; -/// Run a future until it completes or a signal is recevied. +/// Run a future until it completes or a signal is received. async fn with_signal(future: F) -> std::result::Result<(), E> where F: Future>, @@ -101,7 +101,7 @@ impl Runner { future.await } - /// Execute syncronously. + /// Execute synchronously. pub fn sync_run( self, runner: impl FnOnce(Configuration) -> std::result::Result<(), E>, diff --git a/crates/humanode-peer/src/cli/subcommand/bioauth/key/generate.rs b/crates/humanode-peer/src/cli/subcommand/bioauth/key/generate.rs index 48ed188eb..653a8de4c 100644 --- a/crates/humanode-peer/src/cli/subcommand/bioauth/key/generate.rs +++ b/crates/humanode-peer/src/cli/subcommand/bioauth/key/generate.rs @@ -17,7 +17,7 @@ pub struct GenerateKeyCmd { pub output_scheme: OutputTypeFlag, } -/// An error that occured during key generation. +/// An error that occurred during key generation. #[derive(thiserror::Error, Debug)] pub enum GenerateKeyError { /// The number of words used in mnemonic is invalid. diff --git a/crates/humanode-peer/src/cli/subcommand/bioauth/key/insert.rs b/crates/humanode-peer/src/cli/subcommand/bioauth/key/insert.rs index eb2f975d1..4c4cec456 100644 --- a/crates/humanode-peer/src/cli/subcommand/bioauth/key/insert.rs +++ b/crates/humanode-peer/src/cli/subcommand/bioauth/key/insert.rs @@ -27,7 +27,7 @@ pub struct InsertKeyCmd { pub keystore_params: KeystoreParams, } -/// An error that occured during key insert. +/// An error that occurred during key insert. #[derive(thiserror::Error, Debug)] pub enum InsertKeyError { /// Something went wrong while extracting the list of bioauth keys. diff --git a/crates/humanode-peer/src/time_warp.rs b/crates/humanode-peer/src/time_warp.rs index 7308b1485..a62841f37 100644 --- a/crates/humanode-peer/src/time_warp.rs +++ b/crates/humanode-peer/src/time_warp.rs @@ -42,7 +42,7 @@ impl TimeWarp { /// Apply time warp. pub fn apply_time_warp(&self, timestamp: Timestamp) -> sp_timestamp::InherentDataProvider { let time_since_revival = timestamp.saturating_sub(self.revive_timestamp.into()); - // u64 is big enough for this oveflow to be practicly impossible. + // u64 is big enough for this overflow to be practically impossible. let warped_timestamp = Timestamp::new(self.warp_factor.saturating_add(*self.fork_timestamp)); diff --git a/crates/humanode-peer/src/validator_key.rs b/crates/humanode-peer/src/validator_key.rs index 2710b0a36..922a58247 100644 --- a/crates/humanode-peer/src/validator_key.rs +++ b/crates/humanode-peer/src/validator_key.rs @@ -28,13 +28,13 @@ impl AppCryptoSigner { } } -/// An error that occured at the signer. +/// An error that occurred at the signer. #[derive(thiserror::Error, Debug)] pub enum SignerError { /// The keystore error. #[error("keystore error: {0}")] Keystore(sp_keystore::Error), - /// An error that occured because the produced signature was `None`. + /// An error that occurred because the produced signature was `None`. #[error("unable to produce a signature")] NoSignature, } diff --git a/crates/humanode-runtime/src/deauthentication_reason.rs b/crates/humanode-runtime/src/deauthentication_reason.rs index 71fd78a78..5431d734e 100644 --- a/crates/humanode-runtime/src/deauthentication_reason.rs +++ b/crates/humanode-runtime/src/deauthentication_reason.rs @@ -8,6 +8,6 @@ use sp_std::prelude::*; /// Define a possible deauthentication reason. #[derive(Clone, PartialEq, Debug, Encode, Decode, TypeInfo)] pub enum DeauthenticationReason { - /// Some offence has been recevied. + /// Some offence has been received. Offence, } diff --git a/crates/humanode-runtime/src/eth_sig.rs b/crates/humanode-runtime/src/eth_sig.rs index 9ebf50530..bf19970a6 100644 --- a/crates/humanode-runtime/src/eth_sig.rs +++ b/crates/humanode-runtime/src/eth_sig.rs @@ -11,7 +11,7 @@ pub(crate) fn genesis_verifying_contract() -> [u8; 20] { verifying_contract } -/// The verifier for the EIP-712 signature of the EVM accout claim message. +/// The verifier for the EIP-712 signature of the EVM account claim message. pub enum AccountClaimVerifier {} impl pallet_evm_accounts_mapping::SignedClaimVerifier for AccountClaimVerifier { diff --git a/crates/humanode-runtime/src/lib.rs b/crates/humanode-runtime/src/lib.rs index 353f611f0..ed76ecc0f 100644 --- a/crates/humanode-runtime/src/lib.rs +++ b/crates/humanode-runtime/src/lib.rs @@ -3,7 +3,7 @@ #![recursion_limit = "256"] // TODO(#66): switch back to warn #![allow(missing_docs, clippy::missing_docs_in_private_items)] -// Either generate code at stadard mode, or `no_std`, based on the `std` feature presence. +// Either generate code at standard mode, or `no_std`, based on the `std` feature presence. #![cfg_attr(not(feature = "std"), no_std)] // Runtime impl macros generate non-snake case names. #![allow(non_snake_case)] @@ -521,7 +521,7 @@ impl pallet_bioauth::Config for Runtime { type RobonodeSignature = Vec; type ValidatorPublicKey = BioauthId; type OpaqueAuthTicket = primitives_auth_ticket::OpaqueAuthTicket; - type AuthTicketCoverter = PrimitiveAuthTicketConverter; + type AuthTicketConverter = PrimitiveAuthTicketConverter; type ValidatorSetUpdater = (); type Moment = UnixMilliseconds; type DisplayMoment = display_moment::DisplayMoment; diff --git a/crates/humanode-runtime/src/tests/claims_and_vesting.rs b/crates/humanode-runtime/src/tests/claims_and_vesting.rs index 2f5101518..9d3271eb2 100644 --- a/crates/humanode-runtime/src/tests/claims_and_vesting.rs +++ b/crates/humanode-runtime/src/tests/claims_and_vesting.rs @@ -389,7 +389,7 @@ fn genesis_claims_invalid_pot_balance() { /// This test verifies that `GenesisConfig` with claims fails due to invalid vesting initialization with null. #[test] #[should_panic = "invalid type: null, expected a sequence"] -fn genesis_claims_invalid_vesting_inititalization_with_null() { +fn genesis_claims_invalid_vesting_initialization_with_null() { let token_claims = r#" { "claims": [ diff --git a/crates/humanode-runtime/src/tests/fees.rs b/crates/humanode-runtime/src/tests/fees.rs index 697950bbc..c3db6719e 100644 --- a/crates/humanode-runtime/src/tests/fees.rs +++ b/crates/humanode-runtime/src/tests/fees.rs @@ -144,8 +144,8 @@ fn assert_within(effective_fee: Balance, expected_fee: Balance, epsilon: Balance } fn assert_fee(call: RuntimeCall, len: u32, expected_fee: Balance, epsilon: Balance) { - let dispath_info = TransactionPayment::query_call_info(call, len); - assert_within(dispath_info.partial_fee, expected_fee, epsilon) + let dispatch_info = TransactionPayment::query_call_info(call, len); + assert_within(dispatch_info.partial_fee, expected_fee, epsilon) } /// The testing cryptography to match the real one we use for the accounts. @@ -189,7 +189,7 @@ fn simple_balances_transfer_keep_alive() { value: ONE_BALANCE_UNIT, }); - // Compute the length of the extrinsic constaining this call. + // Compute the length of the extrinsic constraining this call. let (call, len) = { let sign_by = account_public("Alice"); let signed_by_id = account_id("Alice"); diff --git a/crates/humanode-runtime/src/utils.rs b/crates/humanode-runtime/src/utils.rs index 7f966ffde..3e9cb700f 100644 --- a/crates/humanode-runtime/src/utils.rs +++ b/crates/humanode-runtime/src/utils.rs @@ -83,7 +83,7 @@ mod transaction { as sp_runtime::traits::Extrinsic>::SignaturePayload; /// Take a runtime call, and the use the [`frame_system::offchain`] facilities to create - /// a transcation from it. + /// a transaction from it. pub fn create_transaction( call: RuntimeCallOf, public: PublicOf, diff --git a/crates/keystore-bioauth-account-id/src/lib.rs b/crates/keystore-bioauth-account-id/src/lib.rs index 360820168..68fe9b6ff 100644 --- a/crates/keystore-bioauth-account-id/src/lib.rs +++ b/crates/keystore-bioauth-account-id/src/lib.rs @@ -1,6 +1,6 @@ //! Crypto primitives for [`KeystoreBioauthAccountId`] key type. -// Either generate code at stadard mode, or `no_std`, based on the `std` feature presence. +// Either generate code at standard mode, or `no_std`, based on the `std` feature presence. #![cfg_attr(not(feature = "std"), no_std)] use frame_system::offchain::AppCrypto; diff --git a/crates/pallet-balanced-currency-swap-bridges-initializer/src/lib.rs b/crates/pallet-balanced-currency-swap-bridges-initializer/src/lib.rs index aa1121e99..7c57e3100 100644 --- a/crates/pallet-balanced-currency-swap-bridges-initializer/src/lib.rs +++ b/crates/pallet-balanced-currency-swap-bridges-initializer/src/lib.rs @@ -1,6 +1,6 @@ //! A substrate pallet for bridges pot currency swap initialization logic. -// Either generate code at stadard mode, or `no_std`, based on the `std` feature presence. +// Either generate code at standard mode, or `no_std`, based on the `std` feature presence. #![cfg_attr(not(feature = "std"), no_std)] use frame_support::{ diff --git a/crates/pallet-bioauth/src/benchmarking.rs b/crates/pallet-bioauth/src/benchmarking.rs index 97afbfe10..03dcc9879 100644 --- a/crates/pallet-bioauth/src/benchmarking.rs +++ b/crates/pallet-bioauth/src/benchmarking.rs @@ -53,7 +53,7 @@ pub trait AuthTicketBuilder: pallet::Config { /// Enables generation of signature with robonode private key provided at runtime. pub trait AuthTicketSigner: pallet::Config { - /// Signs `AuthTicket` bytearray provided and returns digitial signature in bytearray. + /// Signs `AuthTicket` bytearray provided and returns digital signature in bytearray. fn sign( auth_ticket: &::OpaqueAuthTicket, ) -> ::RobonodeSignature; diff --git a/crates/pallet-bioauth/src/lib.rs b/crates/pallet-bioauth/src/lib.rs index ec428f5ad..eb3662dde 100644 --- a/crates/pallet-bioauth/src/lib.rs +++ b/crates/pallet-bioauth/src/lib.rs @@ -48,7 +48,7 @@ pub trait Verifier { /// A trait that enables a third-party type to define a potentially fallible conversion from A to B. /// Is in analogous to [`sp_runtime::traits::Convert`] is a sense that the third-party is acting as -/// the converter, and to [`std::convert::TryFrom`] in a sense that the converion is fallible. +/// the converter, and to [`std::convert::TryFrom`] in a sense that the conversion is fallible. pub trait TryConvert { /// The error that can occur during conversion. type Error; @@ -227,7 +227,7 @@ pub mod pallet { type OpaqueAuthTicket: Parameter + AsRef<[u8]> + Send + Sync; /// A converter from an opaque to a transparent auth ticket. - type AuthTicketCoverter: TryConvert< + type AuthTicketConverter: TryConvert< Self::OpaqueAuthTicket, AuthTicket, >; @@ -436,9 +436,9 @@ pub mod pallet { #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::authenticate( >::get().len().try_into() - .expect("u32 is big enough for this oveflow to be practicly impossible"), + .expect("u32 is big enough for this overflow to be practically impossible"), >::get().len().try_into() - .expect("u32 is big enough for this oveflow to be practicly impossible")))] + .expect("u32 is big enough for this overflow to be practically impossible")))] pub fn authenticate( origin: OriginFor, req: Authenticate, @@ -490,7 +490,7 @@ pub mod pallet { public_key: public_key.clone(), expires_at: current_moment .checked_add(&T::AuthenticationsExpireAfter::get()) - .expect("32 bits should be enough for this overflow to be practicly impossible"), + .expect("32 bits should be enough for this overflow to be practically impossible"), }; // Run the before hook, abort if needed. @@ -523,7 +523,7 @@ pub mod pallet { #[pallet::call_index(1)] #[pallet::weight(T::WeightInfo::set_robonode_public_key( >::get().len().try_into() - .expect("u32 is big enough for this oveflow to be practicly impossible") + .expect("u32 is big enough for this overflow to be practically impossible") ))] pub fn set_robonode_public_key( origin: OriginFor, @@ -580,7 +580,7 @@ pub mod pallet { >::get() .len() .try_into() - .expect("u32 is big enough for this oveflow to be practicly impossible"), + .expect("u32 is big enough for this overflow to be practically impossible"), ) } } @@ -606,7 +606,7 @@ pub mod pallet { return Err(AuthTicketExtractionError::SignatureInvalid); } - let auth_ticket = >::try_convert(req.ticket) + let auth_ticket = >::try_convert(req.ticket) .map_err(|_| AuthTicketExtractionError::UnableToParse)?; Ok(auth_ticket) diff --git a/crates/pallet-bioauth/src/mock/benchmarking.rs b/crates/pallet-bioauth/src/mock/benchmarking.rs index ea4c479ca..51da75f03 100644 --- a/crates/pallet-bioauth/src/mock/benchmarking.rs +++ b/crates/pallet-bioauth/src/mock/benchmarking.rs @@ -177,7 +177,7 @@ impl pallet_bioauth::Config for Benchmark { type RobonodeSignature = Vec; type ValidatorPublicKey = ValidatorPublicKey; type OpaqueAuthTicket = MockOpaqueAuthTicket; - type AuthTicketCoverter = MockAuthTicketConverter; + type AuthTicketConverter = MockAuthTicketConverter; type ValidatorSetUpdater = MockValidatorSetUpdater; type Moment = UnixMilliseconds; type DisplayMoment = DisplayMoment; diff --git a/crates/pallet-bioauth/src/mock/testing.rs b/crates/pallet-bioauth/src/mock/testing.rs index 541d0e904..6a3a8dd97 100644 --- a/crates/pallet-bioauth/src/mock/testing.rs +++ b/crates/pallet-bioauth/src/mock/testing.rs @@ -258,7 +258,7 @@ impl pallet_bioauth::Config for Test { type RobonodeSignature = Vec; type ValidatorPublicKey = ValidatorPublicKey; type OpaqueAuthTicket = MockOpaqueAuthTicket; - type AuthTicketCoverter = MockAuthTicketConverter; + type AuthTicketConverter = MockAuthTicketConverter; type ValidatorSetUpdater = MockValidatorSetUpdater; type Moment = UnixMilliseconds; type DisplayMoment = DisplayMoment; diff --git a/crates/pallet-bioauth/src/tests.rs b/crates/pallet-bioauth/src/tests.rs index bf85f7ac2..4ff8201b6 100644 --- a/crates/pallet-bioauth/src/tests.rs +++ b/crates/pallet-bioauth/src/tests.rs @@ -1032,7 +1032,7 @@ fn signed_ext_check_bioauth_tx_denies_conflicting_public_keys() { }) } -/// This test verifies that genesis initialization properly assignes the state and invokes +/// This test verifies that genesis initialization properly assigns the state and invokes /// the validators set init. #[test] fn genesis_build() { diff --git a/crates/pallet-chain-properties/src/tests.rs b/crates/pallet-chain-properties/src/tests.rs index 634ebf480..4308e76bf 100644 --- a/crates/pallet-chain-properties/src/tests.rs +++ b/crates/pallet-chain-properties/src/tests.rs @@ -5,7 +5,7 @@ use frame_support::traits::Get; use crate::{self as pallet_chain_properties, mock::*}; -/// This test verifies that genesis initialization properly assignes the state. +/// This test verifies that genesis initialization properly assigns the state. #[test] fn genesis_build() { // Prepare some sample data and a config. diff --git a/crates/pallet-dummy-precompiles-code/src/lib.rs b/crates/pallet-dummy-precompiles-code/src/lib.rs index ffbc25902..b43bd86eb 100644 --- a/crates/pallet-dummy-precompiles-code/src/lib.rs +++ b/crates/pallet-dummy-precompiles-code/src/lib.rs @@ -44,7 +44,7 @@ pub mod pallet { /// Configuration trait of this pallet. #[pallet::config] pub trait Config: frame_system::Config + pallet_evm::Config { - /// The list of precompiles adresses to be created at evm with dummy code. + /// The list of precompiles addresses to be created at evm with dummy code. type PrecompilesAddresses: Get>; /// The current force execute ask counter. @@ -129,7 +129,7 @@ pub mod pallet { } impl Pallet { - /// A helper function to add dummy code for provided precompiles adrresses. + /// A helper function to add dummy code for provided precompiles addresses. fn precompiles_addresses_add_dummy_code() -> Weight { let mut weight = T::DbWeight::get().reads(0); diff --git a/crates/pallet-dummy-precompiles-code/src/tests.rs b/crates/pallet-dummy-precompiles-code/src/tests.rs index e92bc79d1..64cef022d 100644 --- a/crates/pallet-dummy-precompiles-code/src/tests.rs +++ b/crates/pallet-dummy-precompiles-code/src/tests.rs @@ -2,7 +2,7 @@ use frame_support::traits::OnRuntimeUpgrade; use crate::{mock::*, DUMMY_CODE}; -/// This test verifies that genesis initialization properly assignes the state. +/// This test verifies that genesis initialization properly assigns the state. #[test] fn genesis_build() { // Build the state from the config. diff --git a/crates/pallet-ethereum-chain-id/src/tests.rs b/crates/pallet-ethereum-chain-id/src/tests.rs index 0c7e11b93..cc29668bf 100644 --- a/crates/pallet-ethereum-chain-id/src/tests.rs +++ b/crates/pallet-ethereum-chain-id/src/tests.rs @@ -1,6 +1,6 @@ use crate::{self as pallet_ethereum_chain_id, mock::*}; -/// This test verifies that genesis initialization properly assignes the state. +/// This test verifies that genesis initialization properly assigns the state. #[test] fn genesis_build() { // Prepare some sample data and a config. diff --git a/crates/pallet-evm-accounts-mapping/src/tests.rs b/crates/pallet-evm-accounts-mapping/src/tests.rs index daf57b4d0..c8364922a 100644 --- a/crates/pallet-evm-accounts-mapping/src/tests.rs +++ b/crates/pallet-evm-accounts-mapping/src/tests.rs @@ -148,7 +148,7 @@ fn claim_account_bad_ethereum_signature() { } /// This test verifies that claiming account does not go through when the ethereum address recovery from -/// the ethereum signature recoves an address that does not match the expected one. +/// the ethereum signature recovers an address that does not match the expected one. #[test] fn claim_account_invalid_ethereum_signature() { new_test_ext().execute_with_ext(|_| { diff --git a/crates/pallet-humanode-session/src/lib.rs b/crates/pallet-humanode-session/src/lib.rs index c18d3f479..f0860e784 100644 --- a/crates/pallet-humanode-session/src/lib.rs +++ b/crates/pallet-humanode-session/src/lib.rs @@ -119,10 +119,10 @@ pub type BioauthAuthenticationFor = pallet_bioauth::Authentication< /// The bootnode id type for a given config. pub type BootnodeIdFor = ::BootnodeId; -/// The identifcation type for a given config. +/// The identification type for a given config. pub type IdentificationFor = Identification, BioauthAuthenticationFor>; -/// The identifcation tuple type for a given config. +/// The identification tuple type for a given config. pub type IdentificationTupleFor = (::AccountId, IdentificationFor); impl Pallet { diff --git a/crates/pallet-humanode-session/src/migrations/v1.rs b/crates/pallet-humanode-session/src/migrations/v1.rs index 5b3c44c89..fba9fd622 100644 --- a/crates/pallet-humanode-session/src/migrations/v1.rs +++ b/crates/pallet-humanode-session/src/migrations/v1.rs @@ -40,9 +40,9 @@ pub fn migrate() -> Weight { // Read the session index from the session pallet, then write it to our own state. weight = weight.saturating_add(T::DbWeight::get().reads_writes(1, 1)); - // Move the old identites to the new ones, but one session forward. + // Move the old identities to the new ones, but one session forward. >::translate(|key, old: IdentificationFor| { - // u32 is big enough for this oveflow to be practicly impossible. + // u32 is big enough for this overflow to be practically impossible. >::insert(session_index.checked_add(1).unwrap(), key, old); // Read the old value, insert one new value, and drop the old one. weight = weight.saturating_add(T::DbWeight::get().reads_writes(1, 2)); diff --git a/crates/pallet-pot/src/lib.rs b/crates/pallet-pot/src/lib.rs index a822c1fc1..55dd2f0d7 100644 --- a/crates/pallet-pot/src/lib.rs +++ b/crates/pallet-pot/src/lib.rs @@ -1,4 +1,4 @@ -//! A pot - an instanced pallet indended to provide an govern a "system" account where some balance +//! A pot - an instanced pallet intended to provide an govern a "system" account where some balance //! can be sent. //! //! Intended for use as an implementation for the treasury, fee pot, etc. @@ -27,7 +27,7 @@ pub type NegativeImbalanceOf = #[cfg(feature = "std")] #[derive(Debug, serde::Serialize, serde::Deserialize)] pub enum InitialState { - /// The state of the pot accout is not checked at genesis. + /// The state of the pot account is not checked at genesis. Unchecked, /// The account will be guaranteed to exist at genesis. Initialized, @@ -96,7 +96,7 @@ pub mod pallet { pub enum Event, I: 'static = ()> { /// Some funds have been deposited. Deposit { - /// The amonut of funds that has been deposited. + /// The amount of funds that has been deposited. value: BalanceOf, }, } diff --git a/crates/pallet-token-claims/src/signed_ext.rs b/crates/pallet-token-claims/src/signed_ext.rs index cb139fc68..542959068 100644 --- a/crates/pallet-token-claims/src/signed_ext.rs +++ b/crates/pallet-token-claims/src/signed_ext.rs @@ -1,4 +1,4 @@ -//! Signed extension implentation for token claims. +//! Signed extension implementation for token claims. use core::marker::PhantomData; diff --git a/crates/pallet-token-claims/src/tests.rs b/crates/pallet-token-claims/src/tests.rs index 0a6577a74..0f52d07c4 100644 --- a/crates/pallet-token-claims/src/tests.rs +++ b/crates/pallet-token-claims/src/tests.rs @@ -179,7 +179,7 @@ fn claim_eth_signature_recovery_failure() { } /// This test verifies that claiming does not go through when the ethereum address recovery from -/// the ethereum signature recoves an address that does not match the expected one. +/// the ethereum signature recovers an address that does not match the expected one. #[test] fn claim_eth_signature_recovery_invalid() { new_test_ext().execute_with_ext(|_| { diff --git a/crates/pallet-token-claims/src/traits.rs b/crates/pallet-token-claims/src/traits.rs index 18ffa5ba0..1ad1caa19 100644 --- a/crates/pallet-token-claims/src/traits.rs +++ b/crates/pallet-token-claims/src/traits.rs @@ -19,7 +19,7 @@ pub trait EthereumSignatureVerifier { /// Generate a message and verify the provided `signature` against the said message. /// Extract the [`EthereumAddress`] from the signature and return it. /// - /// The caller should check that the extracted address matches what is expected, as successfull + /// The caller should check that the extracted address matches what is expected, as successful /// recovery does not necessarily guarantee the correctness of the signature - that can only /// be achieved with checking the recovered address against the expected one. fn recover_signer( diff --git a/crates/pallet-vesting/src/logic.rs b/crates/pallet-vesting/src/logic.rs index 45be70b66..7fd7e1bbf 100644 --- a/crates/pallet-vesting/src/logic.rs +++ b/crates/pallet-vesting/src/logic.rs @@ -37,7 +37,7 @@ pub enum Operation<'a, T: Config> { /// The effect of the schedule computation. pub enum Effect { /// The effect to apply after the computation is to execute a partial unlock of the balance. - /// This implies that the vesting shedule will exist after the operation. + /// This implies that the vesting schedule will exist after the operation. PartialUnlock(Balance), /// The effect to apply after the computation is to execute a full unlock of the balance. /// This implies that the vesting schedule will not exist after the operation. @@ -81,7 +81,7 @@ impl Pallet { match op { Operation::Init(Effect::PartialUnlock(balance_left_under_lock), schedule, who) | Operation::Update(Effect::PartialUnlock(balance_left_under_lock), schedule, who) => { - // Store the intitial or updated schedule. + // Store the initial or updated schedule. >::insert(who, schedule); // Set the lock and emit an update event. diff --git a/crates/precompile-bioauth/src/lib.rs b/crates/precompile-bioauth/src/lib.rs index e358304d7..400c68559 100644 --- a/crates/precompile-bioauth/src/lib.rs +++ b/crates/precompile-bioauth/src/lib.rs @@ -73,7 +73,7 @@ where let is_authenticated = pallet_bioauth::ActiveAuthentications::::get() .iter() - .any(|active_authetication| active_authetication.public_key == account_id); + .any(|active_authentication| active_authentication.public_key == account_id); Ok(succeed( EvmDataWriter::new().write(is_authenticated).build(), diff --git a/crates/precompile-bioauth/src/mock.rs b/crates/precompile-bioauth/src/mock.rs index e5b79d840..cde3a985b 100644 --- a/crates/precompile-bioauth/src/mock.rs +++ b/crates/precompile-bioauth/src/mock.rs @@ -171,7 +171,7 @@ impl pallet_bioauth::Config for Test { type RobonodeSignature = Vec; type ValidatorPublicKey = ValidatorPublicKey; type OpaqueAuthTicket = MockOpaqueAuthTicket; - type AuthTicketCoverter = MockAuthTicketConverter; + type AuthTicketConverter = MockAuthTicketConverter; type ValidatorSetUpdater = MockValidatorSetUpdater; type Moment = UnixMilliseconds; type DisplayMoment = DisplayMoment; diff --git a/crates/precompile-native-currency/ERC20.sol b/crates/precompile-native-currency/ERC20.sol index ebf6f927a..361efb0b0 100644 --- a/crates/precompile-native-currency/ERC20.sol +++ b/crates/precompile-native-currency/ERC20.sol @@ -62,7 +62,7 @@ interface IERC20 { * * @param to The address to transfer tokens to. * @param value The amount to be transferred. - * @return true if the transfer was succesful, revert otherwise. + * @return true if the transfer was successful, revert otherwise. */ function transfer(address to, uint256 value) external returns (bool); @@ -83,7 +83,7 @@ interface IERC20 { * @param from The address which you want to send tokens from. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. - * @return true if the transfer was succesful, revert otherwise. + * @return true if the transfer was successful, revert otherwise. */ function transferFrom( address from, @@ -92,17 +92,17 @@ interface IERC20 { ) external returns (bool); /** - * Event emited when a transfer has been performed. + * Event emitted when a transfer has been performed. * Selector: ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef * * @param from The address sending the tokens * @param to The address receiving the tokens. - * @param value The amount of tokens transfered. + * @param value The amount of tokens transferred. */ event Transfer(address indexed from, address indexed to, uint256 value); /** - * Event emited when an approval has been registered. + * Event emitted when an approval has been registered. * Selector: 8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925 * * @param owner The owner address of the tokens. diff --git a/crates/precompile-native-currency/WETH.sol b/crates/precompile-native-currency/WETH.sol index e7c8e81e4..0e5b92f60 100644 --- a/crates/precompile-native-currency/WETH.sol +++ b/crates/precompile-native-currency/WETH.sol @@ -32,12 +32,12 @@ interface IWETH { * * @param to The address to transfer tokens to. * @param value The amount to be transferred. - * @return true if the transfer was succesful, revert otherwise. + * @return true if the transfer was successful, revert otherwise. */ function transfer(address to, uint256 value) external returns (bool); /** - * Event emited when deposit has been called. + * Event emitted when deposit has been called. * Selector: e1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c * * @param owner Owner of the tokens. @@ -46,7 +46,7 @@ interface IWETH { event Deposit(address indexed owner, uint256 value); /** - * Event emited when withdraw has been called. + * Event emitted when withdraw has been called. * Selector: 7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65 * * @param owner Owner of the tokens. @@ -55,12 +55,12 @@ interface IWETH { event Withdrawal(address indexed owner, uint256 value); /** - * Event emited when a transfer has been performed. + * Event emitted when a transfer has been performed. * Selector: ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef * * @param from The address sending the tokens * @param to The address receiving the tokens. - * @param value The amount of tokens transfered. + * @param value The amount of tokens transferred. */ event Transfer(address indexed from, address indexed to, uint256 value); } diff --git a/crates/precompile-utils/src/data.rs b/crates/precompile-utils/src/data.rs index a72dbe217..b90cb7fd5 100644 --- a/crates/precompile-utils/src/data.rs +++ b/crates/precompile-utils/src/data.rs @@ -144,7 +144,7 @@ impl<'a> EvmDataReader<'a> { Ok(data) } - /// Reads a pointer, returning a reader targetting the pointed location. + /// Reads a pointer, returning a reader targeting the pointed location. pub fn read_pointer(&mut self) -> EvmResult { let offset: usize = self .read::() @@ -253,11 +253,11 @@ impl EvmDataWriter { } } - /// Add offseted data at the end of this writer's data, updating the offsets. + /// Add offsetted data at the end of this writer's data, updating the offsets. fn bake_offsets(output: &mut Vec, offsets: Vec) { for mut offset_datum in offsets { let offset_position = offset_datum.offset_position; - // usize is big enough for this oveflow to be practicly impossible. + // usize is big enough for this overflow to be practically impossible. let offset_position_end = offset_position.checked_add(32).unwrap(); // The offset is the distance between the start of the data and the @@ -277,7 +277,7 @@ impl EvmDataWriter { } /// Write arbitrary bytes. - /// Doesn't handle any alignement checks, prefer using `write` instead if possible. + /// Doesn't handle any alignment checks, prefer using `write` instead if possible. fn write_raw_bytes(mut self, value: &[u8]) -> Self { self.data.extend_from_slice(value); self @@ -526,7 +526,7 @@ impl EvmData for Vec { for inner in value { // Any offset in items are relative to the start of the item instead of the - // start of the array. However if there is offseted data it must but appended after + // start of the array. However if there is offsetted data it must but appended after // all items (offsets) are written. We thus need to rely on `compute_offsets` to do // that, and must store a "shift" to correct the offsets. let shift = inner_writer.data.len(); @@ -534,9 +534,9 @@ impl EvmData for Vec { inner_writer = inner_writer.write_raw_bytes(&item_writer.data); for mut offset_datum in item_writer.offset_data { - // usize is big enough for this oveflow to be practicly impossible. + // usize is big enough for this overflow to be practically impossible. offset_datum.offset_shift = offset_datum.offset_shift.checked_add(32).unwrap(); - // usize is big enough for this oveflow to be practicly impossible. + // usize is big enough for this overflow to be practically impossible. offset_datum.offset_position = offset_datum.offset_position.checked_add(shift).unwrap(); inner_writer.offset_data.push(offset_datum); @@ -582,7 +582,7 @@ impl EvmData for Bytes { // Leave it as is if a multiple of 32, otherwise pad to next // multiple or 32. let chunks = length / 32; - // usize is big enough for this oveflow to be practicly impossible. + // usize is big enough for this overflow to be practically impossible. let padded_size = match length % 32 { 0 => chunks.checked_mul(32).unwrap(), _ => chunks.checked_add(1).unwrap().checked_mul(32).unwrap(), diff --git a/crates/precompile-utils/src/lib.rs b/crates/precompile-utils/src/lib.rs index a6dde71c0..f88fe3b5f 100644 --- a/crates/precompile-utils/src/lib.rs +++ b/crates/precompile-utils/src/lib.rs @@ -50,7 +50,7 @@ pub type EvmResult = Result; /// Trait similar to `fp_evm::Precompile` but with a `&self` parameter to manage some /// state (this state is only kept in a single transaction and is lost afterward). pub trait StatefulPrecompile { - /// Instanciate the precompile. + /// Instantiate the precompile. /// Will be called once when building the `PrecompileSet` at the start of each /// Ethereum transaction. fn new() -> Self; @@ -369,7 +369,7 @@ pub fn call_cost(value: U256, config: &evm::Config) -> u64 { let new_account = true; // u64 is big enough for transaction cost related operations. - // So, this oveflow is practicly impossible. + // So, this overflow is practically impossible. address_access_cost(is_cold, config.gas_call, config) .checked_add(xfer_cost(is_call_or_callcode, transfers_value)) .unwrap() @@ -383,7 +383,7 @@ pub fn call_cost(value: U256, config: &evm::Config) -> u64 { } impl PrecompileHandleExt for T { - /// Record cost of a log manualy. + /// Record cost of a log manually. /// This can be useful to record log costs early when their content have static size. #[must_use] fn record_log_costs_manual(&mut self, topics: usize, data_len: usize) -> EvmResult { diff --git a/crates/precompile-utils/src/precompile_set.rs b/crates/precompile-utils/src/precompile_set.rs index 0952f3255..375e225b0 100644 --- a/crates/precompile-utils/src/precompile_set.rs +++ b/crates/precompile-utils/src/precompile_set.rs @@ -1,6 +1,6 @@ //! Provide utils assemble precompiles and precompilesets into a //! final precompile set with security checks. All security checks are enabled by -//! default and must be disabled explicely throught type annotations. +//! default and must be disabled explicitly thought type annotations. use fp_evm::{IsPrecompileResult, Precompile, PrecompileHandle, PrecompileResult, PrecompileSet}; use frame_support::pallet_prelude::Get; @@ -56,7 +56,7 @@ pub trait DelegateCallSupport: sealed::Sealed { fn allow_delegate_call() -> bool; } -/// DELEGATECALL is forbiden. +/// DELEGATECALL is forbidden. pub struct ForbidDelegateCall; impl sealed::Sealed for ForbidDelegateCall {} impl DelegateCallSupport for ForbidDelegateCall { @@ -92,7 +92,7 @@ impl Get for AddressU64 { /// was a `PrecompileSet` containing only the precompile(set) it wraps. /// They can be combined into a real `PrecompileSet` using `PrecompileSetBuilder`. pub trait PrecompileSetFragment { - /// Instanciate the fragment. + /// Instantiate the fragment. fn new() -> Self; /// Execute the fragment. @@ -371,7 +371,7 @@ where Ok(mut recursion_level_map) => { let recursion_level = match recursion_level_map.get_mut(&code_address) { Some(recursion_level) => recursion_level, - None => return Some(Err(revert("couldn't retreive precompile nesting"))), + None => return Some(Err(revert("couldn't retrieve precompile nesting"))), }; *recursion_level = match recursion_level.checked_sub(1) { diff --git a/crates/precompile-utils/src/testing.rs b/crates/precompile-utils/src/testing.rs index 705411304..520985463 100644 --- a/crates/precompile-utils/src/testing.rs +++ b/crates/precompile-utils/src/testing.rs @@ -148,17 +148,17 @@ impl PrecompileHandle for MockHandle { Ok(()) } - /// Retreive the code address (what is the address of the precompile being called). + /// Retrieve the code address (what is the address of the precompile being called). fn code_address(&self) -> H160 { self.code_address } - /// Retreive the input data the precompile is called with. + /// Retrieve the input data the precompile is called with. fn input(&self) -> &[u8] { &self.input } - /// Retreive the context in which the precompile is executed. + /// Retrieve the context in which the precompile is executed. fn context(&self) -> &Context { &self.context } @@ -168,7 +168,7 @@ impl PrecompileHandle for MockHandle { self.is_static } - /// Retreive the gas limit of this call. + /// Retrieve the gas limit of this call. fn gas_limit(&self) -> Option { Some(self.gas_limit) } diff --git a/crates/precompile-utils/src/tests.rs b/crates/precompile-utils/src/tests.rs index 29c0e57ff..ab83ee84f 100644 --- a/crates/precompile-utils/src/tests.rs +++ b/crates/precompile-utils/src/tests.rs @@ -222,7 +222,7 @@ fn write_h256_array() { let writer_output = EvmDataWriter::new().write(array.clone()).build(); assert_eq!(writer_output.len(), 0xE0); - // We can read this "manualy" using simpler functions since arrays are 32-byte aligned. + // We can read this "manually" using simpler functions since arrays are 32-byte aligned. let mut reader = EvmDataReader::new(&writer_output); assert_eq!(reader.read::().expect("read offset"), 32.into()); @@ -263,7 +263,7 @@ fn write_u256_array() { let writer_output = EvmDataWriter::new().write(array.clone()).build(); assert_eq!(writer_output.len(), 0xE0); - // We can read this "manualy" using simpler functions since arrays are 32-byte aligned. + // We can read this "manually" using simpler functions since arrays are 32-byte aligned. let mut reader = EvmDataReader::new(&writer_output); assert_eq!(reader.read::().expect("read offset"), 32.into()); @@ -303,7 +303,7 @@ fn write_address_array() { ]; let writer_output = EvmDataWriter::new().write(array.clone()).build(); - // We can read this "manualy" using simpler functions since arrays are 32-byte aligned. + // We can read this "manually" using simpler functions since arrays are 32-byte aligned. let mut reader = EvmDataReader::new(&writer_output); assert_eq!(reader.read::().expect("read offset"), 32.into()); @@ -372,7 +372,7 @@ fn write_address_nested_array() { let writer_output = EvmDataWriter::new().write(array.clone()).build(); assert_eq!(writer_output.len(), 0x160); - // We can read this "manualy" using simpler functions since arrays are 32-byte aligned. + // We can read this "manually" using simpler functions since arrays are 32-byte aligned. let mut reader = EvmDataReader::new(&writer_output); assert_eq!(reader.read::().expect("read offset"), 0x20.into()); // 0x00 @@ -427,7 +427,7 @@ fn write_multiple_arrays() { assert_eq!(writer_output.len(), 0x120); - // We can read this "manualy" using simpler functions since arrays are 32-byte aligned. + // We can read this "manually" using simpler functions since arrays are 32-byte aligned. let mut reader = EvmDataReader::new(&writer_output); assert_eq!(reader.read::().expect("read 1st offset"), 0x40.into()); // 0x00 @@ -492,7 +492,7 @@ fn write_bytes() { let writer_output = EvmDataWriter::new().write(Bytes::from(&data[..])).build(); - // We can read this "manualy" using simpler functions. + // We can read this "manually" using simpler functions. let mut reader = EvmDataReader::new(&writer_output); // We pad data to a multiple of 32 bytes. @@ -528,7 +528,7 @@ fn write_string() { let writer_output = EvmDataWriter::new().write(Bytes::from(data)).build(); - // We can read this "manualy" using simpler functions. + // We can read this "manually" using simpler functions. let mut reader = EvmDataReader::new(&writer_output); // We pad data to next multiple of 32 bytes. diff --git a/crates/primitives-auth-ticket/src/lib.rs b/crates/primitives-auth-ticket/src/lib.rs index 6dbe7c6db..37b41ea5b 100644 --- a/crates/primitives-auth-ticket/src/lib.rs +++ b/crates/primitives-auth-ticket/src/lib.rs @@ -1,6 +1,6 @@ //! Plain and opaque Auth Tickets. -// Either generate code at stadard mode, or `no_std`, based on the `std` feature presence. +// Either generate code at standard mode, or `no_std`, based on the `std` feature presence. #![cfg_attr(not(feature = "std"), no_std)] use codec::{Decode, Encode}; diff --git a/crates/primitives-currency-swap-proxy/src/lib.rs b/crates/primitives-currency-swap-proxy/src/lib.rs index 152050ebf..fcc5c31eb 100644 --- a/crates/primitives-currency-swap-proxy/src/lib.rs +++ b/crates/primitives-currency-swap-proxy/src/lib.rs @@ -1,6 +1,6 @@ //! Currency swap proxy related primitives. -// Either generate code at stadard mode, or `no_std`, based on the `std` feature presence. +// Either generate code at standard mode, or `no_std`, based on the `std` feature presence. #![cfg_attr(not(feature = "std"), no_std)] use frame_support::{ @@ -38,7 +38,7 @@ pub trait Config { /// The type used as an Account ID for the currency we proxy to. type AccountIdTo; - /// The curreny swap implementation to use for proxying. + /// The currency swap implementation to use for proxying. type CurrencySwap: CurrencySwap; } diff --git a/crates/primitives-currency-swap/src/lib.rs b/crates/primitives-currency-swap/src/lib.rs index 7b8601c9f..13ff28353 100644 --- a/crates/primitives-currency-swap/src/lib.rs +++ b/crates/primitives-currency-swap/src/lib.rs @@ -1,6 +1,6 @@ //! Currency swap related primitives. -// Either generate code at stadard mode, or `no_std`, based on the `std` feature presence. +// Either generate code at standard mode, or `no_std`, based on the `std` feature presence. #![cfg_attr(not(feature = "std"), no_std)] use frame_support::{ diff --git a/crates/robonode-client/src/authenticate.rs b/crates/robonode-client/src/authenticate.rs index f6901110d..4dbe3c40e 100644 --- a/crates/robonode-client/src/authenticate.rs +++ b/crates/robonode-client/src/authenticate.rs @@ -61,13 +61,13 @@ pub enum AuthenticateError { /// the public key that the person enrolled with don't match. #[error("signature invalid")] SignatureInvalid, - /// A logic internal error occured on the server end. + /// A logic internal error occurred on the server end. #[error("logic internal error")] LogicInternal, - /// An error with an unknown code occured. + /// An error with an unknown code occurred. #[error("unknown error code: {0}")] UnknownCode(String), - /// Some other error occured. + /// Some other error occurred. #[error("unknown error: {0}")] Unknown(String), } diff --git a/crates/robonode-client/src/enroll.rs b/crates/robonode-client/src/enroll.rs index 1e18fcd0f..c71301580 100644 --- a/crates/robonode-client/src/enroll.rs +++ b/crates/robonode-client/src/enroll.rs @@ -30,7 +30,7 @@ pub struct EnrollRequest<'a> { /// the rest of the parameters necessary to conduct a liveness check. pub liveness_data: &'a [u8], /// The signature of the liveness data with the private key of the node. - /// Proves the posession of the private key by the liveness data bearer. + /// Proves the possession of the private key by the liveness data bearer. pub liveness_data_signature: &'a [u8], } @@ -53,13 +53,13 @@ pub enum EnrollError { /// The person is already enrolled. #[error("person already enrolled")] PersonAlreadyEnrolled, - /// A logic internal error occured on the server end. + /// A logic internal error occurred on the server end. #[error("logic internal error")] LogicInternal, - /// An error with an unknown code occured. + /// An error with an unknown code occurred. #[error("unknown error code: {0}")] UnknownCode(String), - /// Some other error occured. + /// Some other error occurred. #[error("unknown error: {0}")] Unknown(String), } diff --git a/crates/robonode-client/src/get_facetec_device_sdk_params.rs b/crates/robonode-client/src/get_facetec_device_sdk_params.rs index 3d8b83a01..198a578f5 100644 --- a/crates/robonode-client/src/get_facetec_device_sdk_params.rs +++ b/crates/robonode-client/src/get_facetec_device_sdk_params.rs @@ -27,7 +27,7 @@ type GetFacetecDeviceSdkParamsResponse = Map; /// The get-facetec-session-token-specific error condition. #[derive(Error, Debug, PartialEq)] pub enum GetFacetecDeviceSdkParamsError { - /// Some error occured. + /// Some error occurred. #[error("unknown error: {0}")] Unknown(String), } diff --git a/crates/robonode-client/src/get_facetec_session_token.rs b/crates/robonode-client/src/get_facetec_session_token.rs index 107a6d207..00b7662e4 100644 --- a/crates/robonode-client/src/get_facetec_session_token.rs +++ b/crates/robonode-client/src/get_facetec_session_token.rs @@ -32,7 +32,7 @@ pub struct GetFacetecSessionTokenResponse { /// The get-facetec-session-token-specific error condition. #[derive(Error, Debug, PartialEq)] pub enum GetFacetecSessionTokenError { - /// Some error occured. + /// Some error occurred. #[error("unknown error: {0}")] Unknown(String), } @@ -65,7 +65,7 @@ mod tests { let mock_server = MockServer::start().await; let sample_response = serde_json::json!({ - "sessionToken": "my sesion token", + "sessionToken": "my session token", }); let expected_response: GetFacetecSessionTokenResponse = diff --git a/crates/robonode-client/src/lib.rs b/crates/robonode-client/src/lib.rs index 4d9f98539..ba7e95ecb 100644 --- a/crates/robonode-client/src/lib.rs +++ b/crates/robonode-client/src/lib.rs @@ -29,7 +29,7 @@ pub enum Error { /// The robonode client. #[derive(Debug)] pub struct Client { - /// Underyling HTTP client used to execute network calls. + /// Underlying HTTP client used to execute network calls. pub reqwest: reqwest::Client, /// The base URL to use for the routes. pub base_url: String, diff --git a/crates/robonode-server/src/http/error.rs b/crates/robonode-server/src/http/error.rs index 254b5a18f..f56248f12 100644 --- a/crates/robonode-server/src/http/error.rs +++ b/crates/robonode-server/src/http/error.rs @@ -28,7 +28,7 @@ impl Logic { } } -/// A kind of internal logic error occured that we don't want to expose. +/// A kind of internal logic error occurred that we don't want to expose. const INTERNAL: Logic = Logic::new(StatusCode::INTERNAL_SERVER_ERROR, "LOGIC_INTERNAL_ERROR"); impl From for Logic { diff --git a/crates/robonode-server/src/http/mod.rs b/crates/robonode-server/src/http/mod.rs index 5f6b2d76f..d9a8bd53e 100644 --- a/crates/robonode-server/src/http/mod.rs +++ b/crates/robonode-server/src/http/mod.rs @@ -1,4 +1,4 @@ -//! The HTTP transport realted stuff. +//! The HTTP transport related stuff. mod error; mod filters; diff --git a/crates/robonode-server/src/http/tests.rs b/crates/robonode-server/src/http/tests.rs index e15f4ab23..2ced55575 100644 --- a/crates/robonode-server/src/http/tests.rs +++ b/crates/robonode-server/src/http/tests.rs @@ -199,7 +199,7 @@ enum SuccessResponse { } trivial_success_tests! [ - /// This test verifies getting expected HTTP response during succesfull enrollment. + /// This test verifies getting expected HTTP response during successful enrollment. { test_name = enroll_success, method = "POST", @@ -215,7 +215,7 @@ trivial_success_tests! [ expected_response = SuccessResponse::Empty, }, - /// This test verifies getting expected HTTP response during succesfull authentication request. + /// This test verifies getting expected HTTP response during successful authentication request. { test_name = authenticate_success, method = "POST", @@ -237,7 +237,7 @@ trivial_success_tests! [ }, /// This test verifies getting expected HTTP response during - /// succesfull get_facetec_session_token request. + /// successful get_facetec_session_token request. { test_name = get_facetec_session_token_success, method = "GET", @@ -314,7 +314,7 @@ trivial_success_tests! [ trivial_error_tests! [ /// This test verifies getting expected HTTP response - /// during failer enrollment request with InvalidPublicKey error. + /// during failed enrollment request with InvalidPublicKey error. { test_name = enroll_error_invalid_public_key, method = "POST", @@ -331,7 +331,7 @@ trivial_error_tests! [ }, /// This test verifies getting expected HTTP response - /// during failer enrollment request with SignatureInvalid error. + /// during failed enrollment request with SignatureInvalid error. { test_name = enroll_error_invalid_signature, method = "POST", @@ -348,7 +348,7 @@ trivial_error_tests! [ }, /// This test verifies getting expected HTTP response - /// during failer enrollment request with InvalidLivenessData error. + /// during failed enrollment request with InvalidLivenessData error. { test_name = enroll_error_invalid_liveness_data, method = "POST", @@ -365,7 +365,7 @@ trivial_error_tests! [ }, /// This test verifies getting expected HTTP response - /// during failer enrollment request with FaceScanRejected error. + /// during failed enrollment request with FaceScanRejected error. { test_name = enroll_error_face_scan_rejected, method = "POST", @@ -382,7 +382,7 @@ trivial_error_tests! [ }, /// This test verifies getting expected HTTP response - /// during failer enrollment request with PublicKeyAlreadyUsed error. + /// during failed enrollment request with PublicKeyAlreadyUsed error. { test_name = enroll_error_public_key_already_used, method = "POST", @@ -399,7 +399,7 @@ trivial_error_tests! [ }, /// This test verifies getting expected HTTP response - /// during failer enrollment request with PersonAlreadyEnrolled error. + /// during failed enrollment request with PersonAlreadyEnrolled error. { test_name = enroll_error_person_already_enrolled, method = "POST", @@ -416,7 +416,7 @@ trivial_error_tests! [ }, /// This test verifies getting expected HTTP response - /// during failer enrollment request with InternalErrorEnrollment error. + /// during failed enrollment request with InternalErrorEnrollment error. { test_name = enroll_error_internal_enrollment, method = "POST", @@ -435,7 +435,7 @@ trivial_error_tests! [ }, /// This test verifies getting expected HTTP response - /// during failer enrollment request with InternalErrorEnrollmentUnsuccessful error. + /// during failed enrollment request with InternalErrorEnrollmentUnsuccessful error. { test_name = enroll_error_internal_enrollment_unsuccessful, method = "POST", @@ -452,7 +452,7 @@ trivial_error_tests! [ }, /// This test verifies getting expected HTTP response - /// during failer enrollment request with InternalErrorDbSearch error. + /// during failed enrollment request with InternalErrorDbSearch error. { test_name = enroll_error_internal_db_search, method = "POST", @@ -471,7 +471,7 @@ trivial_error_tests! [ }, /// This test verifies getting expected HTTP response - /// during failer enrollment request with InternalErrorDbSearchUnsuccessful error. + /// during failed enrollment request with InternalErrorDbSearchUnsuccessful error. { test_name = enroll_error_internal_db_search_unsuccessful, method = "POST", @@ -488,7 +488,7 @@ trivial_error_tests! [ }, /// This test verifies getting expected HTTP response - /// during failer enrollment request with InternalErrorDbEnroll error. + /// during failed enrollment request with InternalErrorDbEnroll error. { test_name = enroll_error_internal_db_enroll, method = "POST", @@ -507,7 +507,7 @@ trivial_error_tests! [ }, /// This test verifies getting expected HTTP response - /// during failer enrollment request with InternalErrorDbEnrollUnsuccessful error. + /// during failed enrollment request with InternalErrorDbEnrollUnsuccessful error. { test_name = enroll_error_internal_db_enroll_unsuccessful, method = "POST", @@ -524,7 +524,7 @@ trivial_error_tests! [ }, /// This test verifies getting expected HTTP response - /// during failer authentication request with InvalidLivenessData error. + /// during failed authentication request with InvalidLivenessData error. { test_name = authenticate_error_invalid_liveness_data, method = "POST", @@ -540,7 +540,7 @@ trivial_error_tests! [ }, /// This test verifies getting expected HTTP response - /// during failer authentication request with FaceScanRejected error. + /// during failed authentication request with FaceScanRejected error. { test_name = authenticate_error_face_scan_rejected, method = "POST", @@ -556,7 +556,7 @@ trivial_error_tests! [ }, /// This test verifies getting expected HTTP response - /// during failer authentication request with PersonNotFound error. + /// during failed authentication request with PersonNotFound error. { test_name = authenticate_error_person_not_found, method = "POST", @@ -572,7 +572,7 @@ trivial_error_tests! [ }, /// This test verifies getting expected HTTP response - /// during failer authentication request with SignatureInvalid error. + /// during failed authentication request with SignatureInvalid error. { test_name = authenticate_error_signature_invalid, method = "POST", @@ -588,9 +588,9 @@ trivial_error_tests! [ }, /// This test verifies getting expected HTTP response - /// during failer authentication request with InternalErrorEnrollment error. + /// during failed authentication request with InternalErrorEnrollment error. { - test_name = authenticate_error_internall_enrollment, + test_name = authenticate_error_internal_enrollment, method = "POST", path = "/authenticate", input = op_authenticate::Request { @@ -608,9 +608,9 @@ trivial_error_tests! [ }, /// This test verifies getting expected HTTP response - /// during failer authentication request with InternalErrorEnrollmentUnsuccessful error. + /// during failed authentication request with InternalErrorEnrollmentUnsuccessful error. { - test_name = authenticate_error_internall_enrollment_unsuccessful, + test_name = authenticate_error_internal_enrollment_unsuccessful, method = "POST", path = "/authenticate", input = op_authenticate::Request { @@ -624,9 +624,9 @@ trivial_error_tests! [ }, /// This test verifies getting expected HTTP response - /// during failer authentication request with InternalErrorDbSearch error. + /// during failed authentication request with InternalErrorDbSearch error. { - test_name = authenticate_error_internall_db_search, + test_name = authenticate_error_internal_db_search, method = "POST", path = "/authenticate", input = op_authenticate::Request { @@ -644,9 +644,9 @@ trivial_error_tests! [ }, /// This test verifies getting expected HTTP response - /// during failer authentication request with InternalErrorDbSearchUnsuccessful error. + /// during failed authentication request with InternalErrorDbSearchUnsuccessful error. { - test_name = authenticate_error_internall_db_search_unsuccessful, + test_name = authenticate_error_internal_db_search_unsuccessful, method = "POST", path = "/authenticate", input = op_authenticate::Request { @@ -660,9 +660,9 @@ trivial_error_tests! [ }, /// This test verifies getting expected HTTP response - /// during failer authentication request with InternalErrorDbSearchMatchLevelMismatch error. + /// during failed authentication request with InternalErrorDbSearchMatchLevelMismatch error. { - test_name = authenticate_error_internall_db_search_match_level_mismatch, + test_name = authenticate_error_internal_db_search_match_level_mismatch, method = "POST", path = "/authenticate", input = op_authenticate::Request { @@ -676,9 +676,9 @@ trivial_error_tests! [ }, /// This test verifies getting expected HTTP response - /// during failer authentication request with InternalErrorInvalidPublicKeyHex error. + /// during failed authentication request with InternalErrorInvalidPublicKeyHex error. { - test_name = authenticate_error_internall_invalid_public_key_hex, + test_name = authenticate_error_internal_invalid_public_key_hex, method = "POST", path = "/authenticate", input = op_authenticate::Request { @@ -692,9 +692,9 @@ trivial_error_tests! [ }, /// This test verifies getting expected HTTP response - /// during failer authentication request with InternalErrorInvalidPublicKey error. + /// during failed authentication request with InternalErrorInvalidPublicKey error. { - test_name = authenticate_error_internall_invalid_public_key, + test_name = authenticate_error_internal_invalid_public_key, method = "POST", path = "/authenticate", input = op_authenticate::Request { @@ -708,9 +708,9 @@ trivial_error_tests! [ }, /// This test verifies getting expected HTTP response - /// during failer authentication request with InternalErrorSignatureVerificationFailed error. + /// during failed authentication request with InternalErrorSignatureVerificationFailed error. { - test_name = authenticate_error_internall_signature_verification_failed, + test_name = authenticate_error_internal_signature_verification_failed, method = "POST", path = "/authenticate", input = op_authenticate::Request { @@ -724,7 +724,7 @@ trivial_error_tests! [ }, /// This test verifies getting expected HTTP response - /// during failer authentication request with InternalErrorAuthTicketSigningFailed error. + /// during failed authentication request with InternalErrorAuthTicketSigningFailed error. { test_name = authenticate_error_internal_auth_ticket_signing_failed, method = "POST", @@ -740,7 +740,7 @@ trivial_error_tests! [ }, /// This test verifies getting expected HTTP response during - /// failer get_facetec_session_token request with internal error. + /// failed get_facetec_session_token request with internal error. { test_name = get_facetec_session_token_error_internal, method = "GET", diff --git a/crates/robonode-server/src/logic/facetec_utils.rs b/crates/robonode-server/src/logic/facetec_utils.rs index a18c48138..5c719345f 100644 --- a/crates/robonode-server/src/logic/facetec_utils.rs +++ b/crates/robonode-server/src/logic/facetec_utils.rs @@ -2,14 +2,14 @@ use facetec_api_client as ft; -/// An enum with all of the meaningful outcomes from the db seatch result. +/// An enum with all of the meaningful outcomes from the db search result. pub enum DbSearchResult { /// A usual response. Response(ft::db_search::Response), - /// A special case - an error indicating that tthe group we searched at doesn't exist. + /// A special case - an error indicating that the group we searched at doesn't exist. /// We can treat it as a valid response with no results for our use case. NoGroupError, - /// Some other error occured. + /// Some other error occurred. OtherError(ft::Error), } diff --git a/crates/robonode-server/src/logic/mod.rs b/crates/robonode-server/src/logic/mod.rs index ff7fa2c7b..f383afe02 100644 --- a/crates/robonode-server/src/logic/mod.rs +++ b/crates/robonode-server/src/logic/mod.rs @@ -35,7 +35,7 @@ pub struct Logic { pub struct Locked { /// The sequence number. pub sequence: Sequence, - /// An execution ID, to be used together with sequence to guarantee unqiueness of the temporary + /// An execution ID, to be used together with sequence to guarantee uniqueness of the temporary /// enrollment external database IDs. pub execution_id: uuid::Uuid, /// The client for the FaceTec Server API. @@ -49,7 +49,7 @@ pub struct Locked { /// The FaceTec Device SDK params. #[derive(Debug)] pub struct FacetecDeviceSdkParams { - /// The public FaceMap encription key. + /// The public FaceMap encryption key. pub public_face_map_encryption_key: String, /// The device key identifier. pub device_key_identifier: String, diff --git a/crates/robonode-server/src/logic/op_authenticate.rs b/crates/robonode-server/src/logic/op_authenticate.rs index 0fec1aadc..b8e1209c7 100644 --- a/crates/robonode-server/src/logic/op_authenticate.rs +++ b/crates/robonode-server/src/logic/op_authenticate.rs @@ -16,7 +16,7 @@ pub struct Request { /// The liveness data that the validator owner provided. pub liveness_data: OpaqueLivenessData, /// The signature of the liveness data with the private key of the node. - /// Proves the posession of the private key by the liveness data bearer. + /// Proves the possession of the private key by the liveness data bearer. pub liveness_data_signature: Vec, } diff --git a/crates/robonode-server/src/logic/op_enroll.rs b/crates/robonode-server/src/logic/op_enroll.rs index 4aa53ff21..59c4518b6 100644 --- a/crates/robonode-server/src/logic/op_enroll.rs +++ b/crates/robonode-server/src/logic/op_enroll.rs @@ -17,7 +17,7 @@ pub struct Request { /// The liveness data that the validator owner provided. pub liveness_data: OpaqueLivenessData, /// The signature of the liveness data with the private key of the node. - /// Proves the posession of the private key by the liveness data bearer. + /// Proves the possession of the private key by the liveness data bearer. pub liveness_data_signature: Vec, } diff --git a/crates/robonode-server/src/logic/op_get_facetec_device_sdk_params.rs b/crates/robonode-server/src/logic/op_get_facetec_device_sdk_params.rs index fe55b55d1..da4c1a364 100644 --- a/crates/robonode-server/src/logic/op_get_facetec_device_sdk_params.rs +++ b/crates/robonode-server/src/logic/op_get_facetec_device_sdk_params.rs @@ -13,7 +13,7 @@ pub struct Request; #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct Response { - /// The public FaceMap encription key. + /// The public FaceMap encryption key. pub public_face_map_encryption_key: String, /// The device key identifier. pub device_key_identifier: String, diff --git a/crates/robonode-server/src/sequence.rs b/crates/robonode-server/src/sequence.rs index b6afe6bf2..a7978672b 100644 --- a/crates/robonode-server/src/sequence.rs +++ b/crates/robonode-server/src/sequence.rs @@ -12,7 +12,7 @@ impl Sequence { /// Increment the sequence value. pub fn inc(&mut self) { - // u64 is big enough for this oveflow to be practicly impossible. + // u64 is big enough for this overflow to be practically impossible. self.0 = self.0.checked_add(1).unwrap(); } diff --git a/crates/rpc-validator-key-logic/src/lib.rs b/crates/rpc-validator-key-logic/src/lib.rs index dad20d2ee..1c3cfed6f 100644 --- a/crates/rpc-validator-key-logic/src/lib.rs +++ b/crates/rpc-validator-key-logic/src/lib.rs @@ -8,14 +8,12 @@ mod errors; pub use errors::*; /// Try to extract the validator key. -pub fn validator_public_key( - validator_key_exctractor: &VKE, -) -> Result +pub fn validator_public_key(validator_key_extractor: &VKE) -> Result where VKE: KeyExtractorT, VKE::Error: std::fmt::Debug, { - let validator_public_key = validator_key_exctractor + let validator_public_key = validator_key_extractor .extract_key() .map_err(|error| { tracing::error!( diff --git a/crates/vesting-schedule-linear/src/traits.rs b/crates/vesting-schedule-linear/src/traits.rs index 036b5f700..458c5162f 100644 --- a/crates/vesting-schedule-linear/src/traits.rs +++ b/crates/vesting-schedule-linear/src/traits.rs @@ -5,11 +5,11 @@ use core::marker::PhantomData; /// An error that can happen at [`FracScale`]. #[derive(Debug, Clone, PartialEq)] pub enum FracScaleError { - /// An overflow occured. + /// An overflow occurred. Overflow, - /// A division by zero occured. + /// A division by zero occurred. DivisionByZero, - /// Convertion from the internal computations type to the value type failed. + /// Conversion from the internal computations type to the value type failed. Conversion, } diff --git a/typos.toml b/typos.toml new file mode 100644 index 000000000..a03253f79 --- /dev/null +++ b/typos.toml @@ -0,0 +1,10 @@ +[default] +extend-ignore-identifiers-re = [".+HDNode.*"] + +[default.extend-identifiers] +# Substrate choices we can't / won't change. +"Applyable" = "Applyable" +"assert_applyable_validate_all_transaction_sources" = "assert_applyable_validate_all_transaction_sources" +"prepare_applyable_data" = "prepare_applyable_data" +# DEFLATE +"flate2" = "flate2" diff --git a/utils/checks/features b/utils/checks/features index fc6c94643..b0464d6d0 100755 --- a/utils/checks/features +++ b/utils/checks/features @@ -29,7 +29,7 @@ def find_deps(package) # 1. Find the resolver node. node = METADATA['resolve']['nodes'].find { |e_node| e_node['id'] == package['id'] } - # 2. Go from the resovler node to the dependencies. + # 2. Go from the resolver node to the dependencies. node['deps'].each_with_object({}) do |dep, hash| # Simply find the package information by correlating the package id. dep_package = METADATA['packages'].find { |e_package| e_package['id'] == dep['pkg'] } @@ -57,10 +57,10 @@ end def package_feature_enabled_by(package, enabled_by, what) features = package['features'] || {} - enabled_featues = features[enabled_by] || [] + enabled_features = features[enabled_by] || [] - return true if enabled_featues.include?(what) - return true if enabled_featues.any? { |e| package_feature_enabled_by(package, e, what) } + return true if enabled_features.include?(what) + return true if enabled_features.any? { |e| package_feature_enabled_by(package, e, what) } false end diff --git a/utils/e2e-tests/bash/tests/base/block-check.sh b/utils/e2e-tests/bash/tests/base/block-check.sh index 0101db2c5..e37ee17a1 100755 --- a/utils/e2e-tests/bash/tests/base/block-check.sh +++ b/utils/e2e-tests/bash/tests/base/block-check.sh @@ -28,4 +28,4 @@ jq \ --exit-status \ '.[] | select(.transfer.status.inBlock != null) | length == 1' <<<"$POLKA_JSON" -printf "Test succeded\n" >&2 +printf "Test succeeded\n" >&2 diff --git a/utils/e2e-tests/bash/tests/base/cmd-auth-url.sh b/utils/e2e-tests/bash/tests/base/cmd-auth-url.sh index 0a7c170a7..ac07de2ef 100755 --- a/utils/e2e-tests/bash/tests/base/cmd-auth-url.sh +++ b/utils/e2e-tests/bash/tests/base/cmd-auth-url.sh @@ -13,4 +13,4 @@ if [[ "$OUTPUT" != "$EXPECTED" ]]; then exit 1 fi -printf "Test succeded\n" >&2 +printf "Test succeeded\n" >&2 diff --git a/utils/e2e-tests/bash/tests/base/cmd-bioauth-key.sh b/utils/e2e-tests/bash/tests/base/cmd-bioauth-key.sh index 83d1afcdf..5e611408c 100755 --- a/utils/e2e-tests/bash/tests/base/cmd-bioauth-key.sh +++ b/utils/e2e-tests/bash/tests/base/cmd-bioauth-key.sh @@ -28,4 +28,4 @@ if [[ "$INSPECT_OUTPUT" != "$EXPECTED_INSPECT_OUTPUT" ]]; then exit 1 fi -printf "Test succeded\n" >&2 +printf "Test succeeded\n" >&2 diff --git a/utils/e2e-tests/bash/tests/base/help.sh b/utils/e2e-tests/bash/tests/base/help.sh index 0e67752ce..99d41a0e4 100755 --- a/utils/e2e-tests/bash/tests/base/help.sh +++ b/utils/e2e-tests/bash/tests/base/help.sh @@ -94,4 +94,4 @@ compare() { compare -printf "Test succeded\n" >&2 +printf "Test succeeded\n" >&2 diff --git a/utils/e2e-tests/bash/tests/base/state-check.sh b/utils/e2e-tests/bash/tests/base/state-check.sh index 9d6215d1d..2367c0505 100755 --- a/utils/e2e-tests/bash/tests/base/state-check.sh +++ b/utils/e2e-tests/bash/tests/base/state-check.sh @@ -14,7 +14,7 @@ TIME_IN_SEC=20 run_with_timeout() { ANCHOR="$SECONDS" if timeout "$@"; then - printf "App run lasted for %d seconds and was terminated successfully (wich is bad because we expect it to keep running)\n" "$(("$SECONDS" - "$ANCHOR"))" >&2 + printf "App run lasted for %d seconds and was terminated successfully (which is bad because we expect it to keep running)\n" "$(("$SECONDS" - "$ANCHOR"))" >&2 exit else EXITCODE="$?" @@ -33,4 +33,4 @@ for RUN in {1..2}; do run_with_timeout "$TIME_IN_SEC" "${COMMAND_TO_RUN[@]}" done -printf "Test succeded\n" >&2 +printf "Test succeeded\n" >&2 diff --git a/utils/e2e-tests/bash/tests/try-runtime/execute-block.sh b/utils/e2e-tests/bash/tests/try-runtime/execute-block.sh index 9f8220c3b..2a43576ef 100755 --- a/utils/e2e-tests/bash/tests/try-runtime/execute-block.sh +++ b/utils/e2e-tests/bash/tests/try-runtime/execute-block.sh @@ -34,4 +34,4 @@ wait_block_with_timeout 5 50 # Run try-runtime execute-block command. "$HUMANODE_PEER_PATH" try-runtime --runtime existing --detailed-log-output execute-block live --uri "ws://127.0.0.1:9944" -printf "Test succeded\n" >&2 +printf "Test succeeded\n" >&2 diff --git a/utils/e2e-tests/bash/tests/try-runtime/on-runtime-upgrade-live.sh b/utils/e2e-tests/bash/tests/try-runtime/on-runtime-upgrade-live.sh index 8195e157b..00e755568 100755 --- a/utils/e2e-tests/bash/tests/try-runtime/on-runtime-upgrade-live.sh +++ b/utils/e2e-tests/bash/tests/try-runtime/on-runtime-upgrade-live.sh @@ -6,10 +6,10 @@ LIVE_NETWORK_URL="wss://explorer-rpc-ws.mainnet.stages.humanode.io:443" # Run try-runtime on-runtime-upgrade command. "$HUMANODE_PEER_PATH" try-runtime \ --detailed-log-output \ - --runtime "$RUNTIME_WASM_PATH" \ + --runtime "$RUNTIME_WASM_PATH" \ on-runtime-upgrade \ --checks=all \ live \ --uri "$LIVE_NETWORK_URL" -printf "Test succeded\n" >&2 +printf "Test succeeded\n" >&2 diff --git a/utils/e2e-tests/ts/lib/eth.ts b/utils/e2e-tests/ts/lib/eth.ts index d34ada16a..130f16fe1 100644 --- a/utils/e2e-tests/ts/lib/eth.ts +++ b/utils/e2e-tests/ts/lib/eth.ts @@ -3,4 +3,4 @@ export const SUBSTRATE_DEV_SEED_PHRASE = export const ROOT_DEV_ACCOUNT_DERIVATION_PATH = "m/44'/60'/0'/0" as const; -export const DEV_ACCOUNT_INDICIES = [0, 1] as const; +export const DEV_ACCOUNT_INDICES = [0, 1] as const; diff --git a/utils/e2e-tests/ts/lib/ethEthers.ts b/utils/e2e-tests/ts/lib/ethEthers.ts index a566986fb..50d180600 100644 --- a/utils/e2e-tests/ts/lib/ethEthers.ts +++ b/utils/e2e-tests/ts/lib/ethEthers.ts @@ -2,7 +2,7 @@ import { HDNodeWallet, ethers, Mnemonic, Wallet } from "ethers"; import { RunNodeState } from "./node"; import { arrayMap } from "./jsbase"; import { - DEV_ACCOUNT_INDICIES, + DEV_ACCOUNT_INDICES, ROOT_DEV_ACCOUNT_DERIVATION_PATH, SUBSTRATE_DEV_SEED_PHRASE, } from "./eth"; @@ -46,7 +46,7 @@ export const devHDNodeWalletRoot = HDNodeWallet.fromMnemonic( ROOT_DEV_ACCOUNT_DERIVATION_PATH, ); -export const devHDNodeWallets = arrayMap(DEV_ACCOUNT_INDICIES, (accountIndex) => +export const devHDNodeWallets = arrayMap(DEV_ACCOUNT_INDICES, (accountIndex) => devHDNodeWalletRoot.deriveChild(accountIndex), ); diff --git a/utils/e2e-tests/ts/lib/ethViem.ts b/utils/e2e-tests/ts/lib/ethViem.ts index 3df3734e6..09a028065 100644 --- a/utils/e2e-tests/ts/lib/ethViem.ts +++ b/utils/e2e-tests/ts/lib/ethViem.ts @@ -1,7 +1,7 @@ import { RunNodeState } from "./node"; import { arrayMap } from "./jsbase"; import { - DEV_ACCOUNT_INDICIES, + DEV_ACCOUNT_INDICES, ROOT_DEV_ACCOUNT_DERIVATION_PATH, SUBSTRATE_DEV_SEED_PHRASE, } from "./eth"; @@ -86,7 +86,7 @@ export const publicClientFromNodeWebSocket = ( ): PublicClientWebSocket => publicClientWebSocket(node.meta.rpcUrlWs, addCleanup); -export const devAccounts = arrayMap(DEV_ACCOUNT_INDICIES, (accountIndex) => +export const devAccounts = arrayMap(DEV_ACCOUNT_INDICES, (accountIndex) => mnemonicToAccount(SUBSTRATE_DEV_SEED_PHRASE, { path: `${ROOT_DEV_ACCOUNT_DERIVATION_PATH}/${accountIndex}`, }), diff --git a/utils/e2e-tests/ts/lib/node.ts b/utils/e2e-tests/ts/lib/node.ts index 84b1546c1..4b14bdc15 100644 --- a/utils/e2e-tests/ts/lib/node.ts +++ b/utils/e2e-tests/ts/lib/node.ts @@ -75,7 +75,7 @@ export const runNode = ( resolve(); } - reject(new Error("attempts exausted")); + reject(new Error("attempts exhausted")); }); const cleanup = async () => { diff --git a/utils/weights/benchmark-all b/utils/weights/benchmark-all index 4fb4b839d..3961135c0 100755 --- a/utils/weights/benchmark-all +++ b/utils/weights/benchmark-all @@ -3,7 +3,7 @@ set -euo pipefail cd "$(dirname "${BASH_SOURCE[0]}")/../.." # Path to the humanode-peer. -BENCHMARK_HUMANODE_PEER="${BENCHMARK_HUMANODE_PEER:?A path to the humanode-peer is requied}" +BENCHMARK_HUMANODE_PEER="${BENCHMARK_HUMANODE_PEER:?A path to the humanode-peer is required}" # Benchmark execution result directory. BENCHMARK_OUTPUT_DIR="${BENCHMARK_OUTPUT_DIR:-"crates/humanode-runtime/src/weights"}"