difftreelog
Merge branch 'for-release-v937053' into develop
in: master
23 files changed
.envdiffbeforeafterboth--- a/.env
+++ b/.env
@@ -3,7 +3,7 @@
POLKADOT_LAUNCH_BRANCH=unique-network
RELAY_CHAIN_TYPE=westend
-POLKADOT_MAINNET_BRANCH=release-v0.9.34
+POLKADOT_MAINNET_BRANCH=release-v0.9.36
STATEMINT_BUILD_BRANCH=release-parachains-v9360
ACALA_BUILD_BRANCH=2.12.0
MOONBEAM_BUILD_BRANCH=runtime-2000
@@ -13,15 +13,15 @@
KUSAMA_MAINNET_BRANCH=release-v0.9.37
STATEMINE_BUILD_BRANCH=release-parachains-v9360
KARURA_BUILD_BRANCH=release-karura-2.12.0
-MOONRIVER_BUILD_BRANCH=runtime-2000
+MOONRIVER_BUILD_BRANCH=runtime-2100
QUARTZ_MAINNET_BRANCH=release-v930034-fix-gas-price
QUARTZ_REPLICA_FROM=wss://ws-quartz.unique.network:443
-UNIQUEWEST_MAINNET_BRANCH=release-v0.9.37
+UNIQUEWEST_MAINNET_BRANCH=release-v0.9.36
WESTMINT_BUILD_BRANCH=parachains-v9370
-OPAL_MAINNET_BRANCH=release-v936050
+OPAL_MAINNET_BRANCH=release-v937052
OPAL_REPLICA_FROM=wss://ws-opal.unique.network:443
UNIQUEEAST_MAINNET_BRANCH=release-v0.9.32
-SAPPHIRE_MAINNET_BRANCH=release-v936040
+SAPPHIRE_MAINNET_BRANCH=release-v937052
SAPPHIRE_REPLICA_FROM=wss://ws-sapphire.unique.network:443
.vscode/settings.jsondiffbeforeafterboth--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -5,5 +5,12 @@
},
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
- }
+ },
+ "rust-analyzer.cargo.extraEnv": {
+ "SKIP_WASM_BUILD": "1"
+ },
+ "rust-analyzer.cargo.features": [
+ "runtime-benchmarks",
+ "try-runtime"
+ ]
}
\ No newline at end of file
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -6272,6 +6272,7 @@
"parity-scale-codec",
"scale-info",
"sp-core",
+ "sp-io",
"sp-std",
]
migrations.mddiffbeforeafterboth--- a/migrations.md
+++ b/migrations.md
@@ -1,3 +1,11 @@
+# **937053 < 937052**
+
+* Removed the previous migration of AppPromition
+
+# **937052 < 937051**
+
+* Migrate AppPromotion from using reserves to locks
+
# **936050 < 930032**
### **pallet-collator-selection:**
pallets/common/src/weights.rsdiffbeforeafterboth--- a/pallets/common/src/weights.rs
+++ b/pallets/common/src/weights.rs
@@ -3,7 +3,7 @@
//! Autogenerated weights for pallet_common
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
-//! DATE: 2023-01-29, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! DATE: 2023-02-15, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
@@ -43,17 +43,17 @@
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Common CollectionProperties (r:1 w:1)
fn set_collection_properties(b: u32, ) -> Weight {
- Weight::from_ref_time(9_881_000 as u64)
- // Standard Error: 18_079
- .saturating_add(Weight::from_ref_time(6_561_011 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(9_293_000 as u64)
+ // Standard Error: 14_275
+ .saturating_add(Weight::from_ref_time(6_172_391 as u64).saturating_mul(b as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Common CollectionProperties (r:1 w:1)
fn delete_collection_properties(b: u32, ) -> Weight {
- Weight::from_ref_time(9_502_000 as u64)
- // Standard Error: 67_255
- .saturating_add(Weight::from_ref_time(22_203_766 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(8_945_000 as u64)
+ // Standard Error: 65_313
+ .saturating_add(Weight::from_ref_time(21_617_763 as u64).saturating_mul(b as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
@@ -63,17 +63,17 @@
impl WeightInfo for () {
// Storage: Common CollectionProperties (r:1 w:1)
fn set_collection_properties(b: u32, ) -> Weight {
- Weight::from_ref_time(9_881_000 as u64)
- // Standard Error: 18_079
- .saturating_add(Weight::from_ref_time(6_561_011 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(9_293_000 as u64)
+ // Standard Error: 14_275
+ .saturating_add(Weight::from_ref_time(6_172_391 as u64).saturating_mul(b as u64))
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Common CollectionProperties (r:1 w:1)
fn delete_collection_properties(b: u32, ) -> Weight {
- Weight::from_ref_time(9_502_000 as u64)
- // Standard Error: 67_255
- .saturating_add(Weight::from_ref_time(22_203_766 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(8_945_000 as u64)
+ // Standard Error: 65_313
+ .saturating_add(Weight::from_ref_time(21_617_763 as u64).saturating_mul(b as u64))
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
pallets/configuration/src/weights.rsdiffbeforeafterboth--- a/pallets/configuration/src/weights.rs
+++ b/pallets/configuration/src/weights.rs
@@ -3,7 +3,7 @@
//! Autogenerated weights for pallet_configuration
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
-//! DATE: 2023-01-29, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! DATE: 2023-02-15, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
@@ -48,37 +48,37 @@
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Configuration WeightToFeeCoefficientOverride (r:0 w:1)
fn set_weight_to_fee_coefficient_override() -> Weight {
- Weight::from_ref_time(3_865_000 as u64)
+ Weight::from_ref_time(3_732_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Configuration MinGasPriceOverride (r:0 w:1)
fn set_min_gas_price_override() -> Weight {
- Weight::from_ref_time(4_221_000 as u64)
+ Weight::from_ref_time(3_625_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Configuration XcmAllowedLocationsOverride (r:0 w:1)
fn set_xcm_allowed_locations() -> Weight {
- Weight::from_ref_time(5_329_000 as u64)
+ Weight::from_ref_time(3_975_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Configuration AppPromomotionConfigurationOverride (r:0 w:1)
fn set_app_promotion_configuration_override() -> Weight {
- Weight::from_ref_time(5_805_000 as u64)
+ Weight::from_ref_time(4_759_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Configuration CollatorSelectionDesiredCollatorsOverride (r:0 w:1)
fn set_collator_selection_desired_collators() -> Weight {
- Weight::from_ref_time(21_590_000 as u64)
+ Weight::from_ref_time(18_296_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Configuration CollatorSelectionLicenseBondOverride (r:0 w:1)
fn set_collator_selection_license_bond() -> Weight {
- Weight::from_ref_time(15_141_000 as u64)
+ Weight::from_ref_time(14_397_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Configuration CollatorSelectionKickThresholdOverride (r:0 w:1)
fn set_collator_selection_kick_threshold() -> Weight {
- Weight::from_ref_time(12_042_000 as u64)
+ Weight::from_ref_time(13_951_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
}
@@ -87,37 +87,37 @@
impl WeightInfo for () {
// Storage: Configuration WeightToFeeCoefficientOverride (r:0 w:1)
fn set_weight_to_fee_coefficient_override() -> Weight {
- Weight::from_ref_time(3_865_000 as u64)
+ Weight::from_ref_time(3_732_000 as u64)
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Configuration MinGasPriceOverride (r:0 w:1)
fn set_min_gas_price_override() -> Weight {
- Weight::from_ref_time(4_221_000 as u64)
+ Weight::from_ref_time(3_625_000 as u64)
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Configuration XcmAllowedLocationsOverride (r:0 w:1)
fn set_xcm_allowed_locations() -> Weight {
- Weight::from_ref_time(5_329_000 as u64)
+ Weight::from_ref_time(3_975_000 as u64)
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Configuration AppPromomotionConfigurationOverride (r:0 w:1)
fn set_app_promotion_configuration_override() -> Weight {
- Weight::from_ref_time(5_805_000 as u64)
+ Weight::from_ref_time(4_759_000 as u64)
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Configuration CollatorSelectionDesiredCollatorsOverride (r:0 w:1)
fn set_collator_selection_desired_collators() -> Weight {
- Weight::from_ref_time(21_590_000 as u64)
+ Weight::from_ref_time(18_296_000 as u64)
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Configuration CollatorSelectionLicenseBondOverride (r:0 w:1)
fn set_collator_selection_license_bond() -> Weight {
- Weight::from_ref_time(15_141_000 as u64)
+ Weight::from_ref_time(14_397_000 as u64)
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Configuration CollatorSelectionKickThresholdOverride (r:0 w:1)
fn set_collator_selection_kick_threshold() -> Weight {
- Weight::from_ref_time(12_042_000 as u64)
+ Weight::from_ref_time(13_951_000 as u64)
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
}
pallets/evm-contract-helpers/src/lib.rsdiffbeforeafterboth1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617#![doc = include_str!("../README.md")]18#![cfg_attr(not(feature = "std"), no_std)]19#![warn(missing_docs)]2021use codec::{Decode, Encode, MaxEncodedLen};22use evm_coder::AbiCoder;23pub use pallet::*;24pub use eth::*;25use scale_info::TypeInfo;26use frame_support::storage::bounded_btree_map::BoundedBTreeMap;27pub mod eth;2829/// Maximum number of methods per contract that could have fee limit30pub const MAX_FEE_LIMITED_METHODS: u32 = 5;3132#[frame_support::pallet]33pub mod pallet {34 pub use super::*;35 use crate::eth::ContractHelpersEvents;36 use frame_support::pallet_prelude::*;37 use pallet_evm_coder_substrate::DispatchResult;38 use sp_core::{H160, U256};39 use pallet_evm::{account::CrossAccountId, Pallet as PalletEvm};40 use up_data_structs::SponsorshipState;41 use evm_coder::ToLog;4243 #[pallet::config]44 pub trait Config:45 frame_system::Config + pallet_evm_coder_substrate::Config + pallet_evm::Config46 {47 /// Overarching event type.48 type RuntimeEvent: IsType<<Self as frame_system::Config>::RuntimeEvent> + From<Event<Self>>;4950 /// Address, under which magic contract will be available51 #[pallet::constant]52 type ContractAddress: Get<H160>;5354 /// In case of enabled sponsoring, but no sponsoring rate limit set,55 /// this value will be used implicitly56 type DefaultSponsoringRateLimit: Get<Self::BlockNumber>;57 }5859 #[pallet::error]60 pub enum Error<T> {61 /// This method is only executable by contract owner62 NoPermission,6364 /// No pending sponsor for contract.65 NoPendingSponsor,6667 /// Number of methods that sponsored limit is defined for exceeds maximum.68 TooManyMethodsHaveSponsoredLimit,69 }7071 #[pallet::pallet]72 #[pallet::generate_store(trait Store)]73 pub struct Pallet<T>(_);7475 /// Store owner for contract.76 ///77 /// * **Key** - contract address.78 /// * **Value** - owner for contract.79 #[pallet::storage]80 pub(super) type Owner<T: Config> =81 StorageMap<Hasher = Twox128, Key = H160, Value = H160, QueryKind = ValueQuery>;8283 /// Deprecated: this storage is deprecated84 #[pallet::storage]85 type SelfSponsoring<T: Config> =86 StorageMap<Hasher = Twox128, Key = H160, Value = bool, QueryKind = ValueQuery>;8788 /// Store for contract sponsorship state.89 ///90 /// * **Key** - contract address.91 /// * **Value** - sponsorship state.92 #[pallet::storage]93 pub(super) type Sponsoring<T: Config> = StorageMap<94 Hasher = Twox64Concat,95 Key = H160,96 Value = SponsorshipState<T::CrossAccountId>,97 QueryKind = ValueQuery,98 >;99100 /// Store for sponsoring mode.101 ///102 /// ### Usage103 /// Prefer to delete collection from storage if mode chaged to [`Disabled`](SponsoringModeT::Disabled).104 ///105 /// * **Key** - contract address.106 /// * **Value** - [`sponsoring mode`](SponsoringModeT).107 #[pallet::storage]108 pub(super) type SponsoringMode<T: Config> =109 StorageMap<Hasher = Twox128, Key = H160, Value = SponsoringModeT, QueryKind = OptionQuery>;110111 /// Storage for sponsoring rate limit in blocks.112 ///113 /// * **Key** - contract address.114 /// * **Value** - amount of sponsored blocks.115 #[pallet::storage]116 pub(super) type SponsoringRateLimit<T: Config> = StorageMap<117 Hasher = Twox128,118 Key = H160,119 Value = T::BlockNumber,120 QueryKind = ValueQuery,121 OnEmpty = T::DefaultSponsoringRateLimit,122 >;123124 /// Storage for last sponsored block.125 ///126 /// * **Key1** - contract address.127 /// * **Key2** - sponsored user address.128 /// * **Value** - last sponsored block number.129 #[pallet::storage]130 pub(super) type SponsoringFeeLimit<T: Config> = StorageMap<131 Hasher = Twox128,132 Key = H160,133 Value = BoundedBTreeMap<u32, U256, ConstU32<MAX_FEE_LIMITED_METHODS>>,134 QueryKind = ValueQuery,135 >;136137 #[pallet::storage]138 pub(super) type SponsorBasket<T: Config> = StorageDoubleMap<139 Hasher1 = Twox128,140 Key1 = H160,141 Hasher2 = Twox128,142 Key2 = H160,143 Value = T::BlockNumber,144 QueryKind = OptionQuery,145 >;146147 /// Storege for contracts with [`Allowlisted`](SponsoringModeT::Allowlisted) sponsoring mode.148 ///149 /// ### Usage150 /// Prefer to delete collection from storage if mode chaged to non `Allowlisted`, than set **Value** to **false**.151 ///152 /// * **Key** - contract address.153 /// * **Value** - is contract in [`Allowlisted`](SponsoringModeT::Allowlisted) mode.154 #[pallet::storage]155 pub(super) type AllowlistEnabled<T: Config> =156 StorageMap<Hasher = Twox128, Key = H160, Value = bool, QueryKind = ValueQuery>;157158 /// Storage for users that allowed for sponsorship.159 ///160 /// ### Usage161 /// Prefer to delete record from storage if user no more allowed for sponsorship.162 ///163 /// * **Key1** - contract address.164 /// * **Key2** - user that allowed for sponsorship.165 /// * **Value** - allowance for sponsorship.166 #[pallet::storage]167 pub(super) type Allowlist<T: Config> = StorageDoubleMap<168 Hasher1 = Twox128,169 Key1 = H160,170 Hasher2 = Twox128,171 Key2 = H160,172 Value = bool,173 QueryKind = ValueQuery,174 >;175176 #[pallet::event]177 #[pallet::generate_deposit(fn deposit_event)]178 pub enum Event<T: Config> {179 /// Contract sponsor was set.180 ContractSponsorSet(181 /// Contract address of the affected collection.182 H160,183 /// New sponsor address.184 T::AccountId,185 ),186187 /// New sponsor was confirm.188 ContractSponsorshipConfirmed(189 /// Contract address of the affected collection.190 H160,191 /// New sponsor address.192 T::AccountId,193 ),194195 /// Collection sponsor was removed.196 ContractSponsorRemoved(197 /// Contract address of the affected collection.198 H160,199 ),200 }201202 impl<T: Config> Pallet<T> {203 /// Get contract owner.204 pub fn contract_owner(contract: H160) -> H160 {205 <Owner<T>>::get(contract)206 }207208 /// Set `sponsor` for `contract`.209 ///210 /// `sender` must be owner of contract.211 pub fn set_sponsor(212 sender: &T::CrossAccountId,213 contract: H160,214 sponsor: &T::CrossAccountId,215 ) -> DispatchResult {216 Pallet::<T>::ensure_owner(contract, *sender.as_eth())?;217 Sponsoring::<T>::insert(218 contract,219 SponsorshipState::<T::CrossAccountId>::Unconfirmed(sponsor.clone()),220 );221222 <Pallet<T>>::deposit_event(Event::<T>::ContractSponsorSet(223 contract,224 sponsor.as_sub().clone(),225 ));226 <PalletEvm<T>>::deposit_log(227 ContractHelpersEvents::ContractSponsorSet {228 contract_address: contract,229 sponsor: *sponsor.as_eth(),230 }231 .to_log(contract),232 );233 Ok(())234 }235236 /// Force set `sponsor` for `contract`.237 ///238 /// Differs from `set_sponsor` in that confirmation239 /// from the sponsor is not required.240 pub fn force_set_sponsor(241 contract_address: H160,242 sponsor: &T::CrossAccountId,243 ) -> DispatchResult {244 Sponsoring::<T>::insert(245 contract_address,246 SponsorshipState::<T::CrossAccountId>::Confirmed(sponsor.clone()),247 );248249 let eth_sponsor = *sponsor.as_eth();250 let sub_sponsor = sponsor.as_sub().clone();251252 <Pallet<T>>::deposit_event(Event::<T>::ContractSponsorSet(253 contract_address,254 sub_sponsor.clone(),255 ));256 <PalletEvm<T>>::deposit_log(257 ContractHelpersEvents::ContractSponsorSet {258 contract_address,259 sponsor: eth_sponsor,260 }261 .to_log(contract_address),262 );263264 <Pallet<T>>::deposit_event(Event::<T>::ContractSponsorshipConfirmed(265 contract_address,266 sub_sponsor,267 ));268 <PalletEvm<T>>::deposit_log(269 ContractHelpersEvents::ContractSponsorshipConfirmed {270 contract_address,271 sponsor: eth_sponsor,272 }273 .to_log(contract_address),274 );275276 Ok(())277 }278279 /// Remove sponsor for `contract`.280 ///281 /// `sender` must be owner of contract.282 pub fn remove_sponsor(283 sender: &T::CrossAccountId,284 contract_address: H160,285 ) -> DispatchResult {286 Self::ensure_owner(contract_address, *sender.as_eth())?;287 Self::force_remove_sponsor(contract_address)288 }289290 /// Force remove `sponsor` for `contract`.291 ///292 /// Differs from `remove_sponsor` in that293 /// it doesn't require consent from the `owner` of the contract.294 pub fn force_remove_sponsor(contract_address: H160) -> DispatchResult {295 Sponsoring::<T>::remove(contract_address);296297 Self::deposit_event(Event::<T>::ContractSponsorRemoved(contract_address));298 <PalletEvm<T>>::deposit_log(299 ContractHelpersEvents::ContractSponsorRemoved { contract_address }300 .to_log(contract_address),301 );302303 Ok(())304 }305306 /// Confirm sponsorship.307 ///308 /// `sender` must be same that set via [`set_sponsor`].309 pub fn confirm_sponsorship(310 sender: &T::CrossAccountId,311 contract_address: H160,312 ) -> DispatchResult {313 match Sponsoring::<T>::get(contract_address) {314 SponsorshipState::Unconfirmed(sponsor) => {315 ensure!(sponsor == *sender, Error::<T>::NoPermission);316 let eth_sponsor = *sponsor.as_eth();317 let sub_sponsor = sponsor.as_sub().clone();318 Sponsoring::<T>::insert(319 contract_address,320 SponsorshipState::<T::CrossAccountId>::Confirmed(sponsor),321 );322323 <Pallet<T>>::deposit_event(Event::<T>::ContractSponsorshipConfirmed(324 contract_address,325 sub_sponsor,326 ));327 <PalletEvm<T>>::deposit_log(328 ContractHelpersEvents::ContractSponsorshipConfirmed {329 contract_address,330 sponsor: eth_sponsor,331 }332 .to_log(contract_address),333 );334335 Ok(())336 }337 SponsorshipState::Disabled | SponsorshipState::Confirmed(_) => {338 Err(Error::<T>::NoPendingSponsor.into())339 }340 }341 }342343 /// Get sponsor.344 pub fn get_sponsor(contract: H160) -> Option<T::CrossAccountId> {345 match Sponsoring::<T>::get(contract) {346 SponsorshipState::Disabled | SponsorshipState::Unconfirmed(_) => None,347 SponsorshipState::Confirmed(sponsor) => Some(sponsor),348 }349 }350351 /// Get current sponsoring mode, performing lazy migration from legacy storage352 /// Deprecated: this method is for deprecated storage353 pub fn sponsoring_mode(contract: H160) -> SponsoringModeT {354 <SponsoringMode<T>>::get(contract)355 .or_else(|| {356 #[allow(deprecated)]357 <SelfSponsoring<T>>::get(contract).then(|| SponsoringModeT::Allowlisted)358 })359 .unwrap_or_default()360 }361362 /// Reconfigure contract sponsoring mode363 /// Deprecated: this method is for deprecated storage364 pub fn set_sponsoring_mode(contract: H160, mode: SponsoringModeT) {365 if mode == SponsoringModeT::Disabled {366 <SponsoringMode<T>>::remove(contract);367 } else {368 <SponsoringMode<T>>::insert(contract, mode);369 }370 #[allow(deprecated)]371 <SelfSponsoring<T>>::remove(contract)372 }373374 /// Set duration between two sponsored contract calls375 pub fn set_sponsoring_rate_limit(contract: H160, rate_limit: T::BlockNumber) {376 <SponsoringRateLimit<T>>::insert(contract, rate_limit);377 }378379 /// Set maximum for gas limit of transaction380 pub fn set_sponsoring_fee_limit(contract: H160, fee_limit: U256) -> DispatchResult {381 <SponsoringFeeLimit<T>>::try_mutate(contract, |limits_map| {382 limits_map383 .try_insert(0xffffffff, fee_limit)384 .map_err(|_| <Error<T>>::TooManyMethodsHaveSponsoredLimit)385 })?;386 Ok(())387 }388389 /// Is user added to allowlist, or he is owner of specified contract390 pub fn allowed(contract: H160, user: H160) -> bool {391 <Allowlist<T>>::get(&contract, &user) || <Owner<T>>::get(&contract) == user392 }393394 /// Toggle contract allowlist access395 pub fn toggle_allowlist(contract: H160, enabled: bool) {396 <AllowlistEnabled<T>>::insert(contract, enabled)397 }398399 /// Toggle user presence in contract's allowlist400 pub fn toggle_allowed(contract: H160, user: H160, allowed: bool) {401 <Allowlist<T>>::insert(contract, user, allowed);402 }403404 /// Throw error if user is not allowed to reconfigure target contract405 pub fn ensure_owner(contract: H160, user: H160) -> DispatchResult {406 ensure!(<Owner<T>>::get(&contract) == user, Error::<T>::NoPermission);407 Ok(())408 }409 }410}411412/// Available contract sponsoring modes413#[derive(414 Encode, Decode, Debug, PartialEq, TypeInfo, MaxEncodedLen, Default, AbiCoder, Clone, Copy,415)]416#[repr(u8)]417pub enum SponsoringModeT {418 /// Sponsoring is disabled419 #[default]420 Disabled,421 /// Only users from allowlist will be sponsored422 Allowlisted,423 /// All users will be sponsored424 Generous,425}1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617#![doc = include_str!("../README.md")]18#![cfg_attr(not(feature = "std"), no_std)]19#![warn(missing_docs)]2021use codec::{Decode, Encode, MaxEncodedLen};22use evm_coder::AbiCoder;23pub use pallet::*;24pub use eth::*;25use scale_info::TypeInfo;26use frame_support::storage::bounded_btree_map::BoundedBTreeMap;27pub mod eth;2829/// Maximum number of methods per contract that could have fee limit30pub const MAX_FEE_LIMITED_METHODS: u32 = 5;3132#[frame_support::pallet]33pub mod pallet {34 pub use super::*;35 use crate::eth::ContractHelpersEvents;36 use frame_support::{pallet_prelude::*, sp_runtime::DispatchResult};37 use frame_system::{pallet_prelude::OriginFor, ensure_root};38 use sp_core::{H160, U256};39 use sp_std::vec::Vec;40 use pallet_evm::{account::CrossAccountId, Pallet as PalletEvm};41 use up_data_structs::SponsorshipState;42 use evm_coder::ToLog;4344 #[pallet::config]45 pub trait Config:46 frame_system::Config + pallet_evm_coder_substrate::Config + pallet_evm::Config47 {48 /// Overarching event type.49 type RuntimeEvent: IsType<<Self as frame_system::Config>::RuntimeEvent> + From<Event<Self>>;5051 /// Address, under which magic contract will be available52 #[pallet::constant]53 type ContractAddress: Get<H160>;5455 /// In case of enabled sponsoring, but no sponsoring rate limit set,56 /// this value will be used implicitly57 type DefaultSponsoringRateLimit: Get<Self::BlockNumber>;58 }5960 #[pallet::error]61 pub enum Error<T> {62 /// This method is only executable by contract owner63 NoPermission,6465 /// No pending sponsor for contract.66 NoPendingSponsor,6768 /// Number of methods that sponsored limit is defined for exceeds maximum.69 TooManyMethodsHaveSponsoredLimit,70 }7172 #[pallet::pallet]73 #[pallet::generate_store(trait Store)]74 pub struct Pallet<T>(_);7576 /// Store owner for contract.77 ///78 /// * **Key** - contract address.79 /// * **Value** - owner for contract.80 #[pallet::storage]81 pub(super) type Owner<T: Config> =82 StorageMap<Hasher = Twox128, Key = H160, Value = H160, QueryKind = ValueQuery>;8384 /// Deprecated: this storage is deprecated85 #[pallet::storage]86 type SelfSponsoring<T: Config> =87 StorageMap<Hasher = Twox128, Key = H160, Value = bool, QueryKind = ValueQuery>;8889 /// Store for contract sponsorship state.90 ///91 /// * **Key** - contract address.92 /// * **Value** - sponsorship state.93 #[pallet::storage]94 pub(super) type Sponsoring<T: Config> = StorageMap<95 Hasher = Twox64Concat,96 Key = H160,97 Value = SponsorshipState<T::CrossAccountId>,98 QueryKind = ValueQuery,99 >;100101 /// Store for sponsoring mode.102 ///103 /// ### Usage104 /// Prefer to delete collection from storage if mode chaged to [`Disabled`](SponsoringModeT::Disabled).105 ///106 /// * **Key** - contract address.107 /// * **Value** - [`sponsoring mode`](SponsoringModeT).108 #[pallet::storage]109 pub(super) type SponsoringMode<T: Config> =110 StorageMap<Hasher = Twox128, Key = H160, Value = SponsoringModeT, QueryKind = OptionQuery>;111112 /// Storage for sponsoring rate limit in blocks.113 ///114 /// * **Key** - contract address.115 /// * **Value** - amount of sponsored blocks.116 #[pallet::storage]117 pub(super) type SponsoringRateLimit<T: Config> = StorageMap<118 Hasher = Twox128,119 Key = H160,120 Value = T::BlockNumber,121 QueryKind = ValueQuery,122 OnEmpty = T::DefaultSponsoringRateLimit,123 >;124125 /// Storage for last sponsored block.126 ///127 /// * **Key1** - contract address.128 /// * **Key2** - sponsored user address.129 /// * **Value** - last sponsored block number.130 #[pallet::storage]131 pub(super) type SponsoringFeeLimit<T: Config> = StorageMap<132 Hasher = Twox128,133 Key = H160,134 Value = BoundedBTreeMap<u32, U256, ConstU32<MAX_FEE_LIMITED_METHODS>>,135 QueryKind = ValueQuery,136 >;137138 #[pallet::storage]139 pub(super) type SponsorBasket<T: Config> = StorageDoubleMap<140 Hasher1 = Twox128,141 Key1 = H160,142 Hasher2 = Twox128,143 Key2 = H160,144 Value = T::BlockNumber,145 QueryKind = OptionQuery,146 >;147148 /// Storege for contracts with [`Allowlisted`](SponsoringModeT::Allowlisted) sponsoring mode.149 ///150 /// ### Usage151 /// Prefer to delete collection from storage if mode chaged to non `Allowlisted`, than set **Value** to **false**.152 ///153 /// * **Key** - contract address.154 /// * **Value** - is contract in [`Allowlisted`](SponsoringModeT::Allowlisted) mode.155 #[pallet::storage]156 pub(super) type AllowlistEnabled<T: Config> =157 StorageMap<Hasher = Twox128, Key = H160, Value = bool, QueryKind = ValueQuery>;158159 /// Storage for users that allowed for sponsorship.160 ///161 /// ### Usage162 /// Prefer to delete record from storage if user no more allowed for sponsorship.163 ///164 /// * **Key1** - contract address.165 /// * **Key2** - user that allowed for sponsorship.166 /// * **Value** - allowance for sponsorship.167 #[pallet::storage]168 pub(super) type Allowlist<T: Config> = StorageDoubleMap<169 Hasher1 = Twox128,170 Key1 = H160,171 Hasher2 = Twox128,172 Key2 = H160,173 Value = bool,174 QueryKind = ValueQuery,175 >;176177 #[pallet::event]178 #[pallet::generate_deposit(fn deposit_event)]179 pub enum Event<T: Config> {180 /// Contract sponsor was set.181 ContractSponsorSet(182 /// Contract address of the affected collection.183 H160,184 /// New sponsor address.185 T::AccountId,186 ),187188 /// New sponsor was confirm.189 ContractSponsorshipConfirmed(190 /// Contract address of the affected collection.191 H160,192 /// New sponsor address.193 T::AccountId,194 ),195196 /// Collection sponsor was removed.197 ContractSponsorRemoved(198 /// Contract address of the affected collection.199 H160,200 ),201 }202203 #[pallet::call]204 impl<T: Config> Pallet<T> {205 /// Migrate contract to use `SponsoringMode` storage instead of `SelfSponsoring`206 #[pallet::call_index(0)]207 #[pallet::weight(<T as frame_system::Config>::DbWeight::get().reads_writes(208 addresses.len() as u64, addresses.len() as u64 * 2209 ))]210 pub fn migrate_from_self_sponsoring(211 origin: OriginFor<T>,212 addresses: Vec<H160>,213 ) -> DispatchResult {214 ensure_root(origin)?;215 for address in addresses {216 if <SelfSponsoring<T>>::get(address) {217 <SponsoringMode<T>>::set(address, Some(SponsoringModeT::Allowlisted));218 <SelfSponsoring<T>>::remove(address);219 }220 }221 Ok(())222 }223 }224225 impl<T: Config> Pallet<T> {226 /// Get contract owner.227 pub fn contract_owner(contract: H160) -> H160 {228 <Owner<T>>::get(contract)229 }230231 /// Set `sponsor` for `contract`.232 ///233 /// `sender` must be owner of contract.234 pub fn set_sponsor(235 sender: &T::CrossAccountId,236 contract: H160,237 sponsor: &T::CrossAccountId,238 ) -> DispatchResult {239 Pallet::<T>::ensure_owner(contract, *sender.as_eth())?;240 Sponsoring::<T>::insert(241 contract,242 SponsorshipState::<T::CrossAccountId>::Unconfirmed(sponsor.clone()),243 );244245 <Pallet<T>>::deposit_event(Event::<T>::ContractSponsorSet(246 contract,247 sponsor.as_sub().clone(),248 ));249 <PalletEvm<T>>::deposit_log(250 ContractHelpersEvents::ContractSponsorSet {251 contract_address: contract,252 sponsor: *sponsor.as_eth(),253 }254 .to_log(contract),255 );256 Ok(())257 }258259 /// Force set `sponsor` for `contract`.260 ///261 /// Differs from `set_sponsor` in that confirmation262 /// from the sponsor is not required.263 pub fn force_set_sponsor(264 contract_address: H160,265 sponsor: &T::CrossAccountId,266 ) -> DispatchResult {267 Sponsoring::<T>::insert(268 contract_address,269 SponsorshipState::<T::CrossAccountId>::Confirmed(sponsor.clone()),270 );271272 let eth_sponsor = *sponsor.as_eth();273 let sub_sponsor = sponsor.as_sub().clone();274275 <Pallet<T>>::deposit_event(Event::<T>::ContractSponsorSet(276 contract_address,277 sub_sponsor.clone(),278 ));279 <PalletEvm<T>>::deposit_log(280 ContractHelpersEvents::ContractSponsorSet {281 contract_address,282 sponsor: eth_sponsor,283 }284 .to_log(contract_address),285 );286287 <Pallet<T>>::deposit_event(Event::<T>::ContractSponsorshipConfirmed(288 contract_address,289 sub_sponsor,290 ));291 <PalletEvm<T>>::deposit_log(292 ContractHelpersEvents::ContractSponsorshipConfirmed {293 contract_address,294 sponsor: eth_sponsor,295 }296 .to_log(contract_address),297 );298299 Ok(())300 }301302 /// Remove sponsor for `contract`.303 ///304 /// `sender` must be owner of contract.305 pub fn remove_sponsor(306 sender: &T::CrossAccountId,307 contract_address: H160,308 ) -> DispatchResult {309 Self::ensure_owner(contract_address, *sender.as_eth())?;310 Self::force_remove_sponsor(contract_address)311 }312313 /// Force remove `sponsor` for `contract`.314 ///315 /// Differs from `remove_sponsor` in that316 /// it doesn't require consent from the `owner` of the contract.317 pub fn force_remove_sponsor(contract_address: H160) -> DispatchResult {318 Sponsoring::<T>::remove(contract_address);319320 Self::deposit_event(Event::<T>::ContractSponsorRemoved(contract_address));321 <PalletEvm<T>>::deposit_log(322 ContractHelpersEvents::ContractSponsorRemoved { contract_address }323 .to_log(contract_address),324 );325326 Ok(())327 }328329 /// Confirm sponsorship.330 ///331 /// `sender` must be same that set via [`set_sponsor`].332 pub fn confirm_sponsorship(333 sender: &T::CrossAccountId,334 contract_address: H160,335 ) -> DispatchResult {336 match Sponsoring::<T>::get(contract_address) {337 SponsorshipState::Unconfirmed(sponsor) => {338 ensure!(sponsor == *sender, Error::<T>::NoPermission);339 let eth_sponsor = *sponsor.as_eth();340 let sub_sponsor = sponsor.as_sub().clone();341 Sponsoring::<T>::insert(342 contract_address,343 SponsorshipState::<T::CrossAccountId>::Confirmed(sponsor),344 );345346 <Pallet<T>>::deposit_event(Event::<T>::ContractSponsorshipConfirmed(347 contract_address,348 sub_sponsor,349 ));350 <PalletEvm<T>>::deposit_log(351 ContractHelpersEvents::ContractSponsorshipConfirmed {352 contract_address,353 sponsor: eth_sponsor,354 }355 .to_log(contract_address),356 );357358 Ok(())359 }360 SponsorshipState::Disabled | SponsorshipState::Confirmed(_) => {361 Err(Error::<T>::NoPendingSponsor.into())362 }363 }364 }365366 /// Get sponsor.367 pub fn get_sponsor(contract: H160) -> Option<T::CrossAccountId> {368 match Sponsoring::<T>::get(contract) {369 SponsorshipState::Disabled | SponsorshipState::Unconfirmed(_) => None,370 SponsorshipState::Confirmed(sponsor) => Some(sponsor),371 }372 }373374 /// Get current sponsoring mode, performing lazy migration from legacy storage375 /// Deprecated: this method is for deprecated storage376 pub fn sponsoring_mode(contract: H160) -> SponsoringModeT {377 <SponsoringMode<T>>::get(contract)378 .or_else(|| {379 #[allow(deprecated)]380 <SelfSponsoring<T>>::get(contract).then(|| SponsoringModeT::Allowlisted)381 })382 .unwrap_or_default()383 }384385 /// Reconfigure contract sponsoring mode386 /// Deprecated: this method is for deprecated storage387 pub fn set_sponsoring_mode(contract: H160, mode: SponsoringModeT) {388 if mode == SponsoringModeT::Disabled {389 <SponsoringMode<T>>::remove(contract);390 } else {391 <SponsoringMode<T>>::insert(contract, mode);392 }393 #[allow(deprecated)]394 <SelfSponsoring<T>>::remove(contract)395 }396397 /// Set duration between two sponsored contract calls398 pub fn set_sponsoring_rate_limit(contract: H160, rate_limit: T::BlockNumber) {399 <SponsoringRateLimit<T>>::insert(contract, rate_limit);400 }401402 /// Set maximum for gas limit of transaction403 pub fn set_sponsoring_fee_limit(contract: H160, fee_limit: U256) -> DispatchResult {404 <SponsoringFeeLimit<T>>::try_mutate(contract, |limits_map| {405 limits_map406 .try_insert(0xffffffff, fee_limit)407 .map_err(|_| <Error<T>>::TooManyMethodsHaveSponsoredLimit)408 })?;409 Ok(())410 }411412 /// Is user added to allowlist, or he is owner of specified contract413 pub fn allowed(contract: H160, user: H160) -> bool {414 <Allowlist<T>>::get(&contract, &user) || <Owner<T>>::get(&contract) == user415 }416417 /// Toggle contract allowlist access418 pub fn toggle_allowlist(contract: H160, enabled: bool) {419 <AllowlistEnabled<T>>::insert(contract, enabled)420 }421422 /// Toggle user presence in contract's allowlist423 pub fn toggle_allowed(contract: H160, user: H160, allowed: bool) {424 <Allowlist<T>>::insert(contract, user, allowed);425 }426427 /// Throw error if user is not allowed to reconfigure target contract428 pub fn ensure_owner(contract: H160, user: H160) -> DispatchResult {429 ensure!(<Owner<T>>::get(&contract) == user, Error::<T>::NoPermission);430 Ok(())431 }432 }433}434435/// Available contract sponsoring modes436#[derive(437 Encode, Decode, Debug, PartialEq, TypeInfo, MaxEncodedLen, Default, AbiCoder, Clone, Copy,438)]439#[repr(u8)]440pub enum SponsoringModeT {441 /// Sponsoring is disabled442 #[default]443 Disabled,444 /// Only users from allowlist will be sponsored445 Allowlisted,446 /// All users will be sponsored447 Generous,448}pallets/evm-migration/Cargo.tomldiffbeforeafterboth--- a/pallets/evm-migration/Cargo.toml
+++ b/pallets/evm-migration/Cargo.toml
@@ -16,9 +16,10 @@
scale-info = { workspace = true }
sp-core = { workspace = true }
sp-std = { workspace = true }
+sp-io = { workspace = true }
[features]
default = ["runtime-benchmarks", "std"]
runtime-benchmarks = ["frame-benchmarking"]
-std = ["frame-benchmarking/std", "frame-support/std", "frame-system/std", "pallet-evm/std", "sp-core/std", "sp-std/std"]
+std = ["frame-benchmarking/std", "frame-support/std", "frame-system/std", "pallet-evm/std", "sp-core/std", "sp-std/std", "sp-io/std"]
try-runtime = ["frame-support/try-runtime"]
pallets/evm-migration/src/lib.rsdiffbeforeafterboth--- a/pallets/evm-migration/src/lib.rs
+++ b/pallets/evm-migration/src/lib.rs
@@ -149,6 +149,17 @@
}
Ok(())
}
+
+ /// Remove remark compatibility data leftovers
+ #[pallet::call_index(5)]
+ #[pallet::weight(<T as frame_system::Config>::DbWeight::get().reads_writes(10, 10))]
+ pub fn remove_rmrk_data(origin: OriginFor<T>) -> DispatchResult {
+ use sp_io::hashing::twox_128;
+ ensure_root(origin)?;
+ let _ = sp_io::storage::clear_prefix(&twox_128(b"RmrkEquip"), Some(5));
+ let _ = sp_io::storage::clear_prefix(&twox_128(b"RmrkCore"), Some(5));
+ Ok(())
+ }
}
/// Implements [`pallet_evm::OnMethodCall`], which reserves accounts with pending migration
pallets/evm-migration/src/weights.rsdiffbeforeafterboth--- a/pallets/evm-migration/src/weights.rs
+++ b/pallets/evm-migration/src/weights.rs
@@ -3,7 +3,7 @@
//! Autogenerated weights for pallet_evm_migration
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
-//! DATE: 2023-01-29, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! DATE: 2023-02-15, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
@@ -48,35 +48,37 @@
// Storage: System Account (r:1 w:0)
// Storage: EVM AccountCodes (r:1 w:0)
fn begin() -> Weight {
- Weight::from_ref_time(16_189_000 as u64)
+ Weight::from_ref_time(16_052_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: EvmMigration MigrationPending (r:1 w:0)
// Storage: EVM AccountStorages (r:0 w:1)
fn set_data(b: u32, ) -> Weight {
- Weight::from_ref_time(7_829_947 as u64)
- // Standard Error: 687
- .saturating_add(Weight::from_ref_time(968_768 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(9_257_564 as u64)
+ // Standard Error: 1_384
+ .saturating_add(Weight::from_ref_time(939_454 as u64).saturating_mul(b as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(b as u64)))
}
// Storage: EvmMigration MigrationPending (r:1 w:1)
// Storage: EVM AccountCodes (r:0 w:1)
- fn finish(_b: u32, ) -> Weight {
- Weight::from_ref_time(9_559_086 as u64)
+ fn finish(b: u32, ) -> Weight {
+ Weight::from_ref_time(9_832_338 as u64)
+ // Standard Error: 351
+ .saturating_add(Weight::from_ref_time(415 as u64).saturating_mul(b as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
fn insert_eth_logs(b: u32, ) -> Weight {
- Weight::from_ref_time(7_535_186 as u64)
- // Standard Error: 1_440
- .saturating_add(Weight::from_ref_time(699_517 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(7_589_210 as u64)
+ // Standard Error: 864
+ .saturating_add(Weight::from_ref_time(688_444 as u64).saturating_mul(b as u64))
}
fn insert_events(b: u32, ) -> Weight {
- Weight::from_ref_time(10_612_317 as u64)
- // Standard Error: 999
- .saturating_add(Weight::from_ref_time(1_296_893 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(11_531_726 as u64)
+ // Standard Error: 580
+ .saturating_add(Weight::from_ref_time(1_271_608 as u64).saturating_mul(b as u64))
}
}
@@ -86,34 +88,36 @@
// Storage: System Account (r:1 w:0)
// Storage: EVM AccountCodes (r:1 w:0)
fn begin() -> Weight {
- Weight::from_ref_time(16_189_000 as u64)
+ Weight::from_ref_time(16_052_000 as u64)
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: EvmMigration MigrationPending (r:1 w:0)
// Storage: EVM AccountStorages (r:0 w:1)
fn set_data(b: u32, ) -> Weight {
- Weight::from_ref_time(7_829_947 as u64)
- // Standard Error: 687
- .saturating_add(Weight::from_ref_time(968_768 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(9_257_564 as u64)
+ // Standard Error: 1_384
+ .saturating_add(Weight::from_ref_time(939_454 as u64).saturating_mul(b as u64))
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(b as u64)))
}
// Storage: EvmMigration MigrationPending (r:1 w:1)
// Storage: EVM AccountCodes (r:0 w:1)
- fn finish(_b: u32, ) -> Weight {
- Weight::from_ref_time(9_559_086 as u64)
+ fn finish(b: u32, ) -> Weight {
+ Weight::from_ref_time(9_832_338 as u64)
+ // Standard Error: 351
+ .saturating_add(Weight::from_ref_time(415 as u64).saturating_mul(b as u64))
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
}
fn insert_eth_logs(b: u32, ) -> Weight {
- Weight::from_ref_time(7_535_186 as u64)
- // Standard Error: 1_440
- .saturating_add(Weight::from_ref_time(699_517 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(7_589_210 as u64)
+ // Standard Error: 864
+ .saturating_add(Weight::from_ref_time(688_444 as u64).saturating_mul(b as u64))
}
fn insert_events(b: u32, ) -> Weight {
- Weight::from_ref_time(10_612_317 as u64)
- // Standard Error: 999
- .saturating_add(Weight::from_ref_time(1_296_893 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(11_531_726 as u64)
+ // Standard Error: 580
+ .saturating_add(Weight::from_ref_time(1_271_608 as u64).saturating_mul(b as u64))
}
}
pallets/foreign-assets/src/weights.rsdiffbeforeafterboth--- a/pallets/foreign-assets/src/weights.rs
+++ b/pallets/foreign-assets/src/weights.rs
@@ -3,7 +3,7 @@
//! Autogenerated weights for pallet_foreign_assets
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
-//! DATE: 2023-01-29, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! DATE: 2023-02-15, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
@@ -53,14 +53,14 @@
// Storage: Common CollectionProperties (r:0 w:1)
// Storage: Common CollectionById (r:0 w:1)
fn register_foreign_asset() -> Weight {
- Weight::from_ref_time(50_058_000 as u64)
+ Weight::from_ref_time(49_269_000 as u64)
.saturating_add(T::DbWeight::get().reads(9 as u64))
.saturating_add(T::DbWeight::get().writes(11 as u64))
}
// Storage: ForeignAssets ForeignAssetLocations (r:1 w:1)
// Storage: ForeignAssets AssetMetadatas (r:1 w:1)
fn update_foreign_asset() -> Weight {
- Weight::from_ref_time(22_669_000 as u64)
+ Weight::from_ref_time(21_973_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
@@ -80,14 +80,14 @@
// Storage: Common CollectionProperties (r:0 w:1)
// Storage: Common CollectionById (r:0 w:1)
fn register_foreign_asset() -> Weight {
- Weight::from_ref_time(50_058_000 as u64)
+ Weight::from_ref_time(49_269_000 as u64)
.saturating_add(RocksDbWeight::get().reads(9 as u64))
.saturating_add(RocksDbWeight::get().writes(11 as u64))
}
// Storage: ForeignAssets ForeignAssetLocations (r:1 w:1)
// Storage: ForeignAssets AssetMetadatas (r:1 w:1)
fn update_foreign_asset() -> Weight {
- Weight::from_ref_time(22_669_000 as u64)
+ Weight::from_ref_time(21_973_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
}
pallets/fungible/src/weights.rsdiffbeforeafterboth--- a/pallets/fungible/src/weights.rs
+++ b/pallets/fungible/src/weights.rs
@@ -3,7 +3,7 @@
//! Autogenerated weights for pallet_fungible
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
-//! DATE: 2023-01-29, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! DATE: 2023-02-15, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
@@ -50,16 +50,16 @@
// Storage: Fungible TotalSupply (r:1 w:1)
// Storage: Fungible Balance (r:1 w:1)
fn create_item() -> Weight {
- Weight::from_ref_time(20_606_000 as u64)
+ Weight::from_ref_time(19_423_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Fungible TotalSupply (r:1 w:1)
// Storage: Fungible Balance (r:4 w:4)
fn create_multiple_items_ex(b: u32, ) -> Weight {
- Weight::from_ref_time(21_771_237 as u64)
- // Standard Error: 10_207
- .saturating_add(Weight::from_ref_time(3_627_533 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(23_426_461 as u64)
+ // Standard Error: 1_942
+ .saturating_add(Weight::from_ref_time(3_459_389 as u64).saturating_mul(b as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(b as u64)))
.saturating_add(T::DbWeight::get().writes(1 as u64))
@@ -68,34 +68,34 @@
// Storage: Fungible TotalSupply (r:1 w:1)
// Storage: Fungible Balance (r:1 w:1)
fn burn_item() -> Weight {
- Weight::from_ref_time(22_468_000 as u64)
+ Weight::from_ref_time(22_600_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Fungible Balance (r:2 w:2)
fn transfer() -> Weight {
- Weight::from_ref_time(23_377_000 as u64)
+ Weight::from_ref_time(24_015_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Fungible Balance (r:1 w:0)
// Storage: Fungible Allowance (r:0 w:1)
fn approve() -> Weight {
- Weight::from_ref_time(22_704_000 as u64)
+ Weight::from_ref_time(22_478_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Fungible Balance (r:1 w:0)
// Storage: Fungible Allowance (r:0 w:1)
fn approve_from() -> Weight {
- Weight::from_ref_time(22_777_000 as u64)
+ Weight::from_ref_time(22_522_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Fungible Allowance (r:1 w:1)
// Storage: Fungible Balance (r:2 w:2)
fn transfer_from() -> Weight {
- Weight::from_ref_time(32_568_000 as u64)
+ Weight::from_ref_time(32_061_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
@@ -103,7 +103,7 @@
// Storage: Fungible TotalSupply (r:1 w:1)
// Storage: Fungible Balance (r:1 w:1)
fn burn_from() -> Weight {
- Weight::from_ref_time(32_838_000 as u64)
+ Weight::from_ref_time(32_115_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
@@ -114,16 +114,16 @@
// Storage: Fungible TotalSupply (r:1 w:1)
// Storage: Fungible Balance (r:1 w:1)
fn create_item() -> Weight {
- Weight::from_ref_time(20_606_000 as u64)
+ Weight::from_ref_time(19_423_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
}
// Storage: Fungible TotalSupply (r:1 w:1)
// Storage: Fungible Balance (r:4 w:4)
fn create_multiple_items_ex(b: u32, ) -> Weight {
- Weight::from_ref_time(21_771_237 as u64)
- // Standard Error: 10_207
- .saturating_add(Weight::from_ref_time(3_627_533 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(23_426_461 as u64)
+ // Standard Error: 1_942
+ .saturating_add(Weight::from_ref_time(3_459_389 as u64).saturating_mul(b as u64))
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(b as u64)))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
@@ -132,34 +132,34 @@
// Storage: Fungible TotalSupply (r:1 w:1)
// Storage: Fungible Balance (r:1 w:1)
fn burn_item() -> Weight {
- Weight::from_ref_time(22_468_000 as u64)
+ Weight::from_ref_time(22_600_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
}
// Storage: Fungible Balance (r:2 w:2)
fn transfer() -> Weight {
- Weight::from_ref_time(23_377_000 as u64)
+ Weight::from_ref_time(24_015_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
}
// Storage: Fungible Balance (r:1 w:0)
// Storage: Fungible Allowance (r:0 w:1)
fn approve() -> Weight {
- Weight::from_ref_time(22_704_000 as u64)
+ Weight::from_ref_time(22_478_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Fungible Balance (r:1 w:0)
// Storage: Fungible Allowance (r:0 w:1)
fn approve_from() -> Weight {
- Weight::from_ref_time(22_777_000 as u64)
+ Weight::from_ref_time(22_522_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Fungible Allowance (r:1 w:1)
// Storage: Fungible Balance (r:2 w:2)
fn transfer_from() -> Weight {
- Weight::from_ref_time(32_568_000 as u64)
+ Weight::from_ref_time(32_061_000 as u64)
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
}
@@ -167,7 +167,7 @@
// Storage: Fungible TotalSupply (r:1 w:1)
// Storage: Fungible Balance (r:1 w:1)
fn burn_from() -> Weight {
- Weight::from_ref_time(32_838_000 as u64)
+ Weight::from_ref_time(32_115_000 as u64)
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
}
pallets/nonfungible/src/weights.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/weights.rs
+++ b/pallets/nonfungible/src/weights.rs
@@ -3,7 +3,7 @@
//! Autogenerated weights for pallet_nonfungible
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
-//! DATE: 2023-01-29, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! DATE: 2023-02-15, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
@@ -64,7 +64,7 @@
// Storage: Nonfungible TokenData (r:0 w:1)
// Storage: Nonfungible Owned (r:0 w:1)
fn create_item() -> Weight {
- Weight::from_ref_time(34_313_000 as u64)
+ Weight::from_ref_time(35_333_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
}
@@ -75,9 +75,9 @@
// Storage: Nonfungible TokenData (r:0 w:4)
// Storage: Nonfungible Owned (r:0 w:4)
fn create_multiple_items(b: u32, ) -> Weight {
- Weight::from_ref_time(19_201_665 as u64)
- // Standard Error: 4_780
- .saturating_add(Weight::from_ref_time(7_373_591 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(19_091_371 as u64)
+ // Standard Error: 3_221
+ .saturating_add(Weight::from_ref_time(7_304_849 as u64).saturating_mul(b as u64))
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(b as u64)))
.saturating_add(T::DbWeight::get().writes(2 as u64))
@@ -90,9 +90,9 @@
// Storage: Nonfungible TokenData (r:0 w:4)
// Storage: Nonfungible Owned (r:0 w:4)
fn create_multiple_items_ex(b: u32, ) -> Weight {
- Weight::from_ref_time(13_021_971 as u64)
- // Standard Error: 5_117
- .saturating_add(Weight::from_ref_time(9_163_935 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(12_655_339 as u64)
+ // Standard Error: 3_655
+ .saturating_add(Weight::from_ref_time(9_051_919 as u64).saturating_mul(b as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(b as u64)))
.saturating_add(T::DbWeight::get().writes(1 as u64))
@@ -106,7 +106,7 @@
// Storage: Nonfungible Owned (r:0 w:1)
// Storage: Nonfungible TokenProperties (r:0 w:1)
fn burn_item() -> Weight {
- Weight::from_ref_time(35_727_000 as u64)
+ Weight::from_ref_time(34_068_000 as u64)
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
}
@@ -118,7 +118,7 @@
// Storage: Nonfungible Owned (r:0 w:1)
// Storage: Nonfungible TokenProperties (r:0 w:1)
fn burn_recursively_self_raw() -> Weight {
- Weight::from_ref_time(44_618_000 as u64)
+ Weight::from_ref_time(44_840_000 as u64)
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
}
@@ -131,9 +131,9 @@
// Storage: Nonfungible TokenProperties (r:0 w:1)
// Storage: Common CollectionById (r:1 w:0)
fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight {
- Weight::from_ref_time(45_095_000 as u64)
- // Standard Error: 1_034_807
- .saturating_add(Weight::from_ref_time(215_008_105 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(44_567_000 as u64)
+ // Standard Error: 1_014_743
+ .saturating_add(Weight::from_ref_time(209_619_240 as u64).saturating_mul(b as u64))
.saturating_add(T::DbWeight::get().reads(7 as u64))
.saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(b as u64)))
.saturating_add(T::DbWeight::get().writes(6 as u64))
@@ -144,21 +144,21 @@
// Storage: Nonfungible Allowance (r:1 w:0)
// Storage: Nonfungible Owned (r:0 w:2)
fn transfer() -> Weight {
- Weight::from_ref_time(29_636_000 as u64)
+ Weight::from_ref_time(29_508_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
}
// Storage: Nonfungible TokenData (r:1 w:0)
// Storage: Nonfungible Allowance (r:1 w:1)
fn approve() -> Weight {
- Weight::from_ref_time(22_440_000 as u64)
+ Weight::from_ref_time(22_168_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Nonfungible TokenData (r:1 w:0)
// Storage: Nonfungible Allowance (r:1 w:1)
fn approve_from() -> Weight {
- Weight::from_ref_time(22_519_000 as u64)
+ Weight::from_ref_time(22_063_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
@@ -167,7 +167,7 @@
// Storage: Nonfungible AccountBalance (r:2 w:2)
// Storage: Nonfungible Owned (r:0 w:2)
fn transfer_from() -> Weight {
- Weight::from_ref_time(36_354_000 as u64)
+ Weight::from_ref_time(36_386_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(6 as u64))
}
@@ -179,54 +179,54 @@
// Storage: Nonfungible Owned (r:0 w:1)
// Storage: Nonfungible TokenProperties (r:0 w:1)
fn burn_from() -> Weight {
- Weight::from_ref_time(42_533_000 as u64)
+ Weight::from_ref_time(42_499_000 as u64)
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(6 as u64))
}
// Storage: Common CollectionPropertyPermissions (r:1 w:1)
fn set_token_property_permissions(b: u32, ) -> Weight {
- Weight::from_ref_time(5_189_000 as u64)
- // Standard Error: 45_637
- .saturating_add(Weight::from_ref_time(12_760_623 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(5_317_000 as u64)
+ // Standard Error: 42_045
+ .saturating_add(Weight::from_ref_time(12_179_871 as u64).saturating_mul(b as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Nonfungible TokenProperties (r:1 w:1)
// Storage: Common CollectionPropertyPermissions (r:1 w:0)
fn set_token_properties(b: u32, ) -> Weight {
- Weight::from_ref_time(22_023_308 as u64)
- // Standard Error: 10_490
- .saturating_add(Weight::from_ref_time(6_199_746 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(15_428_000 as u64)
+ // Standard Error: 58_002
+ .saturating_add(Weight::from_ref_time(7_195_842 as u64).saturating_mul(b as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Nonfungible TokenProperties (r:1 w:1)
// Storage: Common CollectionPropertyPermissions (r:1 w:0)
fn delete_token_properties(b: u32, ) -> Weight {
- Weight::from_ref_time(15_064_000 as u64)
- // Standard Error: 70_297
- .saturating_add(Weight::from_ref_time(22_826_857 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(15_498_000 as u64)
+ // Standard Error: 68_276
+ .saturating_add(Weight::from_ref_time(22_441_281 as u64).saturating_mul(b as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Nonfungible TokenData (r:1 w:0)
fn token_owner() -> Weight {
- Weight::from_ref_time(6_837_000 as u64)
+ Weight::from_ref_time(7_006_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
}
// Storage: Nonfungible CollectionAllowance (r:0 w:1)
fn set_allowance_for_all() -> Weight {
- Weight::from_ref_time(16_618_000 as u64)
+ Weight::from_ref_time(16_761_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Nonfungible CollectionAllowance (r:1 w:0)
fn allowance_for_all() -> Weight {
- Weight::from_ref_time(5_430_000 as u64)
+ Weight::from_ref_time(5_577_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
}
// Storage: Nonfungible TokenProperties (r:1 w:1)
fn repair_item() -> Weight {
- Weight::from_ref_time(7_776_000 as u64)
+ Weight::from_ref_time(7_670_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
@@ -241,7 +241,7 @@
// Storage: Nonfungible TokenData (r:0 w:1)
// Storage: Nonfungible Owned (r:0 w:1)
fn create_item() -> Weight {
- Weight::from_ref_time(34_313_000 as u64)
+ Weight::from_ref_time(35_333_000 as u64)
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(5 as u64))
}
@@ -252,9 +252,9 @@
// Storage: Nonfungible TokenData (r:0 w:4)
// Storage: Nonfungible Owned (r:0 w:4)
fn create_multiple_items(b: u32, ) -> Weight {
- Weight::from_ref_time(19_201_665 as u64)
- // Standard Error: 4_780
- .saturating_add(Weight::from_ref_time(7_373_591 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(19_091_371 as u64)
+ // Standard Error: 3_221
+ .saturating_add(Weight::from_ref_time(7_304_849 as u64).saturating_mul(b as u64))
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(b as u64)))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
@@ -267,9 +267,9 @@
// Storage: Nonfungible TokenData (r:0 w:4)
// Storage: Nonfungible Owned (r:0 w:4)
fn create_multiple_items_ex(b: u32, ) -> Weight {
- Weight::from_ref_time(13_021_971 as u64)
- // Standard Error: 5_117
- .saturating_add(Weight::from_ref_time(9_163_935 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(12_655_339 as u64)
+ // Standard Error: 3_655
+ .saturating_add(Weight::from_ref_time(9_051_919 as u64).saturating_mul(b as u64))
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().reads((2 as u64).saturating_mul(b as u64)))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
@@ -283,7 +283,7 @@
// Storage: Nonfungible Owned (r:0 w:1)
// Storage: Nonfungible TokenProperties (r:0 w:1)
fn burn_item() -> Weight {
- Weight::from_ref_time(35_727_000 as u64)
+ Weight::from_ref_time(34_068_000 as u64)
.saturating_add(RocksDbWeight::get().reads(5 as u64))
.saturating_add(RocksDbWeight::get().writes(5 as u64))
}
@@ -295,7 +295,7 @@
// Storage: Nonfungible Owned (r:0 w:1)
// Storage: Nonfungible TokenProperties (r:0 w:1)
fn burn_recursively_self_raw() -> Weight {
- Weight::from_ref_time(44_618_000 as u64)
+ Weight::from_ref_time(44_840_000 as u64)
.saturating_add(RocksDbWeight::get().reads(5 as u64))
.saturating_add(RocksDbWeight::get().writes(5 as u64))
}
@@ -308,9 +308,9 @@
// Storage: Nonfungible TokenProperties (r:0 w:1)
// Storage: Common CollectionById (r:1 w:0)
fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight {
- Weight::from_ref_time(45_095_000 as u64)
- // Standard Error: 1_034_807
- .saturating_add(Weight::from_ref_time(215_008_105 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(44_567_000 as u64)
+ // Standard Error: 1_014_743
+ .saturating_add(Weight::from_ref_time(209_619_240 as u64).saturating_mul(b as u64))
.saturating_add(RocksDbWeight::get().reads(7 as u64))
.saturating_add(RocksDbWeight::get().reads((4 as u64).saturating_mul(b as u64)))
.saturating_add(RocksDbWeight::get().writes(6 as u64))
@@ -321,21 +321,21 @@
// Storage: Nonfungible Allowance (r:1 w:0)
// Storage: Nonfungible Owned (r:0 w:2)
fn transfer() -> Weight {
- Weight::from_ref_time(29_636_000 as u64)
+ Weight::from_ref_time(29_508_000 as u64)
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(5 as u64))
}
// Storage: Nonfungible TokenData (r:1 w:0)
// Storage: Nonfungible Allowance (r:1 w:1)
fn approve() -> Weight {
- Weight::from_ref_time(22_440_000 as u64)
+ Weight::from_ref_time(22_168_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Nonfungible TokenData (r:1 w:0)
// Storage: Nonfungible Allowance (r:1 w:1)
fn approve_from() -> Weight {
- Weight::from_ref_time(22_519_000 as u64)
+ Weight::from_ref_time(22_063_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
@@ -344,7 +344,7 @@
// Storage: Nonfungible AccountBalance (r:2 w:2)
// Storage: Nonfungible Owned (r:0 w:2)
fn transfer_from() -> Weight {
- Weight::from_ref_time(36_354_000 as u64)
+ Weight::from_ref_time(36_386_000 as u64)
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(6 as u64))
}
@@ -356,54 +356,54 @@
// Storage: Nonfungible Owned (r:0 w:1)
// Storage: Nonfungible TokenProperties (r:0 w:1)
fn burn_from() -> Weight {
- Weight::from_ref_time(42_533_000 as u64)
+ Weight::from_ref_time(42_499_000 as u64)
.saturating_add(RocksDbWeight::get().reads(5 as u64))
.saturating_add(RocksDbWeight::get().writes(6 as u64))
}
// Storage: Common CollectionPropertyPermissions (r:1 w:1)
fn set_token_property_permissions(b: u32, ) -> Weight {
- Weight::from_ref_time(5_189_000 as u64)
- // Standard Error: 45_637
- .saturating_add(Weight::from_ref_time(12_760_623 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(5_317_000 as u64)
+ // Standard Error: 42_045
+ .saturating_add(Weight::from_ref_time(12_179_871 as u64).saturating_mul(b as u64))
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Nonfungible TokenProperties (r:1 w:1)
// Storage: Common CollectionPropertyPermissions (r:1 w:0)
fn set_token_properties(b: u32, ) -> Weight {
- Weight::from_ref_time(22_023_308 as u64)
- // Standard Error: 10_490
- .saturating_add(Weight::from_ref_time(6_199_746 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(15_428_000 as u64)
+ // Standard Error: 58_002
+ .saturating_add(Weight::from_ref_time(7_195_842 as u64).saturating_mul(b as u64))
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Nonfungible TokenProperties (r:1 w:1)
// Storage: Common CollectionPropertyPermissions (r:1 w:0)
fn delete_token_properties(b: u32, ) -> Weight {
- Weight::from_ref_time(15_064_000 as u64)
- // Standard Error: 70_297
- .saturating_add(Weight::from_ref_time(22_826_857 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(15_498_000 as u64)
+ // Standard Error: 68_276
+ .saturating_add(Weight::from_ref_time(22_441_281 as u64).saturating_mul(b as u64))
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Nonfungible TokenData (r:1 w:0)
fn token_owner() -> Weight {
- Weight::from_ref_time(6_837_000 as u64)
+ Weight::from_ref_time(7_006_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
}
// Storage: Nonfungible CollectionAllowance (r:0 w:1)
fn set_allowance_for_all() -> Weight {
- Weight::from_ref_time(16_618_000 as u64)
+ Weight::from_ref_time(16_761_000 as u64)
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Nonfungible CollectionAllowance (r:1 w:0)
fn allowance_for_all() -> Weight {
- Weight::from_ref_time(5_430_000 as u64)
+ Weight::from_ref_time(5_577_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
}
// Storage: Nonfungible TokenProperties (r:1 w:1)
fn repair_item() -> Weight {
- Weight::from_ref_time(7_776_000 as u64)
+ Weight::from_ref_time(7_670_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
pallets/refungible/src/weights.rsdiffbeforeafterboth--- a/pallets/refungible/src/weights.rs
+++ b/pallets/refungible/src/weights.rs
@@ -3,7 +3,7 @@
//! Autogenerated weights for pallet_refungible
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
-//! DATE: 2023-01-29, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! DATE: 2023-02-15, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
@@ -72,7 +72,7 @@
// Storage: Refungible TotalSupply (r:0 w:1)
// Storage: Refungible Owned (r:0 w:1)
fn create_item() -> Weight {
- Weight::from_ref_time(39_775_000 as u64)
+ Weight::from_ref_time(39_971_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(6 as u64))
}
@@ -84,9 +84,9 @@
// Storage: Refungible TotalSupply (r:0 w:4)
// Storage: Refungible Owned (r:0 w:4)
fn create_multiple_items(b: u32, ) -> Weight {
- Weight::from_ref_time(19_486_095 as u64)
- // Standard Error: 8_015
- .saturating_add(Weight::from_ref_time(9_037_181 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(14_049_866 as u64)
+ // Standard Error: 4_015
+ .saturating_add(Weight::from_ref_time(8_984_911 as u64).saturating_mul(b as u64))
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(b as u64)))
.saturating_add(T::DbWeight::get().writes(2 as u64))
@@ -100,9 +100,9 @@
// Storage: Refungible TotalSupply (r:0 w:4)
// Storage: Refungible Owned (r:0 w:4)
fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {
- Weight::from_ref_time(14_091_538 as u64)
- // Standard Error: 6_448
- .saturating_add(Weight::from_ref_time(10_777_780 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(14_893_679 as u64)
+ // Standard Error: 3_571
+ .saturating_add(Weight::from_ref_time(10_611_135 as u64).saturating_mul(b as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(b as u64)))
.saturating_add(T::DbWeight::get().writes(1 as u64))
@@ -116,9 +116,9 @@
// Storage: Refungible Balance (r:0 w:4)
// Storage: Refungible Owned (r:0 w:4)
fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {
- Weight::from_ref_time(30_958_687 as u64)
- // Standard Error: 3_000
- .saturating_add(Weight::from_ref_time(5_976_114 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(31_075_923 as u64)
+ // Standard Error: 2_118
+ .saturating_add(Weight::from_ref_time(5_829_866 as u64).saturating_mul(b as u64))
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(b as u64)))
.saturating_add(T::DbWeight::get().writes(3 as u64))
@@ -129,7 +129,7 @@
// Storage: Refungible AccountBalance (r:1 w:1)
// Storage: Refungible Owned (r:0 w:1)
fn burn_item_partial() -> Weight {
- Weight::from_ref_time(46_498_000 as u64)
+ Weight::from_ref_time(47_369_000 as u64)
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
}
@@ -140,14 +140,14 @@
// Storage: Refungible Owned (r:0 w:1)
// Storage: Refungible TokenProperties (r:0 w:1)
fn burn_item_fully() -> Weight {
- Weight::from_ref_time(42_429_000 as u64)
+ Weight::from_ref_time(41_351_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(6 as u64))
}
// Storage: Refungible Balance (r:2 w:2)
// Storage: Refungible TotalSupply (r:1 w:0)
fn transfer_normal() -> Weight {
- Weight::from_ref_time(31_435_000 as u64)
+ Weight::from_ref_time(31_379_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
@@ -156,7 +156,7 @@
// Storage: Refungible TotalSupply (r:1 w:0)
// Storage: Refungible Owned (r:0 w:1)
fn transfer_creating() -> Weight {
- Weight::from_ref_time(34_913_000 as u64)
+ Weight::from_ref_time(34_829_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
}
@@ -165,7 +165,7 @@
// Storage: Refungible TotalSupply (r:1 w:0)
// Storage: Refungible Owned (r:0 w:1)
fn transfer_removing() -> Weight {
- Weight::from_ref_time(37_992_000 as u64)
+ Weight::from_ref_time(38_221_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
}
@@ -174,21 +174,21 @@
// Storage: Refungible TotalSupply (r:1 w:0)
// Storage: Refungible Owned (r:0 w:2)
fn transfer_creating_removing() -> Weight {
- Weight::from_ref_time(37_935_000 as u64)
+ Weight::from_ref_time(38_102_000 as u64)
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(6 as u64))
}
// Storage: Refungible Balance (r:1 w:0)
// Storage: Refungible Allowance (r:0 w:1)
fn approve() -> Weight {
- Weight::from_ref_time(23_900_000 as u64)
+ Weight::from_ref_time(24_217_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Refungible Balance (r:1 w:0)
// Storage: Refungible Allowance (r:0 w:1)
fn approve_from() -> Weight {
- Weight::from_ref_time(24_012_000 as u64)
+ Weight::from_ref_time(24_173_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
@@ -196,7 +196,7 @@
// Storage: Refungible Balance (r:2 w:2)
// Storage: Refungible TotalSupply (r:1 w:0)
fn transfer_from_normal() -> Weight {
- Weight::from_ref_time(40_384_000 as u64)
+ Weight::from_ref_time(40_040_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
@@ -206,7 +206,7 @@
// Storage: Refungible TotalSupply (r:1 w:0)
// Storage: Refungible Owned (r:0 w:1)
fn transfer_from_creating() -> Weight {
- Weight::from_ref_time(43_372_000 as u64)
+ Weight::from_ref_time(42_906_000 as u64)
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
}
@@ -216,7 +216,7 @@
// Storage: Refungible TotalSupply (r:1 w:0)
// Storage: Refungible Owned (r:0 w:1)
fn transfer_from_removing() -> Weight {
- Weight::from_ref_time(46_470_000 as u64)
+ Weight::from_ref_time(46_112_000 as u64)
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
}
@@ -226,7 +226,7 @@
// Storage: Refungible TotalSupply (r:1 w:0)
// Storage: Refungible Owned (r:0 w:2)
fn transfer_from_creating_removing() -> Weight {
- Weight::from_ref_time(46_394_000 as u64)
+ Weight::from_ref_time(45_102_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(7 as u64))
}
@@ -238,61 +238,61 @@
// Storage: Refungible Owned (r:0 w:1)
// Storage: Refungible TokenProperties (r:0 w:1)
fn burn_from() -> Weight {
- Weight::from_ref_time(51_957_000 as u64)
+ Weight::from_ref_time(50_573_000 as u64)
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(7 as u64))
}
// Storage: Common CollectionPropertyPermissions (r:1 w:1)
fn set_token_property_permissions(b: u32, ) -> Weight {
- Weight::from_ref_time(5_257_000 as u64)
- // Standard Error: 47_229
- .saturating_add(Weight::from_ref_time(12_976_974 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(5_349_000 as u64)
+ // Standard Error: 41_409
+ .saturating_add(Weight::from_ref_time(12_216_721 as u64).saturating_mul(b as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Refungible TokenProperties (r:1 w:1)
// Storage: Common CollectionPropertyPermissions (r:1 w:0)
fn set_token_properties(b: u32, ) -> Weight {
- Weight::from_ref_time(13_103_140 as u64)
- // Standard Error: 62_508
- .saturating_add(Weight::from_ref_time(6_883_577 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(12_947_117 as u64)
+ // Standard Error: 75_487
+ .saturating_add(Weight::from_ref_time(6_809_149 as u64).saturating_mul(b as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Refungible TokenProperties (r:1 w:1)
// Storage: Common CollectionPropertyPermissions (r:1 w:0)
fn delete_token_properties(b: u32, ) -> Weight {
- Weight::from_ref_time(15_068_000 as u64)
- // Standard Error: 70_494
- .saturating_add(Weight::from_ref_time(22_758_838 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(14_967_000 as u64)
+ // Standard Error: 66_400
+ .saturating_add(Weight::from_ref_time(22_261_821 as u64).saturating_mul(b as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Refungible TotalSupply (r:1 w:1)
// Storage: Refungible Balance (r:1 w:1)
fn repartition_item() -> Weight {
- Weight::from_ref_time(24_640_000 as u64)
+ Weight::from_ref_time(25_823_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Refungible Balance (r:2 w:0)
fn token_owner() -> Weight {
- Weight::from_ref_time(9_634_000 as u64)
+ Weight::from_ref_time(9_445_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
}
// Storage: Refungible CollectionAllowance (r:0 w:1)
fn set_allowance_for_all() -> Weight {
- Weight::from_ref_time(17_366_000 as u64)
+ Weight::from_ref_time(17_303_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Refungible CollectionAllowance (r:1 w:0)
fn allowance_for_all() -> Weight {
- Weight::from_ref_time(5_419_000 as u64)
+ Weight::from_ref_time(5_352_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
}
// Storage: Refungible TokenProperties (r:1 w:1)
fn repair_item() -> Weight {
- Weight::from_ref_time(7_196_000 as u64)
+ Weight::from_ref_time(7_200_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
@@ -308,7 +308,7 @@
// Storage: Refungible TotalSupply (r:0 w:1)
// Storage: Refungible Owned (r:0 w:1)
fn create_item() -> Weight {
- Weight::from_ref_time(39_775_000 as u64)
+ Weight::from_ref_time(39_971_000 as u64)
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(6 as u64))
}
@@ -320,9 +320,9 @@
// Storage: Refungible TotalSupply (r:0 w:4)
// Storage: Refungible Owned (r:0 w:4)
fn create_multiple_items(b: u32, ) -> Weight {
- Weight::from_ref_time(19_486_095 as u64)
- // Standard Error: 8_015
- .saturating_add(Weight::from_ref_time(9_037_181 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(14_049_866 as u64)
+ // Standard Error: 4_015
+ .saturating_add(Weight::from_ref_time(8_984_911 as u64).saturating_mul(b as u64))
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(b as u64)))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
@@ -336,9 +336,9 @@
// Storage: Refungible TotalSupply (r:0 w:4)
// Storage: Refungible Owned (r:0 w:4)
fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {
- Weight::from_ref_time(14_091_538 as u64)
- // Standard Error: 6_448
- .saturating_add(Weight::from_ref_time(10_777_780 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(14_893_679 as u64)
+ // Standard Error: 3_571
+ .saturating_add(Weight::from_ref_time(10_611_135 as u64).saturating_mul(b as u64))
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().reads((2 as u64).saturating_mul(b as u64)))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
@@ -352,9 +352,9 @@
// Storage: Refungible Balance (r:0 w:4)
// Storage: Refungible Owned (r:0 w:4)
fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {
- Weight::from_ref_time(30_958_687 as u64)
- // Standard Error: 3_000
- .saturating_add(Weight::from_ref_time(5_976_114 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(31_075_923 as u64)
+ // Standard Error: 2_118
+ .saturating_add(Weight::from_ref_time(5_829_866 as u64).saturating_mul(b as u64))
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(b as u64)))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
@@ -365,7 +365,7 @@
// Storage: Refungible AccountBalance (r:1 w:1)
// Storage: Refungible Owned (r:0 w:1)
fn burn_item_partial() -> Weight {
- Weight::from_ref_time(46_498_000 as u64)
+ Weight::from_ref_time(47_369_000 as u64)
.saturating_add(RocksDbWeight::get().reads(5 as u64))
.saturating_add(RocksDbWeight::get().writes(4 as u64))
}
@@ -376,14 +376,14 @@
// Storage: Refungible Owned (r:0 w:1)
// Storage: Refungible TokenProperties (r:0 w:1)
fn burn_item_fully() -> Weight {
- Weight::from_ref_time(42_429_000 as u64)
+ Weight::from_ref_time(41_351_000 as u64)
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(6 as u64))
}
// Storage: Refungible Balance (r:2 w:2)
// Storage: Refungible TotalSupply (r:1 w:0)
fn transfer_normal() -> Weight {
- Weight::from_ref_time(31_435_000 as u64)
+ Weight::from_ref_time(31_379_000 as u64)
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
}
@@ -392,7 +392,7 @@
// Storage: Refungible TotalSupply (r:1 w:0)
// Storage: Refungible Owned (r:0 w:1)
fn transfer_creating() -> Weight {
- Weight::from_ref_time(34_913_000 as u64)
+ Weight::from_ref_time(34_829_000 as u64)
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(4 as u64))
}
@@ -401,7 +401,7 @@
// Storage: Refungible TotalSupply (r:1 w:0)
// Storage: Refungible Owned (r:0 w:1)
fn transfer_removing() -> Weight {
- Weight::from_ref_time(37_992_000 as u64)
+ Weight::from_ref_time(38_221_000 as u64)
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(4 as u64))
}
@@ -410,21 +410,21 @@
// Storage: Refungible TotalSupply (r:1 w:0)
// Storage: Refungible Owned (r:0 w:2)
fn transfer_creating_removing() -> Weight {
- Weight::from_ref_time(37_935_000 as u64)
+ Weight::from_ref_time(38_102_000 as u64)
.saturating_add(RocksDbWeight::get().reads(5 as u64))
.saturating_add(RocksDbWeight::get().writes(6 as u64))
}
// Storage: Refungible Balance (r:1 w:0)
// Storage: Refungible Allowance (r:0 w:1)
fn approve() -> Weight {
- Weight::from_ref_time(23_900_000 as u64)
+ Weight::from_ref_time(24_217_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Refungible Balance (r:1 w:0)
// Storage: Refungible Allowance (r:0 w:1)
fn approve_from() -> Weight {
- Weight::from_ref_time(24_012_000 as u64)
+ Weight::from_ref_time(24_173_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
@@ -432,7 +432,7 @@
// Storage: Refungible Balance (r:2 w:2)
// Storage: Refungible TotalSupply (r:1 w:0)
fn transfer_from_normal() -> Weight {
- Weight::from_ref_time(40_384_000 as u64)
+ Weight::from_ref_time(40_040_000 as u64)
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
}
@@ -442,7 +442,7 @@
// Storage: Refungible TotalSupply (r:1 w:0)
// Storage: Refungible Owned (r:0 w:1)
fn transfer_from_creating() -> Weight {
- Weight::from_ref_time(43_372_000 as u64)
+ Weight::from_ref_time(42_906_000 as u64)
.saturating_add(RocksDbWeight::get().reads(5 as u64))
.saturating_add(RocksDbWeight::get().writes(5 as u64))
}
@@ -452,7 +452,7 @@
// Storage: Refungible TotalSupply (r:1 w:0)
// Storage: Refungible Owned (r:0 w:1)
fn transfer_from_removing() -> Weight {
- Weight::from_ref_time(46_470_000 as u64)
+ Weight::from_ref_time(46_112_000 as u64)
.saturating_add(RocksDbWeight::get().reads(5 as u64))
.saturating_add(RocksDbWeight::get().writes(5 as u64))
}
@@ -462,7 +462,7 @@
// Storage: Refungible TotalSupply (r:1 w:0)
// Storage: Refungible Owned (r:0 w:2)
fn transfer_from_creating_removing() -> Weight {
- Weight::from_ref_time(46_394_000 as u64)
+ Weight::from_ref_time(45_102_000 as u64)
.saturating_add(RocksDbWeight::get().reads(6 as u64))
.saturating_add(RocksDbWeight::get().writes(7 as u64))
}
@@ -474,61 +474,61 @@
// Storage: Refungible Owned (r:0 w:1)
// Storage: Refungible TokenProperties (r:0 w:1)
fn burn_from() -> Weight {
- Weight::from_ref_time(51_957_000 as u64)
+ Weight::from_ref_time(50_573_000 as u64)
.saturating_add(RocksDbWeight::get().reads(5 as u64))
.saturating_add(RocksDbWeight::get().writes(7 as u64))
}
// Storage: Common CollectionPropertyPermissions (r:1 w:1)
fn set_token_property_permissions(b: u32, ) -> Weight {
- Weight::from_ref_time(5_257_000 as u64)
- // Standard Error: 47_229
- .saturating_add(Weight::from_ref_time(12_976_974 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(5_349_000 as u64)
+ // Standard Error: 41_409
+ .saturating_add(Weight::from_ref_time(12_216_721 as u64).saturating_mul(b as u64))
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Refungible TokenProperties (r:1 w:1)
// Storage: Common CollectionPropertyPermissions (r:1 w:0)
fn set_token_properties(b: u32, ) -> Weight {
- Weight::from_ref_time(13_103_140 as u64)
- // Standard Error: 62_508
- .saturating_add(Weight::from_ref_time(6_883_577 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(12_947_117 as u64)
+ // Standard Error: 75_487
+ .saturating_add(Weight::from_ref_time(6_809_149 as u64).saturating_mul(b as u64))
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Refungible TokenProperties (r:1 w:1)
// Storage: Common CollectionPropertyPermissions (r:1 w:0)
fn delete_token_properties(b: u32, ) -> Weight {
- Weight::from_ref_time(15_068_000 as u64)
- // Standard Error: 70_494
- .saturating_add(Weight::from_ref_time(22_758_838 as u64).saturating_mul(b as u64))
+ Weight::from_ref_time(14_967_000 as u64)
+ // Standard Error: 66_400
+ .saturating_add(Weight::from_ref_time(22_261_821 as u64).saturating_mul(b as u64))
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Refungible TotalSupply (r:1 w:1)
// Storage: Refungible Balance (r:1 w:1)
fn repartition_item() -> Weight {
- Weight::from_ref_time(24_640_000 as u64)
+ Weight::from_ref_time(25_823_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
}
// Storage: Refungible Balance (r:2 w:0)
fn token_owner() -> Weight {
- Weight::from_ref_time(9_634_000 as u64)
+ Weight::from_ref_time(9_445_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
}
// Storage: Refungible CollectionAllowance (r:0 w:1)
fn set_allowance_for_all() -> Weight {
- Weight::from_ref_time(17_366_000 as u64)
+ Weight::from_ref_time(17_303_000 as u64)
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Refungible CollectionAllowance (r:1 w:0)
fn allowance_for_all() -> Weight {
- Weight::from_ref_time(5_419_000 as u64)
+ Weight::from_ref_time(5_352_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
}
// Storage: Refungible TokenProperties (r:1 w:1)
fn repair_item() -> Weight {
- Weight::from_ref_time(7_196_000 as u64)
+ Weight::from_ref_time(7_200_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
pallets/structure/src/weights.rsdiffbeforeafterboth--- a/pallets/structure/src/weights.rs
+++ b/pallets/structure/src/weights.rs
@@ -3,7 +3,7 @@
//! Autogenerated weights for pallet_structure
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
-//! DATE: 2023-01-29, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! DATE: 2023-02-15, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
@@ -43,7 +43,7 @@
// Storage: Common CollectionById (r:1 w:0)
// Storage: Nonfungible TokenData (r:1 w:0)
fn find_parent() -> Weight {
- Weight::from_ref_time(11_766_000 as u64)
+ Weight::from_ref_time(11_663_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
}
}
@@ -53,7 +53,7 @@
// Storage: Common CollectionById (r:1 w:0)
// Storage: Nonfungible TokenData (r:1 w:0)
fn find_parent() -> Weight {
- Weight::from_ref_time(11_766_000 as u64)
+ Weight::from_ref_time(11_663_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
}
}
pallets/unique/src/weights.rsdiffbeforeafterboth--- a/pallets/unique/src/weights.rs
+++ b/pallets/unique/src/weights.rs
@@ -3,7 +3,7 @@
//! Autogenerated weights for pallet_unique
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
-//! DATE: 2023-01-29, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! DATE: 2023-02-15, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
@@ -59,7 +59,7 @@
// Storage: Common CollectionProperties (r:0 w:1)
// Storage: Common CollectionById (r:0 w:1)
fn create_collection() -> Weight {
- Weight::from_ref_time(43_527_000 as u64)
+ Weight::from_ref_time(47_681_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(6 as u64))
}
@@ -71,27 +71,27 @@
// Storage: Common AdminAmount (r:0 w:1)
// Storage: Common CollectionProperties (r:0 w:1)
fn destroy_collection() -> Weight {
- Weight::from_ref_time(59_528_000 as u64)
+ Weight::from_ref_time(58_371_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(6 as u64))
}
// Storage: Common CollectionById (r:1 w:0)
// Storage: Common Allowlist (r:0 w:1)
fn add_to_allow_list() -> Weight {
- Weight::from_ref_time(27_970_000 as u64)
+ Weight::from_ref_time(28_197_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Common CollectionById (r:1 w:0)
// Storage: Common Allowlist (r:0 w:1)
fn remove_from_allow_list() -> Weight {
- Weight::from_ref_time(27_736_000 as u64)
+ Weight::from_ref_time(27_782_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Common CollectionById (r:1 w:1)
fn change_collection_owner() -> Weight {
- Weight::from_ref_time(26_991_000 as u64)
+ Weight::from_ref_time(27_100_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
@@ -99,7 +99,7 @@
// Storage: Common IsAdmin (r:1 w:1)
// Storage: Common AdminAmount (r:1 w:1)
fn add_collection_admin() -> Weight {
- Weight::from_ref_time(30_851_000 as u64)
+ Weight::from_ref_time(31_037_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
@@ -107,43 +107,43 @@
// Storage: Common IsAdmin (r:1 w:1)
// Storage: Common AdminAmount (r:1 w:1)
fn remove_collection_admin() -> Weight {
- Weight::from_ref_time(34_432_000 as u64)
+ Weight::from_ref_time(34_543_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Common CollectionById (r:1 w:1)
fn set_collection_sponsor() -> Weight {
- Weight::from_ref_time(26_862_000 as u64)
+ Weight::from_ref_time(27_109_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Common CollectionById (r:1 w:1)
fn confirm_sponsorship() -> Weight {
- Weight::from_ref_time(26_711_000 as u64)
+ Weight::from_ref_time(26_916_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Common CollectionById (r:1 w:1)
fn remove_collection_sponsor() -> Weight {
- Weight::from_ref_time(38_546_000 as u64)
+ Weight::from_ref_time(29_279_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Common CollectionById (r:1 w:1)
fn set_transfers_enabled_flag() -> Weight {
- Weight::from_ref_time(13_251_000 as u64)
+ Weight::from_ref_time(13_064_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Common CollectionById (r:1 w:1)
fn set_collection_limits() -> Weight {
- Weight::from_ref_time(27_754_000 as u64)
+ Weight::from_ref_time(27_442_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Common CollectionProperties (r:1 w:1)
fn force_repair_collection() -> Weight {
- Weight::from_ref_time(10_871_000 as u64)
+ Weight::from_ref_time(10_730_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
@@ -158,7 +158,7 @@
// Storage: Common CollectionProperties (r:0 w:1)
// Storage: Common CollectionById (r:0 w:1)
fn create_collection() -> Weight {
- Weight::from_ref_time(43_527_000 as u64)
+ Weight::from_ref_time(47_681_000 as u64)
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(6 as u64))
}
@@ -170,27 +170,27 @@
// Storage: Common AdminAmount (r:0 w:1)
// Storage: Common CollectionProperties (r:0 w:1)
fn destroy_collection() -> Weight {
- Weight::from_ref_time(59_528_000 as u64)
+ Weight::from_ref_time(58_371_000 as u64)
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(6 as u64))
}
// Storage: Common CollectionById (r:1 w:0)
// Storage: Common Allowlist (r:0 w:1)
fn add_to_allow_list() -> Weight {
- Weight::from_ref_time(27_970_000 as u64)
+ Weight::from_ref_time(28_197_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Common CollectionById (r:1 w:0)
// Storage: Common Allowlist (r:0 w:1)
fn remove_from_allow_list() -> Weight {
- Weight::from_ref_time(27_736_000 as u64)
+ Weight::from_ref_time(27_782_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Common CollectionById (r:1 w:1)
fn change_collection_owner() -> Weight {
- Weight::from_ref_time(26_991_000 as u64)
+ Weight::from_ref_time(27_100_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
@@ -198,7 +198,7 @@
// Storage: Common IsAdmin (r:1 w:1)
// Storage: Common AdminAmount (r:1 w:1)
fn add_collection_admin() -> Weight {
- Weight::from_ref_time(30_851_000 as u64)
+ Weight::from_ref_time(31_037_000 as u64)
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
}
@@ -206,43 +206,43 @@
// Storage: Common IsAdmin (r:1 w:1)
// Storage: Common AdminAmount (r:1 w:1)
fn remove_collection_admin() -> Weight {
- Weight::from_ref_time(34_432_000 as u64)
+ Weight::from_ref_time(34_543_000 as u64)
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
}
// Storage: Common CollectionById (r:1 w:1)
fn set_collection_sponsor() -> Weight {
- Weight::from_ref_time(26_862_000 as u64)
+ Weight::from_ref_time(27_109_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Common CollectionById (r:1 w:1)
fn confirm_sponsorship() -> Weight {
- Weight::from_ref_time(26_711_000 as u64)
+ Weight::from_ref_time(26_916_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Common CollectionById (r:1 w:1)
fn remove_collection_sponsor() -> Weight {
- Weight::from_ref_time(38_546_000 as u64)
+ Weight::from_ref_time(29_279_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Common CollectionById (r:1 w:1)
fn set_transfers_enabled_flag() -> Weight {
- Weight::from_ref_time(13_251_000 as u64)
+ Weight::from_ref_time(13_064_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Common CollectionById (r:1 w:1)
fn set_collection_limits() -> Weight {
- Weight::from_ref_time(27_754_000 as u64)
+ Weight::from_ref_time(27_442_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Common CollectionProperties (r:1 w:1)
fn force_repair_collection() -> Weight {
- Weight::from_ref_time(10_871_000 as u64)
+ Weight::from_ref_time(10_730_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
primitives/common/src/constants.rsdiffbeforeafterboth--- a/primitives/common/src/constants.rs
+++ b/primitives/common/src/constants.rs
@@ -52,10 +52,10 @@
pub const SESSION_LENGTH: BlockNumber = HOURS;
// Targeting 0.1 UNQ per transfer
-pub const WEIGHT_TO_FEE_COEFF: u64 = /*<weight2fee>*/77_233_712_036_439_751/*</weight2fee>*/;
+pub const WEIGHT_TO_FEE_COEFF: u64 = /*<weight2fee>*/77_246_728_691_397_557/*</weight2fee>*/;
// Targeting 0.15 UNQ per transfer via ETH
-pub const MIN_GAS_PRICE: u64 = /*<mingasprice>*/1_016_956_047_159/*</mingasprice>*/;
+pub const MIN_GAS_PRICE: u64 = /*<mingasprice>*/1_017_135_340_028/*</mingasprice>*/;
/// We assume that ~10% of the block weight is consumed by `on_initalize` handlers.
/// This is used to limit the maximal weight of a single extrinsic.
runtime/opal/src/lib.rsdiffbeforeafterboth--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/src/lib.rs
@@ -54,7 +54,7 @@
spec_name: create_runtime_str!(RUNTIME_NAME),
impl_name: create_runtime_str!(RUNTIME_NAME),
authoring_version: 1,
- spec_version: 937052,
+ spec_version: 937053,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 3,
runtime/quartz/src/lib.rsdiffbeforeafterboth--- a/runtime/quartz/src/lib.rs
+++ b/runtime/quartz/src/lib.rs
@@ -57,7 +57,7 @@
spec_name: create_runtime_str!(RUNTIME_NAME),
impl_name: create_runtime_str!(RUNTIME_NAME),
authoring_version: 1,
- spec_version: 937052,
+ spec_version: 937053,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 3,
runtime/unique/Cargo.tomldiffbeforeafterboth--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -175,7 +175,7 @@
'pallet-xcm/try-runtime',
'parachain-info/try-runtime',
]
-unique-runtime = ['foreign-assets']
+unique-runtime = ['foreign-assets', 'refungible']
collator-selection = []
foreign-assets = []
runtime/unique/src/lib.rsdiffbeforeafterboth--- a/runtime/unique/src/lib.rs
+++ b/runtime/unique/src/lib.rs
@@ -54,7 +54,7 @@
spec_name: create_runtime_str!(RUNTIME_NAME),
impl_name: create_runtime_str!(RUNTIME_NAME),
authoring_version: 1,
- spec_version: 937052,
+ spec_version: 937053,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 3,
tests/src/generateEnv.tsdiffbeforeafterboth--- a/tests/src/generateEnv.ts
+++ b/tests/src/generateEnv.ts
@@ -12,6 +12,7 @@
function setVar(env: string, key: string, value: string): string {
return env.replace(new RegExp(`${key}=.+?\n`), `${key}=${value}\n`);
}
+
// Fetch and format version string
async function ff(url: string, regex: RegExp, rep: string): Promise<string> {
const ver = await fetchVersion(url);
@@ -19,6 +20,13 @@
throw new Error(`bad regex for ${url}`);
return ver.replace(regex, rep);
}
+function fixupUnique(version: string): string {
+ if (version === 'release-v930033')
+ return 'release-v930033-fix-gas-price';
+ if (version === 'release-v930034')
+ return 'release-v930034-fix-gas-price';
+ return version;
+}
(async () => {
let env = (await readFile(join(__dirname, '../../.env'))).toString();
@@ -27,24 +35,24 @@
ff('wss://statemint-rpc.polkadot.io/', /^(....)$/, 'release-parachains-v$1').then(v => env = setVar(env, 'STATEMINT_BUILD_BRANCH', v)),
ff('wss://acala-rpc-0.aca-api.network/', /^(.)(..)(.)$/, '$1.$2.$3').then(v => env = setVar(env, 'ACALA_BUILD_BRANCH', v)),
ff('wss://wss.api.moonbeam.network/', /^(....)$/, 'runtime-$1').then(v => env = setVar(env, 'MOONBEAM_BUILD_BRANCH', v)),
- ff('wss://ws.unique.network/', /^(......)$/, 'release-v$1').then(v => env = setVar(env, 'UNIQUE_MAINNET_BRANCH', v)),
+ ff('wss://ws.unique.network/', /^(......)$/, 'release-v$1').then(v => env = setVar(env, 'UNIQUE_MAINNET_BRANCH', fixupUnique(v))),
ff('wss://kusama-rpc.polkadot.io/', /^(.)(..)(.)$/, 'release-v0.$1.$2').then(v => env = setVar(env, 'KUSAMA_MAINNET_BRANCH', v)),
ff('wss://statemine-rpc.polkadot.io/', /^(....)$/, 'release-parachains-v$1').then(v => env = setVar(env, 'STATEMINE_BUILD_BRANCH', v)),
ff('wss://karura-rpc-0.aca-api.network/', /^(.)(..)(.)$/, 'release-karura-$1.$2.$3').then(v => env = setVar(env, 'KARURA_BUILD_BRANCH', v)),
ff('wss://wss.api.moonriver.moonbeam.network/', /^(....)$/, 'runtime-$1').then(v => env = setVar(env, 'MOONRIVER_BUILD_BRANCH', v)),
- ff('wss://ws-quartz.unique.network/', /^(......)$/, 'release-v$1').then(v => env = setVar(env, 'QUARTZ_MAINNET_BRANCH', v)),
+ ff('wss://ws-quartz.unique.network/', /^(......)$/, 'release-v$1').then(v => env = setVar(env, 'QUARTZ_MAINNET_BRANCH', fixupUnique(v))),
- ff('wss://westend-rpc.polkadot.io/', /^(.)(..)(.)$/, 'release-v0.$1.$2').then(v => env = setVar(env, 'UNIQUEWEST_MAINNET_BRANCH', v)),
+ ff('wss://ws-westend.unique.network/', /^(.)(..)(.)$/, 'release-v0.$1.$2').then(v => env = setVar(env, 'UNIQUEWEST_MAINNET_BRANCH', v)),
ff('wss://westmint-rpc.polkadot.io/', /^(....)$/, 'parachains-v$1').then(v => env = setVar(env, 'WESTMINT_BUILD_BRANCH', v)),
- ff('wss://ws-opal.unique.network/', /^(......)$/, 'release-v$1').then(v => env = setVar(env, 'OPAL_MAINNET_BRANCH', v)),
+ ff('wss://ws-opal.unique.network/', /^(......)$/, 'release-v$1').then(v => env = setVar(env, 'OPAL_MAINNET_BRANCH', fixupUnique(v))),
ff('wss://ws-eastend.unique.network/', /^(.)(..)(.)$/, 'release-v0.$1.$2').then(v => env = setVar(env, 'UNIQUEEAST_MAINNET_BRANCH', v)),
- ff('wss://ws-sapphire.unique.network/', /^(......)$/, 'release-v$1').then(v => env = setVar(env, 'SAPPHIRE_MAINNET_BRANCH', v)),
+ ff('wss://ws-sapphire.unique.network/', /^(......)$/, 'release-v$1').then(v => env = setVar(env, 'SAPPHIRE_MAINNET_BRANCH', fixupUnique(v))),
]);
console.log(env);
- process.exit(0);
})().catch(e => {
+ console.error('Fatal');
console.error(e.stack);
process.exit(1);
});
tests/src/pallet-presence.test.tsdiffbeforeafterboth--- a/tests/src/pallet-presence.test.ts
+++ b/tests/src/pallet-presence.test.ts
@@ -85,7 +85,10 @@
);
} else if (chain.eq('UNIQUE')) {
// Insert Unique additional pallets here
- requiredPallets.push(foreignAssets);
+ requiredPallets.push(
+ refungible,
+ foreignAssets,
+ );
}
});
});