From d8ded930a2ef8fd1ea40ecb6d556debd00ce61a7 Mon Sep 17 00:00:00 2001 From: dmoka Date: Fri, 10 May 2024 11:00:33 +0200 Subject: [PATCH] add offset back to have proper nft weights --- runtime/basilisk/src/weights/pallet_nft.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/runtime/basilisk/src/weights/pallet_nft.rs b/runtime/basilisk/src/weights/pallet_nft.rs index f9d20e7699..37c528ee2a 100644 --- a/runtime/basilisk/src/weights/pallet_nft.rs +++ b/runtime/basilisk/src/weights/pallet_nft.rs @@ -54,6 +54,9 @@ use core::marker::PhantomData; /// Weights for `pallet_nft`. pub struct WeightInfo(PhantomData); +const CREATE_COLLECTION_OFFSET: u64 = 400; +const MINT_OFFSET: u64 = 300; + /// Weights for `pallet_nft` using the Basilisk node and recommended hardware. pub struct BasiliskWeight(PhantomData); impl pallet_nft::WeightInfo for BasiliskWeight { @@ -73,6 +76,7 @@ impl pallet_nft::WeightInfo for BasiliskWeight { // Estimated: `4087` // Minimum execution time: 28_516_000 picoseconds. Weight::from_parts(28_938_000, 4087) + .saturating_mul(CREATE_COLLECTION_OFFSET) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -98,6 +102,7 @@ impl pallet_nft::WeightInfo for BasiliskWeight { // Estimated: `4087` // Minimum execution time: 48_444_000 picoseconds. Weight::from_parts(49_056_000, 4087) + .saturating_mul(MINT_OFFSET) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) }