mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 06:08:00 +00:00
chore: fix typos (#8013)
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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)`
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user