Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
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 frame/contracts/src/chain_extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<E: Ext>(func_id: u32, env: Environment<E, InitState>) -> Result<RetVal>
Expand Down
6 changes: 3 additions & 3 deletions frame/contracts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)`
Expand Down
2 changes: 1 addition & 1 deletion frame/contracts/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
<frame_system::Module<T>>::block_number().saturating_sub(1u32.into()),
rent_allowance: <BalanceOf<T>>::max_value(),
rent_payed: <BalanceOf<T>>::zero(),
Expand Down
10 changes: 5 additions & 5 deletions frame/contracts/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <Test as Config>::RentFraction::get()
// base_deposit - free_balance
.mul_ceil(80_000 - 30_000)
Expand Down Expand Up @@ -812,7 +812,7 @@ fn deduct_blocks() {
let addr = Contracts::contract_address(&ALICE, &code_hash, &[]);
ContractInfoOf::<Test>::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 = <Test as Config>::RentFraction::get()
// base_deposit + deploy_set_storage (4 bytes in 1 item) - free_balance
.mul_ceil(80_000 + 40_000 + 10_000 - 30_000)
Expand Down Expand Up @@ -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 = <Test as Config>::RentFraction::get()
// base_deposit - free_balance
.mul_ceil(80_000 - 30_000)
Expand Down Expand Up @@ -2501,7 +2501,7 @@ fn deletion_queue_full() {
fn not_deployed_if_endowment_too_low_for_first_rent() {
let (wasm, code_hash) = compile_module::<Test>("set_rent").unwrap();

// The instantation deducted the rent for one block immediatly
// The instantiation deducted the rent for one block immediately
let first_rent = <Test as Config>::RentFraction::get()
// base_deposit + deploy_set_storage (4 bytes in 1 item) - free_balance
.mul_ceil(80_000u32 + 40_000 + 10_000 - 30_000)
Expand Down Expand Up @@ -2546,7 +2546,7 @@ fn surcharge_reward_is_capped() {
let balance = Balances::free_balance(&ALICE);
let reward = <Test as Config>::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
Expand Down
2 changes: 1 addition & 1 deletion primitives/state-machine/src/overlayed_changes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down