Remove RefTimeWeight (#12157)

* update api

* update

* remove unused

* remove `one` api

* fix unused

* fmt

* add saturating accrue

* remove `Weight::new()`

* use some macros

* div makes no sense

* Update weight_v2.rs

* missed some

* more patch

* fixes

* more fixes

* more fix

* more fix

* remove RefTimeWeight

* Update frame/contracts/src/storage.rs

Co-authored-by: Alexander Theißen <alex.theissen@me.com>

* not needed

* Fixes

Co-authored-by: Alexander Theißen <alex.theissen@me.com>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
This commit is contained in:
Shawn Tabrizi
2022-09-02 19:19:49 +01:00
committed by GitHub
parent a9a2fdca7b
commit 23a81ee1e3
54 changed files with 3863 additions and 3874 deletions
+163 -163
View File
@@ -39,7 +39,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight, constants::RocksDbWeight}};
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;
/// Weight functions needed for pallet_assets.
@@ -74,15 +74,15 @@ pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Assets Asset (r:1 w:1)
fn create() -> Weight {
Weight::from_ref_time(27_167_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(27_167_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Assets Asset (r:1 w:1)
fn force_create() -> Weight {
Weight::from_ref_time(15_473_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(15_473_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:5002 w:5001)
@@ -90,168 +90,168 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Assets Metadata (r:1 w:0)
// Storage: Assets Approvals (r:501 w:500)
fn destroy(c: u32, s: u32, a: u32, ) -> Weight {
Weight::from_ref_time(0 as RefTimeWeight)
Weight::from_ref_time(0 as u64)
// Standard Error: 37_000
.saturating_add(Weight::from_ref_time(17_145_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight))
.saturating_add(Weight::from_ref_time(17_145_000 as u64).saturating_mul(c as u64))
// Standard Error: 37_000
.saturating_add(Weight::from_ref_time(19_333_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
.saturating_add(Weight::from_ref_time(19_333_000 as u64).saturating_mul(s as u64))
// Standard Error: 375_000
.saturating_add(Weight::from_ref_time(17_046_000 as RefTimeWeight).saturating_mul(a as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight)))
.saturating_add(T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(s as RefTimeWeight)))
.saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(a as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes((2 as RefTimeWeight).saturating_mul(s as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(a as RefTimeWeight)))
.saturating_add(Weight::from_ref_time(17_046_000 as u64).saturating_mul(a as u64))
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(c as u64)))
.saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(s as u64)))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(a as u64)))
.saturating_add(T::DbWeight::get().writes(2 as u64))
.saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(c as u64)))
.saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(s as u64)))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(a as u64)))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:1 w:1)
fn mint() -> Weight {
Weight::from_ref_time(30_819_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
Weight::from_ref_time(30_819_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:1 w:1)
fn burn() -> Weight {
Weight::from_ref_time(35_212_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
Weight::from_ref_time(35_212_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn transfer() -> Weight {
Weight::from_ref_time(47_401_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
Weight::from_ref_time(47_401_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn transfer_keep_alive() -> Weight {
Weight::from_ref_time(42_300_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
Weight::from_ref_time(42_300_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn force_transfer() -> Weight {
Weight::from_ref_time(47_946_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
Weight::from_ref_time(47_946_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Account (r:1 w:1)
fn freeze() -> Weight {
Weight::from_ref_time(21_670_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(21_670_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Account (r:1 w:1)
fn thaw() -> Weight {
Weight::from_ref_time(21_503_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(21_503_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Assets Asset (r:1 w:1)
fn freeze_asset() -> Weight {
Weight::from_ref_time(18_158_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(18_158_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Assets Asset (r:1 w:1)
fn thaw_asset() -> Weight {
Weight::from_ref_time(18_525_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(18_525_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Metadata (r:1 w:0)
fn transfer_ownership() -> Weight {
Weight::from_ref_time(19_858_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(19_858_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Assets Asset (r:1 w:1)
fn set_team() -> Weight {
Weight::from_ref_time(18_045_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(18_045_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Metadata (r:1 w:1)
fn set_metadata(n: u32, s: u32, ) -> Weight {
Weight::from_ref_time(32_395_000 as RefTimeWeight)
Weight::from_ref_time(32_395_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight))
.saturating_add(Weight::from_ref_time(5_000 as u64).saturating_mul(n as u64))
// Standard Error: 0
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
.saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Metadata (r:1 w:1)
fn clear_metadata() -> Weight {
Weight::from_ref_time(32_893_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(32_893_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Metadata (r:1 w:1)
fn force_set_metadata(_n: u32, s: u32, ) -> Weight {
Weight::from_ref_time(19_586_000 as RefTimeWeight)
Weight::from_ref_time(19_586_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
.saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Metadata (r:1 w:1)
fn force_clear_metadata() -> Weight {
Weight::from_ref_time(32_478_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(32_478_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Assets Asset (r:1 w:1)
fn force_asset_status() -> Weight {
Weight::from_ref_time(17_143_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(17_143_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Approvals (r:1 w:1)
fn approve_transfer() -> Weight {
Weight::from_ref_time(36_389_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
Weight::from_ref_time(36_389_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Assets Approvals (r:1 w:1)
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn transfer_approved() -> Weight {
Weight::from_ref_time(61_854_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(5 as RefTimeWeight))
Weight::from_ref_time(61_854_000 as u64)
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Approvals (r:1 w:1)
fn cancel_approval() -> Weight {
Weight::from_ref_time(36_759_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
Weight::from_ref_time(36_759_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Approvals (r:1 w:1)
fn force_cancel_approval() -> Weight {
Weight::from_ref_time(37_753_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
Weight::from_ref_time(37_753_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
}
@@ -259,15 +259,15 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
impl WeightInfo for () {
// Storage: Assets Asset (r:1 w:1)
fn create() -> Weight {
Weight::from_ref_time(27_167_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(27_167_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Assets Asset (r:1 w:1)
fn force_create() -> Weight {
Weight::from_ref_time(15_473_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(15_473_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:5002 w:5001)
@@ -275,167 +275,167 @@ impl WeightInfo for () {
// Storage: Assets Metadata (r:1 w:0)
// Storage: Assets Approvals (r:501 w:500)
fn destroy(c: u32, s: u32, a: u32, ) -> Weight {
Weight::from_ref_time(0 as RefTimeWeight)
Weight::from_ref_time(0 as u64)
// Standard Error: 37_000
.saturating_add(Weight::from_ref_time(17_145_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight))
.saturating_add(Weight::from_ref_time(17_145_000 as u64).saturating_mul(c as u64))
// Standard Error: 37_000
.saturating_add(Weight::from_ref_time(19_333_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
.saturating_add(Weight::from_ref_time(19_333_000 as u64).saturating_mul(s as u64))
// Standard Error: 375_000
.saturating_add(Weight::from_ref_time(17_046_000 as RefTimeWeight).saturating_mul(a as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight)))
.saturating_add(RocksDbWeight::get().reads((2 as RefTimeWeight).saturating_mul(s as RefTimeWeight)))
.saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(a as RefTimeWeight)))
.saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight)))
.saturating_add(RocksDbWeight::get().writes((2 as RefTimeWeight).saturating_mul(s as RefTimeWeight)))
.saturating_add(RocksDbWeight::get().writes((1 as RefTimeWeight).saturating_mul(a as RefTimeWeight)))
.saturating_add(Weight::from_ref_time(17_046_000 as u64).saturating_mul(a as u64))
.saturating_add(RocksDbWeight::get().reads(5 as u64))
.saturating_add(RocksDbWeight::get().reads((2 as u64).saturating_mul(c as u64)))
.saturating_add(RocksDbWeight::get().reads((2 as u64).saturating_mul(s as u64)))
.saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(a as u64)))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
.saturating_add(RocksDbWeight::get().writes((2 as u64).saturating_mul(c as u64)))
.saturating_add(RocksDbWeight::get().writes((2 as u64).saturating_mul(s as u64)))
.saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(a as u64)))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:1 w:1)
fn mint() -> Weight {
Weight::from_ref_time(30_819_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight))
Weight::from_ref_time(30_819_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:1 w:1)
fn burn() -> Weight {
Weight::from_ref_time(35_212_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight))
Weight::from_ref_time(35_212_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn transfer() -> Weight {
Weight::from_ref_time(47_401_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(4 as RefTimeWeight))
Weight::from_ref_time(47_401_000 as u64)
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(4 as u64))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn transfer_keep_alive() -> Weight {
Weight::from_ref_time(42_300_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(4 as RefTimeWeight))
Weight::from_ref_time(42_300_000 as u64)
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(4 as u64))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn force_transfer() -> Weight {
Weight::from_ref_time(47_946_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(4 as RefTimeWeight))
Weight::from_ref_time(47_946_000 as u64)
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(4 as u64))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Account (r:1 w:1)
fn freeze() -> Weight {
Weight::from_ref_time(21_670_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(21_670_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Account (r:1 w:1)
fn thaw() -> Weight {
Weight::from_ref_time(21_503_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(21_503_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Assets Asset (r:1 w:1)
fn freeze_asset() -> Weight {
Weight::from_ref_time(18_158_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(18_158_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Assets Asset (r:1 w:1)
fn thaw_asset() -> Weight {
Weight::from_ref_time(18_525_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(18_525_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Metadata (r:1 w:0)
fn transfer_ownership() -> Weight {
Weight::from_ref_time(19_858_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(19_858_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Assets Asset (r:1 w:1)
fn set_team() -> Weight {
Weight::from_ref_time(18_045_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(18_045_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Metadata (r:1 w:1)
fn set_metadata(n: u32, s: u32, ) -> Weight {
Weight::from_ref_time(32_395_000 as RefTimeWeight)
Weight::from_ref_time(32_395_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight))
.saturating_add(Weight::from_ref_time(5_000 as u64).saturating_mul(n as u64))
// Standard Error: 0
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
.saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(s as u64))
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Metadata (r:1 w:1)
fn clear_metadata() -> Weight {
Weight::from_ref_time(32_893_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(32_893_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Metadata (r:1 w:1)
fn force_set_metadata(_n: u32, s: u32, ) -> Weight {
Weight::from_ref_time(19_586_000 as RefTimeWeight)
Weight::from_ref_time(19_586_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
.saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(s as u64))
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Metadata (r:1 w:1)
fn force_clear_metadata() -> Weight {
Weight::from_ref_time(32_478_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(32_478_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Assets Asset (r:1 w:1)
fn force_asset_status() -> Weight {
Weight::from_ref_time(17_143_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(17_143_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Approvals (r:1 w:1)
fn approve_transfer() -> Weight {
Weight::from_ref_time(36_389_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight))
Weight::from_ref_time(36_389_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
}
// Storage: Assets Approvals (r:1 w:1)
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn transfer_approved() -> Weight {
Weight::from_ref_time(61_854_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(5 as RefTimeWeight))
Weight::from_ref_time(61_854_000 as u64)
.saturating_add(RocksDbWeight::get().reads(5 as u64))
.saturating_add(RocksDbWeight::get().writes(5 as u64))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Approvals (r:1 w:1)
fn cancel_approval() -> Weight {
Weight::from_ref_time(36_759_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight))
Weight::from_ref_time(36_759_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Approvals (r:1 w:1)
fn force_cancel_approval() -> Weight {
Weight::from_ref_time(37_753_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight))
Weight::from_ref_time(37_753_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
}
}