diff --git a/frame/assets/src/benchmarking.rs b/frame/assets/src/benchmarking.rs index 0538e955b2c09..5b4f1489df5db 100644 --- a/frame/assets/src/benchmarking.rs +++ b/frame/assets/src/benchmarking.rs @@ -472,7 +472,7 @@ benchmarks_instance_pallet! { } set_min_balance { - let (asset_id, caller, caller_lookup) = create_default_asset::(true); + let (asset_id, caller, caller_lookup) = create_default_asset::(false); }: _(SystemOrigin::Signed(caller.clone()), asset_id, 50u32.into()) verify { assert_last_event::(Event::AssetMinBalanceChanged { asset_id: asset_id.into(), new_min_balance: 50u32.into() }.into()); diff --git a/frame/assets/src/lib.rs b/frame/assets/src/lib.rs index 96da078065839..662c20e00fb1a 100644 --- a/frame/assets/src/lib.rs +++ b/frame/assets/src/lib.rs @@ -1540,8 +1540,12 @@ pub mod pallet { ensure!(origin == details.owner, Error::::NoPermission); let old_min_balance = details.min_balance; - // Ensure that either the new min_balance is less than old min_balance or there aren't - // any accounts holding the asset. + // If the asset is marked as sufficient it won't be allowed to + // change the min_balance. + ensure!(!details.is_sufficient, Error::::NoPermission); + + // Ensure that either the new min_balance is less than old + // min_balance or there aren't any accounts holding the asset. ensure!( min_balance < old_min_balance || details.accounts == 0, Error::::NoPermission diff --git a/frame/assets/src/tests.rs b/frame/assets/src/tests.rs index e0f612e5cd781..a2788f7f4a9aa 100644 --- a/frame/assets/src/tests.rs +++ b/frame/assets/src/tests.rs @@ -1101,23 +1101,53 @@ fn set_min_balance_should_work() { Balances::make_free_balance_be(&1, 10); assert_ok!(Assets::create(RuntimeOrigin::signed(1), id, 1, 30)); - assert_ok!(Assets::mint(RuntimeOrigin::signed(1), id, 1, 50)); - // won't execute because there is an asset holder. + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), id, 1, 100)); + // Won't execute because there is an asset holder. assert_noop!( Assets::set_min_balance(RuntimeOrigin::signed(1), id, 50), Error::::NoPermission ); - // will execute because the new value of min_balance is less than the - // old value. 10 < 30 - assert_ok!(Assets::mint(RuntimeOrigin::signed(1), id, 1, 10)); + // Force asset status to make this a sufficient asset. + assert_ok!(Assets::force_asset_status( + RuntimeOrigin::root(), + id, + 1, + 1, + 1, + 1, + 30, + true, + false + )); - assert_ok!(Assets::burn(RuntimeOrigin::signed(1), id, 1, 50)); + // Won't execute because there is an account holding the asset and the asset is marked as + // sufficient. assert_noop!( - Assets::set_min_balance(RuntimeOrigin::signed(2), id, 50), + Assets::set_min_balance(RuntimeOrigin::signed(1), id, 10), Error::::NoPermission ); + // Make the asset not sufficient. + assert_ok!(Assets::force_asset_status( + RuntimeOrigin::root(), + id, + 1, + 1, + 1, + 1, + 60, + false, + false + )); + + // Will execute because the new value of min_balance is less than the + // old value. 10 < 30 + assert_ok!(Assets::set_min_balance(RuntimeOrigin::signed(1), id, 10)); + assert_eq!(Asset::::get(id).unwrap().min_balance, 10); + + assert_ok!(Assets::burn(RuntimeOrigin::signed(1), id, 1, 100)); + assert_ok!(Assets::set_min_balance(RuntimeOrigin::signed(1), id, 50)); assert_eq!(Asset::::get(id).unwrap().min_balance, 50); }); diff --git a/frame/assets/src/weights.rs b/frame/assets/src/weights.rs index 080800daa6c6b..b9c3ab21d8a33 100644 --- a/frame/assets/src/weights.rs +++ b/frame/assets/src/weights.rs @@ -18,7 +18,7 @@ //! Autogenerated weights for pallet_assets //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-02-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-03-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 @@ -89,9 +89,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `325` // Estimated: `7268` - // Minimum execution time: 27_887 nanoseconds. - Weight::from_parts(28_190_000, 0) - .saturating_add(Weight::from_parts(0, 7268)) + // Minimum execution time: 28_265_000 picoseconds. + Weight::from_parts(28_764_000, 7268) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -101,9 +100,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `153` // Estimated: `3675` - // Minimum execution time: 15_059 nanoseconds. - Weight::from_parts(15_600_000, 0) - .saturating_add(Weight::from_parts(0, 3675)) + // Minimum execution time: 15_125_000 picoseconds. + Weight::from_parts(15_468_000, 3675) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -113,9 +111,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `417` // Estimated: `3675` - // Minimum execution time: 15_581 nanoseconds. - Weight::from_parts(15_868_000, 0) - .saturating_add(Weight::from_parts(0, 3675)) + // Minimum execution time: 15_368_000 picoseconds. + Weight::from_parts(15_625_000, 3675) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -130,11 +127,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `25 + c * (240 ±0)` // Estimated: `8232 + c * (5180 ±0)` - // Minimum execution time: 20_167 nanoseconds. - Weight::from_parts(20_436_000, 0) - .saturating_add(Weight::from_parts(0, 8232)) - // Standard Error: 12_761 - .saturating_add(Weight::from_parts(15_535_268, 0).saturating_mul(c.into())) + // Minimum execution time: 20_816_000 picoseconds. + Weight::from_parts(21_045_000, 8232) + // Standard Error: 7_118 + .saturating_add(Weight::from_parts(12_723_454, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1_u64)) @@ -150,11 +146,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `554 + a * (86 ±0)` // Estimated: `7288 + a * (2623 ±0)` - // Minimum execution time: 20_349 nanoseconds. - Weight::from_parts(20_482_000, 0) - .saturating_add(Weight::from_parts(0, 7288)) - // Standard Error: 9_831 - .saturating_add(Weight::from_parts(15_771_918, 0).saturating_mul(a.into())) + // Minimum execution time: 20_923_000 picoseconds. + Weight::from_parts(21_229_000, 7288) + // Standard Error: 7_215 + .saturating_add(Weight::from_parts(12_915_292, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(1_u64)) @@ -169,9 +164,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `383` // Estimated: `7280` - // Minimum execution time: 15_647 nanoseconds. - Weight::from_parts(15_975_000, 0) - .saturating_add(Weight::from_parts(0, 7280)) + // Minimum execution time: 15_764_000 picoseconds. + Weight::from_parts(16_245_000, 7280) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -183,9 +177,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `383` // Estimated: `7242` - // Minimum execution time: 28_383 nanoseconds. - Weight::from_parts(29_055_000, 0) - .saturating_add(Weight::from_parts(0, 7242)) + // Minimum execution time: 28_814_000 picoseconds. + Weight::from_parts(29_407_000, 7242) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -197,9 +190,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `491` // Estimated: `7242` - // Minimum execution time: 34_950 nanoseconds. - Weight::from_parts(35_296_000, 0) - .saturating_add(Weight::from_parts(0, 7242)) + // Minimum execution time: 34_784_000 picoseconds. + Weight::from_parts(35_402_000, 7242) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -213,9 +205,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `530` // Estimated: `13412` - // Minimum execution time: 50_129 nanoseconds. - Weight::from_parts(50_820_000, 0) - .saturating_add(Weight::from_parts(0, 13412)) + // Minimum execution time: 49_110_000 picoseconds. + Weight::from_parts(50_483_000, 13412) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -229,9 +220,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `530` // Estimated: `13412` - // Minimum execution time: 43_424 nanoseconds. - Weight::from_parts(44_080_000, 0) - .saturating_add(Weight::from_parts(0, 13412)) + // Minimum execution time: 43_585_000 picoseconds. + Weight::from_parts(44_207_000, 13412) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -245,9 +235,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `530` // Estimated: `13412` - // Minimum execution time: 48_919 nanoseconds. - Weight::from_parts(50_720_000, 0) - .saturating_add(Weight::from_parts(0, 13412)) + // Minimum execution time: 49_238_000 picoseconds. + Weight::from_parts(77_664_000, 13412) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -259,9 +248,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `491` // Estimated: `7242` - // Minimum execution time: 19_750 nanoseconds. - Weight::from_parts(20_053_000, 0) - .saturating_add(Weight::from_parts(0, 7242)) + // Minimum execution time: 19_198_000 picoseconds. + Weight::from_parts(19_585_000, 7242) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -273,9 +261,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `491` // Estimated: `7242` - // Minimum execution time: 19_672 nanoseconds. - Weight::from_parts(19_928_000, 0) - .saturating_add(Weight::from_parts(0, 7242)) + // Minimum execution time: 19_659_000 picoseconds. + Weight::from_parts(20_079_000, 7242) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -285,9 +272,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `417` // Estimated: `3675` - // Minimum execution time: 15_367 nanoseconds. - Weight::from_parts(15_726_000, 0) - .saturating_add(Weight::from_parts(0, 3675)) + // Minimum execution time: 15_035_000 picoseconds. + Weight::from_parts(15_594_000, 3675) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -297,9 +283,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `417` // Estimated: `3675` - // Minimum execution time: 14_814 nanoseconds. - Weight::from_parts(15_301_000, 0) - .saturating_add(Weight::from_parts(0, 3675)) + // Minimum execution time: 15_073_000 picoseconds. + Weight::from_parts(15_862_000, 3675) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -311,9 +296,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `383` // Estimated: `7280` - // Minimum execution time: 17_426 nanoseconds. - Weight::from_parts(17_804_000, 0) - .saturating_add(Weight::from_parts(0, 7280)) + // Minimum execution time: 17_343_000 picoseconds. + Weight::from_parts(17_656_000, 7280) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -323,9 +307,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `383` // Estimated: `3675` - // Minimum execution time: 15_935 nanoseconds. - Weight::from_parts(16_165_000, 0) - .saturating_add(Weight::from_parts(0, 3675)) + // Minimum execution time: 15_902_000 picoseconds. + Weight::from_parts(16_439_000, 3675) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -335,15 +318,12 @@ impl WeightInfo for SubstrateWeight { /// Proof: Assets Metadata (max_values: None, max_size: Some(140), added: 2615, mode: MaxEncodedLen) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. - fn set_metadata(n: u32, _s: u32, ) -> Weight { + fn set_metadata(_n: u32, _s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `383` // Estimated: `7280` - // Minimum execution time: 26_890 nanoseconds. - Weight::from_parts(28_766_510, 0) - .saturating_add(Weight::from_parts(0, 7280)) - // Standard Error: 7_444 - .saturating_add(Weight::from_parts(3_619, 0).saturating_mul(n.into())) + // Minimum execution time: 27_222_000 picoseconds. + Weight::from_parts(29_151_657, 7280) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -355,9 +335,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `579` // Estimated: `7280` - // Minimum execution time: 27_146 nanoseconds. - Weight::from_parts(27_692_000, 0) - .saturating_add(Weight::from_parts(0, 7280)) + // Minimum execution time: 27_976_000 picoseconds. + Weight::from_parts(28_289_000, 7280) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -367,13 +346,14 @@ impl WeightInfo for SubstrateWeight { /// Proof: Assets Metadata (max_values: None, max_size: Some(140), added: 2615, mode: MaxEncodedLen) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. - fn force_set_metadata(_n: u32, _s: u32, ) -> Weight { + fn force_set_metadata(_n: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `190` // Estimated: `7280` - // Minimum execution time: 16_181 nanoseconds. - Weight::from_parts(18_317_178, 0) - .saturating_add(Weight::from_parts(0, 7280)) + // Minimum execution time: 16_162_000 picoseconds. + Weight::from_parts(17_137_043, 7280) + // Standard Error: 982 + .saturating_add(Weight::from_parts(4_180, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -385,9 +365,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `579` // Estimated: `7280` - // Minimum execution time: 26_962 nanoseconds. - Weight::from_parts(27_896_000, 0) - .saturating_add(Weight::from_parts(0, 7280)) + // Minimum execution time: 27_219_000 picoseconds. + Weight::from_parts(27_931_000, 7280) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -397,9 +376,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `383` // Estimated: `3675` - // Minimum execution time: 14_394 nanoseconds. - Weight::from_parts(14_917_000, 0) - .saturating_add(Weight::from_parts(0, 3675)) + // Minimum execution time: 15_313_000 picoseconds. + Weight::from_parts(15_775_000, 3675) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -411,9 +389,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `417` // Estimated: `7288` - // Minimum execution time: 30_861 nanoseconds. - Weight::from_parts(31_356_000, 0) - .saturating_add(Weight::from_parts(0, 7288)) + // Minimum execution time: 31_865_000 picoseconds. + Weight::from_parts(32_316_000, 7288) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -429,9 +406,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `700` // Estimated: `17025` - // Minimum execution time: 64_510 nanoseconds. - Weight::from_parts(65_676_000, 0) - .saturating_add(Weight::from_parts(0, 17025)) + // Minimum execution time: 67_203_000 picoseconds. + Weight::from_parts(109_742_000, 17025) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -443,9 +419,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `587` // Estimated: `7288` - // Minimum execution time: 32_620 nanoseconds. - Weight::from_parts(33_183_000, 0) - .saturating_add(Weight::from_parts(0, 7288)) + // Minimum execution time: 33_430_000 picoseconds. + Weight::from_parts(33_824_000, 7288) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -457,9 +432,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `587` // Estimated: `7288` - // Minimum execution time: 33_277 nanoseconds. - Weight::from_parts(34_438_000, 0) - .saturating_add(Weight::from_parts(0, 7288)) + // Minimum execution time: 33_596_000 picoseconds. + Weight::from_parts(34_226_000, 7288) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -469,9 +443,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `383` // Estimated: `3675` - // Minimum execution time: 16_213 nanoseconds. - Weight::from_parts(16_575_000, 0) - .saturating_add(Weight::from_parts(0, 3675)) + // Minimum execution time: 16_367_000 picoseconds. + Weight::from_parts(16_703_000, 3675) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -487,9 +460,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `325` // Estimated: `7268` - // Minimum execution time: 27_887 nanoseconds. - Weight::from_parts(28_190_000, 0) - .saturating_add(Weight::from_parts(0, 7268)) + // Minimum execution time: 28_265_000 picoseconds. + Weight::from_parts(28_764_000, 7268) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -499,9 +471,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `153` // Estimated: `3675` - // Minimum execution time: 15_059 nanoseconds. - Weight::from_parts(15_600_000, 0) - .saturating_add(Weight::from_parts(0, 3675)) + // Minimum execution time: 15_125_000 picoseconds. + Weight::from_parts(15_468_000, 3675) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -511,9 +482,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `417` // Estimated: `3675` - // Minimum execution time: 15_581 nanoseconds. - Weight::from_parts(15_868_000, 0) - .saturating_add(Weight::from_parts(0, 3675)) + // Minimum execution time: 15_368_000 picoseconds. + Weight::from_parts(15_625_000, 3675) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -528,11 +498,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `25 + c * (240 ±0)` // Estimated: `8232 + c * (5180 ±0)` - // Minimum execution time: 20_167 nanoseconds. - Weight::from_parts(20_436_000, 0) - .saturating_add(Weight::from_parts(0, 8232)) - // Standard Error: 12_761 - .saturating_add(Weight::from_parts(15_535_268, 0).saturating_mul(c.into())) + // Minimum execution time: 20_816_000 picoseconds. + Weight::from_parts(21_045_000, 8232) + // Standard Error: 7_118 + .saturating_add(Weight::from_parts(12_723_454, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(c.into()))) .saturating_add(RocksDbWeight::get().writes(1_u64)) @@ -548,11 +517,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `554 + a * (86 ±0)` // Estimated: `7288 + a * (2623 ±0)` - // Minimum execution time: 20_349 nanoseconds. - Weight::from_parts(20_482_000, 0) - .saturating_add(Weight::from_parts(0, 7288)) - // Standard Error: 9_831 - .saturating_add(Weight::from_parts(15_771_918, 0).saturating_mul(a.into())) + // Minimum execution time: 20_923_000 picoseconds. + Weight::from_parts(21_229_000, 7288) + // Standard Error: 7_215 + .saturating_add(Weight::from_parts(12_915_292, 0).saturating_mul(a.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(a.into()))) .saturating_add(RocksDbWeight::get().writes(1_u64)) @@ -567,9 +535,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `383` // Estimated: `7280` - // Minimum execution time: 15_647 nanoseconds. - Weight::from_parts(15_975_000, 0) - .saturating_add(Weight::from_parts(0, 7280)) + // Minimum execution time: 15_764_000 picoseconds. + Weight::from_parts(16_245_000, 7280) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -581,9 +548,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `383` // Estimated: `7242` - // Minimum execution time: 28_383 nanoseconds. - Weight::from_parts(29_055_000, 0) - .saturating_add(Weight::from_parts(0, 7242)) + // Minimum execution time: 28_814_000 picoseconds. + Weight::from_parts(29_407_000, 7242) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -595,9 +561,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `491` // Estimated: `7242` - // Minimum execution time: 34_950 nanoseconds. - Weight::from_parts(35_296_000, 0) - .saturating_add(Weight::from_parts(0, 7242)) + // Minimum execution time: 34_784_000 picoseconds. + Weight::from_parts(35_402_000, 7242) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -611,9 +576,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `530` // Estimated: `13412` - // Minimum execution time: 50_129 nanoseconds. - Weight::from_parts(50_820_000, 0) - .saturating_add(Weight::from_parts(0, 13412)) + // Minimum execution time: 49_110_000 picoseconds. + Weight::from_parts(50_483_000, 13412) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -627,9 +591,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `530` // Estimated: `13412` - // Minimum execution time: 43_424 nanoseconds. - Weight::from_parts(44_080_000, 0) - .saturating_add(Weight::from_parts(0, 13412)) + // Minimum execution time: 43_585_000 picoseconds. + Weight::from_parts(44_207_000, 13412) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -643,9 +606,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `530` // Estimated: `13412` - // Minimum execution time: 48_919 nanoseconds. - Weight::from_parts(50_720_000, 0) - .saturating_add(Weight::from_parts(0, 13412)) + // Minimum execution time: 49_238_000 picoseconds. + Weight::from_parts(77_664_000, 13412) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -657,9 +619,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `491` // Estimated: `7242` - // Minimum execution time: 19_750 nanoseconds. - Weight::from_parts(20_053_000, 0) - .saturating_add(Weight::from_parts(0, 7242)) + // Minimum execution time: 19_198_000 picoseconds. + Weight::from_parts(19_585_000, 7242) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -671,9 +632,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `491` // Estimated: `7242` - // Minimum execution time: 19_672 nanoseconds. - Weight::from_parts(19_928_000, 0) - .saturating_add(Weight::from_parts(0, 7242)) + // Minimum execution time: 19_659_000 picoseconds. + Weight::from_parts(20_079_000, 7242) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -683,9 +643,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `417` // Estimated: `3675` - // Minimum execution time: 15_367 nanoseconds. - Weight::from_parts(15_726_000, 0) - .saturating_add(Weight::from_parts(0, 3675)) + // Minimum execution time: 15_035_000 picoseconds. + Weight::from_parts(15_594_000, 3675) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -695,9 +654,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `417` // Estimated: `3675` - // Minimum execution time: 14_814 nanoseconds. - Weight::from_parts(15_301_000, 0) - .saturating_add(Weight::from_parts(0, 3675)) + // Minimum execution time: 15_073_000 picoseconds. + Weight::from_parts(15_862_000, 3675) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -709,9 +667,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `383` // Estimated: `7280` - // Minimum execution time: 17_426 nanoseconds. - Weight::from_parts(17_804_000, 0) - .saturating_add(Weight::from_parts(0, 7280)) + // Minimum execution time: 17_343_000 picoseconds. + Weight::from_parts(17_656_000, 7280) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -721,9 +678,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `383` // Estimated: `3675` - // Minimum execution time: 15_935 nanoseconds. - Weight::from_parts(16_165_000, 0) - .saturating_add(Weight::from_parts(0, 3675)) + // Minimum execution time: 15_902_000 picoseconds. + Weight::from_parts(16_439_000, 3675) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -733,15 +689,12 @@ impl WeightInfo for () { /// Proof: Assets Metadata (max_values: None, max_size: Some(140), added: 2615, mode: MaxEncodedLen) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. - fn set_metadata(n: u32, _s: u32, ) -> Weight { + fn set_metadata(_n: u32, _s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `383` // Estimated: `7280` - // Minimum execution time: 26_890 nanoseconds. - Weight::from_parts(28_766_510, 0) - .saturating_add(Weight::from_parts(0, 7280)) - // Standard Error: 7_444 - .saturating_add(Weight::from_parts(3_619, 0).saturating_mul(n.into())) + // Minimum execution time: 27_222_000 picoseconds. + Weight::from_parts(29_151_657, 7280) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -753,9 +706,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `579` // Estimated: `7280` - // Minimum execution time: 27_146 nanoseconds. - Weight::from_parts(27_692_000, 0) - .saturating_add(Weight::from_parts(0, 7280)) + // Minimum execution time: 27_976_000 picoseconds. + Weight::from_parts(28_289_000, 7280) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -765,13 +717,14 @@ impl WeightInfo for () { /// Proof: Assets Metadata (max_values: None, max_size: Some(140), added: 2615, mode: MaxEncodedLen) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. - fn force_set_metadata(_n: u32, _s: u32, ) -> Weight { + fn force_set_metadata(_n: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `190` // Estimated: `7280` - // Minimum execution time: 16_181 nanoseconds. - Weight::from_parts(18_317_178, 0) - .saturating_add(Weight::from_parts(0, 7280)) + // Minimum execution time: 16_162_000 picoseconds. + Weight::from_parts(17_137_043, 7280) + // Standard Error: 982 + .saturating_add(Weight::from_parts(4_180, 0).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -783,9 +736,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `579` // Estimated: `7280` - // Minimum execution time: 26_962 nanoseconds. - Weight::from_parts(27_896_000, 0) - .saturating_add(Weight::from_parts(0, 7280)) + // Minimum execution time: 27_219_000 picoseconds. + Weight::from_parts(27_931_000, 7280) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -795,9 +747,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `383` // Estimated: `3675` - // Minimum execution time: 14_394 nanoseconds. - Weight::from_parts(14_917_000, 0) - .saturating_add(Weight::from_parts(0, 3675)) + // Minimum execution time: 15_313_000 picoseconds. + Weight::from_parts(15_775_000, 3675) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -809,9 +760,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `417` // Estimated: `7288` - // Minimum execution time: 30_861 nanoseconds. - Weight::from_parts(31_356_000, 0) - .saturating_add(Weight::from_parts(0, 7288)) + // Minimum execution time: 31_865_000 picoseconds. + Weight::from_parts(32_316_000, 7288) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -827,9 +777,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `700` // Estimated: `17025` - // Minimum execution time: 64_510 nanoseconds. - Weight::from_parts(65_676_000, 0) - .saturating_add(Weight::from_parts(0, 17025)) + // Minimum execution time: 67_203_000 picoseconds. + Weight::from_parts(109_742_000, 17025) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -841,9 +790,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `587` // Estimated: `7288` - // Minimum execution time: 32_620 nanoseconds. - Weight::from_parts(33_183_000, 0) - .saturating_add(Weight::from_parts(0, 7288)) + // Minimum execution time: 33_430_000 picoseconds. + Weight::from_parts(33_824_000, 7288) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -855,9 +803,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `587` // Estimated: `7288` - // Minimum execution time: 33_277 nanoseconds. - Weight::from_parts(34_438_000, 0) - .saturating_add(Weight::from_parts(0, 7288)) + // Minimum execution time: 33_596_000 picoseconds. + Weight::from_parts(34_226_000, 7288) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -867,9 +814,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `383` // Estimated: `3675` - // Minimum execution time: 16_213 nanoseconds. - Weight::from_parts(16_575_000, 0) - .saturating_add(Weight::from_parts(0, 3675)) + // Minimum execution time: 16_367_000 picoseconds. + Weight::from_parts(16_703_000, 3675) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) }