diff --git a/frame/contracts/src/chain_extension.rs b/frame/contracts/src/chain_extension.rs index 662cfb2053e6e..c664b82fe64cb 100644 --- a/frame/contracts/src/chain_extension.rs +++ b/frame/contracts/src/chain_extension.rs @@ -88,7 +88,7 @@ pub trait ChainExtension { /// /// # Return /// - /// In case of `Err` the contract execution is immediatly suspended and the passed error + /// In case of `Err` the contract execution is immediately suspended and the passed error /// is returned to the caller. Otherwise the value of [`RetVal`] determines the exit /// behaviour. fn call(func_id: u32, env: Environment) -> Result diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index d585ac4f7fab6..43566bc547c40 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -667,7 +667,7 @@ where /// This function is similar to `Self::call`, but doesn't perform any address lookups and better /// suitable for calling directly from Rust. /// - /// It returns the exection result and the amount of used weight. + /// It returns the execution result and the amount of used weight. pub fn bare_call( origin: T::AccountId, dest: T::AccountId, @@ -711,9 +711,9 @@ where /// Determine the address of a contract, /// - /// This is the address generation function used by contract instantation. Its result + /// This is the address generation function used by contract instantiation. Its result /// is only dependend on its inputs. It can therefore be used to reliably predict the - /// address of a contract. This is akin to the formular of eth's CRATE2 opcode. There + /// address of a contract. This is akin to the formular of eth's CREATE2 opcode. There /// is no CREATE equivalent because CREATE2 is strictly more powerful. /// /// Formula: `hash(deploying_address ++ code_hash ++ salt)` diff --git a/frame/contracts/src/storage.rs b/frame/contracts/src/storage.rs index 030f62fc4088e..5259b2a471265 100644 --- a/frame/contracts/src/storage.rs +++ b/frame/contracts/src/storage.rs @@ -178,7 +178,7 @@ where deduct_block: // We want to charge rent for the first block in advance. Therefore we // treat the contract as if it was created in the last block and then - // charge rent for it during instantation. + // charge rent for it during instantiation. >::block_number().saturating_sub(1u32.into()), rent_allowance: >::max_value(), rent_payed: >::zero(), diff --git a/frame/contracts/src/tests.rs b/frame/contracts/src/tests.rs index 96bcf99bf8e81..a2916ff833b4e 100644 --- a/frame/contracts/src/tests.rs +++ b/frame/contracts/src/tests.rs @@ -549,7 +549,7 @@ fn deposit_event_max_value_limit() { )); let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); - // The instantation deducted the rent for one block immediatly + // The instantiation deducted the rent for one block immediately let first_rent = ::RentFraction::get() // base_deposit - free_balance .mul_ceil(80_000 - 30_000) @@ -812,7 +812,7 @@ fn deduct_blocks() { let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); ContractInfoOf::::get(&addr).unwrap().get_alive().unwrap(); - // The instantation deducted the rent for one block immediatly + // The instantiation deducted the rent for one block immediately let rent0 = ::RentFraction::get() // base_deposit + deploy_set_storage (4 bytes in 1 item) - free_balance .mul_ceil(80_000 + 40_000 + 10_000 - 30_000) @@ -1173,7 +1173,7 @@ fn default_rent_allowance_on_instantiate() { )); let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); - // The instantation deducted the rent for one block immediatly + // The instantiation deducted the rent for one block immediately let first_rent = ::RentFraction::get() // base_deposit - free_balance .mul_ceil(80_000 - 30_000) @@ -2501,7 +2501,7 @@ fn deletion_queue_full() { fn not_deployed_if_endowment_too_low_for_first_rent() { let (wasm, code_hash) = compile_module::("set_rent").unwrap(); - // The instantation deducted the rent for one block immediatly + // The instantiation deducted the rent for one block immediately let first_rent = ::RentFraction::get() // base_deposit + deploy_set_storage (4 bytes in 1 item) - free_balance .mul_ceil(80_000u32 + 40_000 + 10_000 - 30_000) @@ -2546,7 +2546,7 @@ fn surcharge_reward_is_capped() { let balance = Balances::free_balance(&ALICE); let reward = ::SurchargeReward::get(); - // some rent should have payed due to instantation + // some rent should have payed due to instantiation assert_ne!(contract.rent_payed, 0); // the reward should be parameterized sufficiently high to make this test useful diff --git a/primitives/state-machine/src/overlayed_changes/mod.rs b/primitives/state-machine/src/overlayed_changes/mod.rs index b529c0ebfaeeb..285bf2a73a148 100644 --- a/primitives/state-machine/src/overlayed_changes/mod.rs +++ b/primitives/state-machine/src/overlayed_changes/mod.rs @@ -370,7 +370,7 @@ impl OverlayedChanges { /// transaction was open. Any transaction must be closed by either `rollback_transaction` or /// `commit_transaction` before this overlay can be converted into storage changes. /// - /// Changes made without any open transaction are committed immediatly. + /// Changes made without any open transaction are committed immediately. pub fn start_transaction(&mut self) { self.top.start_transaction(); for (_, (changeset, _)) in self.children.iter_mut() {