Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Companion for #13158 #2121

Merged
merged 9 commits into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion parachains/runtimes/assets/westmint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use sp_api::impl_runtime_apis;
use sp_core::{crypto::KeyTypeId, OpaqueMetadata};
use sp_runtime::{
create_runtime_str, generic, impl_opaque_keys,
traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, ConvertInto},
traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, ConvertInto, Verify},
transaction_validity::{TransactionSource, TransactionValidity},
ApplyExtrinsicResult,
};
Expand Down Expand Up @@ -594,7 +594,10 @@ impl pallet_nfts::Config for Runtime {
type ItemAttributesApprovalsLimit = ConstU32<30>;
type MaxTips = ConstU32<10>;
type MaxDeadlineDuration = NftsMaxDeadlineDuration;
type MaxAttributesPerCall = ConstU32<10>;
type Features = NftsPalletFeatures;
type OffchainSignature = Signature;
type OffchainPublic = <Signature as Verify>::Signer;
type WeightInfo = weights::pallet_nfts::WeightInfo<Runtime>;
#[cfg(feature = "runtime-benchmarks")]
type Helper = ();
Expand Down
31 changes: 31 additions & 0 deletions parachains/runtimes/assets/westmint/src/weights/pallet_nfts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,4 +423,35 @@ impl<T: frame_system::Config> pallet_nfts::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(8))
.saturating_add(T::DbWeight::get().writes(11))
}
/// Storage: Nfts Collection (r:1 w:1)
/// Proof: Nfts Collection (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen)
/// Storage: Nfts CollectionConfigOf (r:1 w:0)
/// Proof: Nfts CollectionConfigOf (max_values: None, max_size: Some(73), added: 2548, mode: MaxEncodedLen)
/// Storage: Nfts Item (r:1 w:1)
/// Proof: Nfts Item (max_values: None, max_size: Some(861), added: 3336, mode: MaxEncodedLen)
/// Storage: Nfts ItemConfigOf (r:1 w:1)
/// Proof: Nfts ItemConfigOf (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen)
/// Storage: System Account (r:1 w:1)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
/// Storage: Nfts Attribute (r:10 w:10)
/// Proof: Nfts Attribute (max_values: None, max_size: Some(446), added: 2921, mode: MaxEncodedLen)
/// Storage: Nfts ItemMetadataOf (r:1 w:1)
/// Proof: Nfts ItemMetadataOf (max_values: None, max_size: Some(140), added: 2615, mode: MaxEncodedLen)
/// Storage: Nfts Account (r:0 w:1)
/// Proof: Nfts Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen)
/// The range of component `n` is `[0, 10]`.
fn mint_pre_signed(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `596`
// Estimated: `16180 + n * (2921 ±0)`
// Minimum execution time: 124_354 nanoseconds.
Weight::from_parts(133_779_491, 16180)
// Standard Error: 38_452
.saturating_add(Weight::from_ref_time(25_110_697).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(6_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
.saturating_add(T::DbWeight::get().writes(6_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
.saturating_add(Weight::from_proof_size(2921).saturating_mul(n.into()))
}
}