Skip to content
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
2 changes: 1 addition & 1 deletion crates/bridge-pot-currency-swap/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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::{
Expand Down
4 changes: 2 additions & 2 deletions crates/crypto-utils-evm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion crates/devutil-auth-ticket/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<u8>,
/// The auth ticket to sign.
pub auth_ticket: AuthTicket,
Expand Down
4 changes: 2 additions & 2 deletions crates/eip712-common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
6 changes: 3 additions & 3 deletions crates/facetec-api-client/src/enrollment3d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion crates/facetec-api-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub struct ServerError {
/// The robonode client.
#[derive(Debug)]
pub struct Client<RBEI> {
/// 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,
Expand Down
2 changes: 1 addition & 1 deletion crates/humanode-peer/src/build_info.rs
Original file line number Diff line number Diff line change
@@ -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");
Expand Down
4 changes: 2 additions & 2 deletions crates/humanode-peer/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion crates/humanode-peer/src/cli/root.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T: CliConfigurationExt>(
&self,
command: &T,
Expand Down
4 changes: 2 additions & 2 deletions crates/humanode-peer/src/cli/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<F, E>(future: F) -> std::result::Result<(), E>
where
F: Future<Output = std::result::Result<(), E>>,
Expand Down Expand Up @@ -101,7 +101,7 @@ impl<C: SubstrateCli> Runner<C> {
future.await
}

/// Execute syncronously.
/// Execute synchronously.
pub fn sync_run<E>(
self,
runner: impl FnOnce(Configuration) -> std::result::Result<(), E>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion crates/humanode-peer/src/time_warp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down
4 changes: 2 additions & 2 deletions crates/humanode-peer/src/validator_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ impl<PK> AppCryptoSigner<PK> {
}
}

/// 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,
}
Expand Down
2 changes: 1 addition & 1 deletion crates/humanode-runtime/src/deauthentication_reason.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
2 changes: 1 addition & 1 deletion crates/humanode-runtime/src/eth_sig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions crates/humanode-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -521,7 +521,7 @@ impl pallet_bioauth::Config for Runtime {
type RobonodeSignature = Vec<u8>;
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;
Expand Down
2 changes: 1 addition & 1 deletion crates/humanode-runtime/src/tests/claims_and_vesting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
6 changes: 3 additions & 3 deletions crates/humanode-runtime/src/tests/fees.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion crates/humanode-runtime/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ mod transaction {
<ExtrinsicOf<T> 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<T, C>(
call: RuntimeCallOf<T>,
public: PublicOf<T>,
Expand Down
2 changes: 1 addition & 1 deletion crates/keystore-bioauth-account-id/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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::{
Expand Down
2 changes: 1 addition & 1 deletion crates/pallet-bioauth/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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: &<Self as pallet::Config>::OpaqueAuthTicket,
) -> <Self as pallet::Config>::RobonodeSignature;
Expand Down
16 changes: 8 additions & 8 deletions crates/pallet-bioauth/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub trait Verifier<S: ?Sized> {

/// 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<A, B> {
/// The error that can occur during conversion.
type Error;
Expand Down Expand Up @@ -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<Self::ValidatorPublicKey>,
>;
Expand Down Expand Up @@ -436,9 +436,9 @@ pub mod pallet {
#[pallet::call_index(0)]
#[pallet::weight(T::WeightInfo::authenticate(
<ActiveAuthentications<T>>::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"),
<ConsumedAuthTicketNonces<T>>::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<T>,
req: Authenticate<T::OpaqueAuthTicket, T::RobonodeSignature>,
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -523,7 +523,7 @@ pub mod pallet {
#[pallet::call_index(1)]
#[pallet::weight(T::WeightInfo::set_robonode_public_key(
<ActiveAuthentications<T>>::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<T>,
Expand Down Expand Up @@ -580,7 +580,7 @@ pub mod pallet {
<ActiveAuthentications<T>>::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"),
)
}
}
Expand All @@ -606,7 +606,7 @@ pub mod pallet {
return Err(AuthTicketExtractionError::SignatureInvalid);
}

let auth_ticket = <T::AuthTicketCoverter as TryConvert<_, _>>::try_convert(req.ticket)
let auth_ticket = <T::AuthTicketConverter as TryConvert<_, _>>::try_convert(req.ticket)
.map_err(|_| AuthTicketExtractionError::UnableToParse)?;

Ok(auth_ticket)
Expand Down
2 changes: 1 addition & 1 deletion crates/pallet-bioauth/src/mock/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ impl pallet_bioauth::Config for Benchmark {
type RobonodeSignature = Vec<u8>;
type ValidatorPublicKey = ValidatorPublicKey;
type OpaqueAuthTicket = MockOpaqueAuthTicket;
type AuthTicketCoverter = MockAuthTicketConverter;
type AuthTicketConverter = MockAuthTicketConverter;
type ValidatorSetUpdater = MockValidatorSetUpdater;
type Moment = UnixMilliseconds;
type DisplayMoment = DisplayMoment;
Expand Down
2 changes: 1 addition & 1 deletion crates/pallet-bioauth/src/mock/testing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ impl pallet_bioauth::Config for Test {
type RobonodeSignature = Vec<u8>;
type ValidatorPublicKey = ValidatorPublicKey;
type OpaqueAuthTicket = MockOpaqueAuthTicket;
type AuthTicketCoverter = MockAuthTicketConverter;
type AuthTicketConverter = MockAuthTicketConverter;
type ValidatorSetUpdater = MockValidatorSetUpdater;
type Moment = UnixMilliseconds;
type DisplayMoment = DisplayMoment;
Expand Down
2 changes: 1 addition & 1 deletion crates/pallet-bioauth/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion crates/pallet-chain-properties/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions crates/pallet-dummy-precompiles-code/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Vec<H160>>;

/// The current force execute ask counter.
Expand Down Expand Up @@ -129,7 +129,7 @@ pub mod pallet {
}

impl<T: Config> Pallet<T> {
/// 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);

Expand Down
2 changes: 1 addition & 1 deletion crates/pallet-dummy-precompiles-code/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion crates/pallet-ethereum-chain-id/src/tests.rs
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Loading