contracts: Add instantiation_nonce API (#12800)

* Add `instantiation_nonce` API

* Fixes for tests

* Update frame/contracts/src/schedule.rs

Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>

* ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts

Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>
Co-authored-by: command-bot <>
This commit is contained in:
Alexander Theißen
2022-12-06 12:01:58 +01:00
committed by GitHub
parent c336eae64a
commit 770afb9ee3
7 changed files with 169 additions and 19 deletions
+6 -2
View File
@@ -430,12 +430,15 @@ pub struct HostFnWeights<T: Config> {
/// Weight of calling `seal_ecdsa_to_eth_address`.
pub ecdsa_to_eth_address: u64,
/// Weight of calling `seal_reentrance_count`.
/// Weight of calling `reentrance_count`.
pub reentrance_count: u64,
/// Weight of calling `seal_account_reentrance_count`.
/// Weight of calling `account_reentrance_count`.
pub account_reentrance_count: u64,
/// Weight of calling `instantiation_nonce`.
pub instantiation_nonce: u64,
/// The type parameter is used in the default implementation.
#[codec(skip)]
pub _phantom: PhantomData<T>,
@@ -676,6 +679,7 @@ impl<T: Config> Default for HostFnWeights<T> {
ecdsa_to_eth_address: cost_batched!(seal_ecdsa_to_eth_address),
reentrance_count: cost_batched!(seal_reentrance_count),
account_reentrance_count: cost_batched!(seal_account_reentrance_count),
instantiation_nonce: cost_batched!(seal_instantiation_nonce),
_phantom: PhantomData,
}
}