git.delta.rocks / unique-network / refs/commits / 1b80f30d6749

difftreelog

Transaction payment and weights fix

str-mv2020-10-29parent: #e85b652.patch.diff
in: master

4 files changed

addedpallets/nft/src/default_weights.rsdiffbeforeafterboth
--- /dev/null
+++ b/pallets/nft/src/default_weights.rs
@@ -0,0 +1,95 @@
+use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight};
+
+impl crate::WeightInfo for () {
+	fn create_collection() -> Weight {
+		(70_000_000 as Weight)
+			.saturating_add(DbWeight::get().reads(7 as Weight))
+			.saturating_add(DbWeight::get().writes(5 as Weight))
+	}
+	fn destroy_collection() -> Weight {
+		(90_000_000 as Weight)
+			.saturating_add(DbWeight::get().reads(2 as Weight))
+			.saturating_add(DbWeight::get().writes(5 as Weight))
+	}
+	fn add_to_white_list() -> Weight {
+		(30_000_000 as Weight)
+			.saturating_add(DbWeight::get().reads(3 as Weight))
+			.saturating_add(DbWeight::get().writes(1 as Weight))
+    }
+    fn remove_from_white_list() -> Weight {
+		(35_000_000 as Weight)
+			.saturating_add(DbWeight::get().reads(3 as Weight))
+			.saturating_add(DbWeight::get().writes(1 as Weight))
+	}
+	fn set_public_access_mode() -> Weight {
+		(27_000_000 as Weight)
+			.saturating_add(DbWeight::get().reads(1 as Weight))
+			.saturating_add(DbWeight::get().writes(1 as Weight))
+	}
+	fn set_mint_permission() -> Weight {
+		(27_000_000 as Weight)
+			.saturating_add(DbWeight::get().reads(1 as Weight))
+			.saturating_add(DbWeight::get().writes(1 as Weight))
+	}
+	fn change_collection_owner() -> Weight {
+		(27_000_000 as Weight)
+			.saturating_add(DbWeight::get().reads(1 as Weight))
+			.saturating_add(DbWeight::get().writes(1 as Weight))
+	}
+	fn add_collection_admin() -> Weight {
+        (32_000_000 as Weight)
+            .saturating_add(DbWeight::get().reads(3 as Weight))
+            .saturating_add(DbWeight::get().writes(1 as Weight))
+	}
+	fn remove_collection_admin() -> Weight {
+		(50_000_000 as Weight)
+            .saturating_add(DbWeight::get().reads(2 as Weight))
+            .saturating_add(DbWeight::get().writes(1 as Weight))
+    }
+    fn set_collection_sponsor() -> Weight {
+		(32_000_000 as Weight)
+            .saturating_add(DbWeight::get().reads(2 as Weight))
+            .saturating_add(DbWeight::get().writes(1 as Weight))
+    }  
+    fn confirm_sponsorship() -> Weight {
+		(22_000_000 as Weight)
+            .saturating_add(DbWeight::get().reads(1 as Weight))
+            .saturating_add(DbWeight::get().writes(1 as Weight))
+    }  
+    fn remove_collection_sponsor() -> Weight {
+		(24_000_000 as Weight)
+            .saturating_add(DbWeight::get().reads(1 as Weight))
+            .saturating_add(DbWeight::get().writes(1 as Weight))
+    }  
+    fn create_item(s: usize, ) -> Weight {
+        (130_000_000 as Weight)
+            .saturating_add((2135 as Weight).saturating_mul(s as Weight))
+            .saturating_add(DbWeight::get().reads(10 as Weight))
+            .saturating_add(DbWeight::get().writes(8 as Weight))
+    }  
+    fn burn_item() -> Weight {
+		(170_000_000 as Weight)
+            .saturating_add(DbWeight::get().reads(9 as Weight))
+            .saturating_add(DbWeight::get().writes(7 as Weight))
+    }  
+    fn transfer() -> Weight {
+        (125_000_000 as Weight)
+            .saturating_add(DbWeight::get().reads(7 as Weight))
+            .saturating_add(DbWeight::get().writes(7 as Weight))
+    }  
+    fn approve() -> Weight {
+        (45_000_000 as Weight)
+            .saturating_add(DbWeight::get().reads(3 as Weight))
+            .saturating_add(DbWeight::get().writes(1 as Weight))
+    }
+    fn transfer_from() -> Weight {
+        (150_000_000 as Weight)
+            .saturating_add(DbWeight::get().reads(9 as Weight))
+            .saturating_add(DbWeight::get().writes(8 as Weight))
+    }
+    fn set_offchain_schema() -> Weight {
+        (33_000_000 as Weight)
+            .saturating_add(DbWeight::get().reads(2 as Weight))
+            .saturating_add(DbWeight::get().writes(1 as Weight))
+    }
+}
modifiedpallets/nft/src/lib.rsdiffbeforeafterboth
44#[cfg(test)]44#[cfg(test)]
45mod tests;45mod tests;
46
47mod default_weights;
4648
47// Structs49// Structs
48// #region50// #region
182 pub refungible_sponsor_transfer_timeout: u32,184 pub refungible_sponsor_transfer_timeout: u32,
183}185}
186
187pub trait WeightInfo {
188 fn create_collection() -> Weight;
189 fn destroy_collection() -> Weight;
190 fn add_to_white_list() -> Weight;
191 fn remove_from_white_list() -> Weight;
192 fn set_public_access_mode() -> Weight;
193 fn set_mint_permission() -> Weight;
194 fn change_collection_owner() -> Weight;
195 fn add_collection_admin() -> Weight;
196 fn remove_collection_admin() -> Weight;
197 fn set_collection_sponsor() -> Weight;
198 fn confirm_sponsorship() -> Weight;
199 fn remove_collection_sponsor() -> Weight;
200 fn create_item(s: usize, ) -> Weight;
201 fn burn_item() -> Weight;
202 fn transfer() -> Weight;
203 fn approve() -> Weight;
204 fn transfer_from() -> Weight;
205 fn set_offchain_schema() -> Weight;
206}
184207
185pub trait Trait: system::Trait {208pub trait Trait: system::Trait + Sized {
186 type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>;209 type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>;
210
211 /// Weight information for extrinsics in this pallet.
212 type WeightInfo: WeightInfo;
187}213}
188214
189#[cfg(feature = "runtime-benchmarks")]215#[cfg(feature = "runtime-benchmarks")]
326 /// 352 ///
327 /// * mode: [CollectionMode] collection type and type dependent data.353 /// * mode: [CollectionMode] collection type and type dependent data.
328 // returns collection ID354 // returns collection ID
329 #[weight =355 #[weight = T::WeightInfo::create_collection()]
330 (70_000_000 as Weight)
331 .saturating_add(RocksDbWeight::get().reads(7 as Weight))
332 .saturating_add(RocksDbWeight::get().writes(5 as Weight))]
333 pub fn create_collection(origin,356 pub fn create_collection(origin,
334 collection_name: Vec<u16>,357 collection_name: Vec<u16>,
335 collection_description: Vec<u16>,358 collection_description: Vec<u16>,
425 /// # Arguments448 /// # Arguments
426 /// 449 ///
427 /// * collection_id: collection to destroy.450 /// * collection_id: collection to destroy.
428 #[weight =451 #[weight = T::WeightInfo::destroy_collection()]
429 (90_000_000 as Weight)
430 .saturating_add(RocksDbWeight::get().reads(2 as Weight))
431 .saturating_add(RocksDbWeight::get().writes(5 as Weight))]
432 pub fn destroy_collection(origin, collection_id: u64) -> DispatchResult {452 pub fn destroy_collection(origin, collection_id: u64) -> DispatchResult {
433453
434 let sender = ensure_signed(origin)?;454 let sender = ensure_signed(origin)?;
475 /// * collection_id.495 /// * collection_id.
476 /// 496 ///
477 /// * address.497 /// * address.
478 #[weight =498 #[weight = T::WeightInfo::add_to_white_list()]
479 (30_000_000 as Weight)
480 .saturating_add(RocksDbWeight::get().reads(3 as Weight))
481 .saturating_add(RocksDbWeight::get().writes(1 as Weight))]
482 pub fn add_to_white_list(origin, collection_id: u64, address: T::AccountId) -> DispatchResult{499 pub fn add_to_white_list(origin, collection_id: u64, address: T::AccountId) -> DispatchResult{
483500
484 let sender = ensure_signed(origin)?;501 let sender = ensure_signed(origin)?;
513 /// * collection_id.530 /// * collection_id.
514 /// 531 ///
515 /// * address.532 /// * address.
516 #[weight =533 #[weight = T::WeightInfo::remove_from_white_list()]
517 (35_000_000 as Weight)
518 .saturating_add(RocksDbWeight::get().reads(3 as Weight))
519 .saturating_add(RocksDbWeight::get().writes(1 as Weight))]
520 pub fn remove_from_white_list(origin, collection_id: u64, address: T::AccountId) -> DispatchResult{534 pub fn remove_from_white_list(origin, collection_id: u64, address: T::AccountId) -> DispatchResult{
521535
522 let sender = ensure_signed(origin)?;536 let sender = ensure_signed(origin)?;
545 /// * collection_id.559 /// * collection_id.
546 /// 560 ///
547 /// * mode: [AccessMode]561 /// * mode: [AccessMode]
548 #[weight =562 #[weight = T::WeightInfo::set_public_access_mode()]
549 (27_000_000 as Weight)
550 .saturating_add(RocksDbWeight::get().reads(1 as Weight))
551 .saturating_add(RocksDbWeight::get().writes(1 as Weight))]
552 pub fn set_public_access_mode(origin, collection_id: u64, mode: AccessMode) -> DispatchResult563 pub fn set_public_access_mode(origin, collection_id: u64, mode: AccessMode) -> DispatchResult
553 {564 {
554 let sender = ensure_signed(origin)?;565 let sender = ensure_signed(origin)?;
574 /// * collection_id.585 /// * collection_id.
575 /// 586 ///
576 /// * mint_permission: Boolean parameter. If True, allows minting to Anyone with conditions above.587 /// * mint_permission: Boolean parameter. If True, allows minting to Anyone with conditions above.
577 #[weight =588 #[weight = T::WeightInfo::set_mint_permission()]
578 (27_000_000 as Weight)
579 .saturating_add(RocksDbWeight::get().reads(1 as Weight))
580 .saturating_add(RocksDbWeight::get().writes(1 as Weight))]
581 pub fn set_mint_permission(origin, collection_id: u64, mint_permission: bool) -> DispatchResult589 pub fn set_mint_permission(origin, collection_id: u64, mint_permission: bool) -> DispatchResult
582 {590 {
583 let sender = ensure_signed(origin)?;591 let sender = ensure_signed(origin)?;
601 /// * collection_id.609 /// * collection_id.
602 /// 610 ///
603 /// * new_owner.611 /// * new_owner.
604 #[weight =612 #[weight = T::WeightInfo::change_collection_owner()]
605 (27_000_000 as Weight)
606 .saturating_add(RocksDbWeight::get().reads(1 as Weight))
607 .saturating_add(RocksDbWeight::get().writes(1 as Weight))]
608 pub fn change_collection_owner(origin, collection_id: u64, new_owner: T::AccountId) -> DispatchResult {613 pub fn change_collection_owner(origin, collection_id: u64, new_owner: T::AccountId) -> DispatchResult {
609614
610 let sender = ensure_signed(origin)?;615 let sender = ensure_signed(origin)?;
629 /// * collection_id: ID of the Collection to add admin for.634 /// * collection_id: ID of the Collection to add admin for.
630 /// 635 ///
631 /// * new_admin_id: Address of new admin to add.636 /// * new_admin_id: Address of new admin to add.
632 #[weight =637 #[weight = T::WeightInfo::add_collection_admin()]
633 (32_000_000 as Weight)
634 .saturating_add(RocksDbWeight::get().reads(3 as Weight))
635 .saturating_add(RocksDbWeight::get().writes(1 as Weight))]
636 pub fn add_collection_admin(origin, collection_id: u64, new_admin_id: T::AccountId) -> DispatchResult {638 pub fn add_collection_admin(origin, collection_id: u64, new_admin_id: T::AccountId) -> DispatchResult {
637639
638 let sender = ensure_signed(origin)?;640 let sender = ensure_signed(origin)?;
666 /// * collection_id: ID of the Collection to remove admin for.668 /// * collection_id: ID of the Collection to remove admin for.
667 /// 669 ///
668 /// * account_id: Address of admin to remove.670 /// * account_id: Address of admin to remove.
669 #[weight =671 #[weight = T::WeightInfo::remove_collection_admin()]
670 (50_000_000 as Weight)
671 .saturating_add(RocksDbWeight::get().reads(2 as Weight))
672 .saturating_add(RocksDbWeight::get().writes(1 as Weight))]
673 pub fn remove_collection_admin(origin, collection_id: u64, account_id: T::AccountId) -> DispatchResult {672 pub fn remove_collection_admin(origin, collection_id: u64, account_id: T::AccountId) -> DispatchResult {
674673
675 let sender = ensure_signed(origin)?;674 let sender = ensure_signed(origin)?;
694 /// * collection_id.693 /// * collection_id.
695 /// 694 ///
696 /// * new_sponsor.695 /// * new_sponsor.
697 #[weight =696 #[weight = T::WeightInfo::set_collection_sponsor()]
698 (32_000_000 as Weight)
699 .saturating_add(RocksDbWeight::get().reads(2 as Weight))
700 .saturating_add(RocksDbWeight::get().writes(1 as Weight))]
701 pub fn set_collection_sponsor(origin, collection_id: u64, new_sponsor: T::AccountId) -> DispatchResult {697 pub fn set_collection_sponsor(origin, collection_id: u64, new_sponsor: T::AccountId) -> DispatchResult {
702698
703 let sender = ensure_signed(origin)?;699 let sender = ensure_signed(origin)?;
719 /// # Arguments715 /// # Arguments
720 /// 716 ///
721 /// * collection_id.717 /// * collection_id.
722 #[weight =718 #[weight = T::WeightInfo::confirm_sponsorship()]
723 (22_000_000 as Weight)
724 .saturating_add(RocksDbWeight::get().reads(1 as Weight))
725 .saturating_add(RocksDbWeight::get().writes(1 as Weight))]
726 pub fn confirm_sponsorship(origin, collection_id: u64) -> DispatchResult {719 pub fn confirm_sponsorship(origin, collection_id: u64) -> DispatchResult {
727720
728 let sender = ensure_signed(origin)?;721 let sender = ensure_signed(origin)?;
747 /// # Arguments740 /// # Arguments
748 /// 741 ///
749 /// * collection_id.742 /// * collection_id.
750 #[weight =743 #[weight = T::WeightInfo::remove_collection_sponsor()]
751 (24_000_000 as Weight)
752 .saturating_add(RocksDbWeight::get().reads(1 as Weight))
753 .saturating_add(RocksDbWeight::get().writes(1 as Weight))]
754 pub fn remove_collection_sponsor(origin, collection_id: u64) -> DispatchResult {744 pub fn remove_collection_sponsor(origin, collection_id: u64) -> DispatchResult {
755745
756 let sender = ensure_signed(origin)?;746 let sender = ensure_signed(origin)?;
783 /// * properties: Array of bytes that contains NFT properties. Since NFT Module is agnostic of properties meaning, it is treated purely as an array of bytes.773 /// * properties: Array of bytes that contains NFT properties. Since NFT Module is agnostic of properties meaning, it is treated purely as an array of bytes.
784 /// 774 ///
785 /// * owner: Address, initial owner of the NFT.775 /// * owner: Address, initial owner of the NFT.
776 // #[weight =
777 // (130_000_000 as Weight)
778 // .saturating_add((2135 as Weight).saturating_mul((properties.len() as u64) as Weight))
779 // .saturating_add(RocksDbWeight::get().reads(10 as Weight))
780 // .saturating_add(RocksDbWeight::get().writes(8 as Weight))]
781
786 #[weight =782 #[weight = T::WeightInfo::create_item(properties.len())]
787 (130_000_000 as Weight)
788 .saturating_add((2135 as Weight).saturating_mul((properties.len() as u64) as Weight))
789 .saturating_add(RocksDbWeight::get().reads(10 as Weight))
790 .saturating_add(RocksDbWeight::get().writes(8 as Weight))]
791 pub fn create_item(origin, collection_id: u64, properties: Vec<u8>, owner: T::AccountId) -> DispatchResult {783 pub fn create_item(origin, collection_id: u64, properties: Vec<u8>, owner: T::AccountId) -> DispatchResult {
792784
793 let sender = ensure_signed(origin)?;785 let sender = ensure_signed(origin)?;
870 /// * collection_id: ID of the collection.862 /// * collection_id: ID of the collection.
871 /// 863 ///
872 /// * item_id: ID of NFT to burn.864 /// * item_id: ID of NFT to burn.
873 #[weight =865 #[weight = T::WeightInfo::burn_item()]
874 (170_000_000 as Weight)
875 .saturating_add(RocksDbWeight::get().reads(9 as Weight))
876 .saturating_add(RocksDbWeight::get().writes(7 as Weight))]
877 pub fn burn_item(origin, collection_id: u64, item_id: u64) -> DispatchResult {866 pub fn burn_item(origin, collection_id: u64, item_id: u64) -> DispatchResult {
878867
879 let sender = ensure_signed(origin)?;868 let sender = ensure_signed(origin)?;
926 /// * Non-Fungible Mode: Ignored915 /// * Non-Fungible Mode: Ignored
927 /// * Fungible Mode: Must specify transferred amount916 /// * Fungible Mode: Must specify transferred amount
928 /// * Re-Fungible Mode: Must specify transferred portion (between 0 and 1)917 /// * Re-Fungible Mode: Must specify transferred portion (between 0 and 1)
929 #[weight =918 #[weight = T::WeightInfo::transfer()]
930 (125_000_000 as Weight)
931 .saturating_add(RocksDbWeight::get().reads(7 as Weight))
932 .saturating_add(RocksDbWeight::get().writes(7 as Weight))]
933 pub fn transfer(origin, recipient: T::AccountId, collection_id: u64, item_id: u64, value: u64) -> DispatchResult {919 pub fn transfer(origin, recipient: T::AccountId, collection_id: u64, item_id: u64, value: u64) -> DispatchResult {
934920
935 let sender = ensure_signed(origin)?;921 let sender = ensure_signed(origin)?;
971 /// * collection_id.957 /// * collection_id.
972 /// 958 ///
973 /// * item_id: ID of the item.959 /// * item_id: ID of the item.
974 #[weight =960 #[weight = T::WeightInfo::approve()]
975 (45_000_000 as Weight)
976 .saturating_add(RocksDbWeight::get().reads(3 as Weight))
977 .saturating_add(RocksDbWeight::get().writes(1 as Weight))]
978 pub fn approve(origin, approved: T::AccountId, collection_id: u64, item_id: u64) -> DispatchResult {961 pub fn approve(origin, approved: T::AccountId, collection_id: u64, item_id: u64) -> DispatchResult {
979962
980 let sender = ensure_signed(origin)?;963 let sender = ensure_signed(origin)?;
1032 /// * item_id: ID of the item.1015 /// * item_id: ID of the item.
1033 /// 1016 ///
1034 /// * value: Amount to transfer.1017 /// * value: Amount to transfer.
1035 #[weight =1018 #[weight = T::WeightInfo::transfer_from()]
1036 (150_000_000 as Weight)
1037 .saturating_add(RocksDbWeight::get().reads(9 as Weight))
1038 .saturating_add(RocksDbWeight::get().writes(8 as Weight))]
1039 pub fn transfer_from(origin, from: T::AccountId, recipient: T::AccountId, collection_id: u64, item_id: u64, value: u64 ) -> DispatchResult {1019 pub fn transfer_from(origin, from: T::AccountId, recipient: T::AccountId, collection_id: u64, item_id: u64, value: u64 ) -> DispatchResult {
10401020
1041 let sender = ensure_signed(origin)?;1021 let sender = ensure_signed(origin)?;
1107 /// * collection_id.1087 /// * collection_id.
1108 /// 1088 ///
1109 /// * schema: String representing the offchain data schema.1089 /// * schema: String representing the offchain data schema.
1110 #[weight =1090 #[weight = T::WeightInfo::set_offchain_schema()]
1111 (33_000_000 as Weight)
1112 .saturating_add(RocksDbWeight::get().reads(2 as Weight))
1113 .saturating_add(RocksDbWeight::get().writes(1 as Weight))]
1114 pub fn set_offchain_schema(1091 pub fn set_offchain_schema(
1115 origin,1092 origin,
1116 collection_id: u64,1093 collection_id: u64,
modifiedruntime/src/lib.rsdiffbeforeafterboth
--- a/runtime/src/lib.rs
+++ b/runtime/src/lib.rs
@@ -84,6 +84,7 @@
 /// Digest item type.
 pub type DigestItem = generic::DigestItem<Hash>;
 
+mod nft_weights;
 
 /// Opaque types. These are used by the CLI to instantiate machinery that don't need to know
 /// the specifics of the runtime. They can then be made to be agnostic over specific formats
@@ -144,9 +145,12 @@
     pub const MaximumBlockWeight: Weight = 2 * WEIGHT_PER_SECOND;
     pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);
     /// Assume 10% of weight for average on_initialize calls.
-    pub MaximumExtrinsicWeight: Weight = AvailableBlockRatio::get()
-        .saturating_sub(Perbill::from_percent(10)) * MaximumBlockWeight::get();
-    pub const MaximumBlockLength: u32 = 5 * 1024 * 1024;
+    // pub MaximumExtrinsicWeight: Weight = AvailableBlockRatio::get()
+    //     .saturating_sub(Perbill::from_percent(10)) * MaximumBlockWeight::get();
+
+    pub MaximumExtrinsicWeight: Weight = 4_294_967_295; 
+    //pub const MaximumBlockLength: u32 = 5 * 1024 * 1024;
+    pub const MaximumBlockLength: u32 = 4_294_967_295;
     pub const Version: RuntimeVersion = VERSION;
 }
 
@@ -291,7 +295,7 @@
 }
 
 parameter_types! {
-    pub const TransactionByteFee: Balance = 1;
+	pub const TransactionByteFee: Balance = 10 * MILLICENTS;
 }
 
 impl pallet_transaction_payment::Trait for Runtime {
@@ -299,7 +303,7 @@
     type OnTransactionPayment = ();
     type TransactionByteFee = TransactionByteFee;
     type WeightToFee = IdentityFee<Balance>;
-    type FeeMultiplierUpdate = ();
+    type FeeMultiplierUpdate =  ();
 }
 
 impl pallet_sudo::Trait for Runtime {
@@ -310,6 +314,7 @@
 /// Used for the module nft in `./nft.rs`
 impl pallet_nft::Trait for Runtime {
     type Event = Event;
+    type WeightInfo = nft_weights::WeightInfo;
 }
 
 construct_runtime!(
addedruntime/src/nft_weights.rsdiffbeforeafterboth
--- /dev/null
+++ b/runtime/src/nft_weights.rs
@@ -0,0 +1,96 @@
+use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight};
+
+pub struct WeightInfo;
+impl pallet_nft::WeightInfo for WeightInfo {
+	fn create_collection() -> Weight {
+		(70_000_000 as Weight)
+			.saturating_add(DbWeight::get().reads(7 as Weight))
+			.saturating_add(DbWeight::get().writes(5 as Weight))
+	}
+	fn destroy_collection() -> Weight {
+		(90_000_000 as Weight)
+			.saturating_add(DbWeight::get().reads(2 as Weight))
+			.saturating_add(DbWeight::get().writes(5 as Weight))
+	}
+	fn add_to_white_list() -> Weight {
+		(30_000_000 as Weight)
+			.saturating_add(DbWeight::get().reads(3 as Weight))
+			.saturating_add(DbWeight::get().writes(1 as Weight))
+    }
+    fn remove_from_white_list() -> Weight {
+		(35_000_000 as Weight)
+			.saturating_add(DbWeight::get().reads(3 as Weight))
+			.saturating_add(DbWeight::get().writes(1 as Weight))
+	}
+	fn set_public_access_mode() -> Weight {
+		(27_000_000 as Weight)
+			.saturating_add(DbWeight::get().reads(1 as Weight))
+			.saturating_add(DbWeight::get().writes(1 as Weight))
+	}
+	fn set_mint_permission() -> Weight {
+		(27_000_000 as Weight)
+			.saturating_add(DbWeight::get().reads(1 as Weight))
+			.saturating_add(DbWeight::get().writes(1 as Weight))
+	}
+	fn change_collection_owner() -> Weight {
+		(27_000_000 as Weight)
+			.saturating_add(DbWeight::get().reads(1 as Weight))
+			.saturating_add(DbWeight::get().writes(1 as Weight))
+	}
+	fn add_collection_admin() -> Weight {
+        (32_000_000 as Weight)
+            .saturating_add(DbWeight::get().reads(3 as Weight))
+            .saturating_add(DbWeight::get().writes(1 as Weight))
+	}
+	fn remove_collection_admin() -> Weight {
+		(50_000_000 as Weight)
+            .saturating_add(DbWeight::get().reads(2 as Weight))
+            .saturating_add(DbWeight::get().writes(1 as Weight))
+    }
+    fn set_collection_sponsor() -> Weight {
+		(32_000_000 as Weight)
+            .saturating_add(DbWeight::get().reads(2 as Weight))
+            .saturating_add(DbWeight::get().writes(1 as Weight))
+    }  
+    fn confirm_sponsorship() -> Weight {
+		(22_000_000 as Weight)
+            .saturating_add(DbWeight::get().reads(1 as Weight))
+            .saturating_add(DbWeight::get().writes(1 as Weight))
+    }  
+    fn remove_collection_sponsor() -> Weight {
+		(24_000_000 as Weight)
+            .saturating_add(DbWeight::get().reads(1 as Weight))
+            .saturating_add(DbWeight::get().writes(1 as Weight))
+    }  
+    fn create_item(s: usize, ) -> Weight {
+        (130_000_000 as Weight)
+            .saturating_add((2135 as Weight).saturating_mul(s as Weight))
+            .saturating_add(DbWeight::get().reads(10 as Weight))
+            .saturating_add(DbWeight::get().writes(8 as Weight))
+    }  
+    fn burn_item() -> Weight {
+		(170_000_000 as Weight)
+            .saturating_add(DbWeight::get().reads(9 as Weight))
+            .saturating_add(DbWeight::get().writes(7 as Weight))
+    }  
+    fn transfer() -> Weight {
+        (125_000_000 as Weight)
+            .saturating_add(DbWeight::get().reads(7 as Weight))
+            .saturating_add(DbWeight::get().writes(7 as Weight))
+    }  
+    fn approve() -> Weight {
+        (45_000_000 as Weight)
+            .saturating_add(DbWeight::get().reads(3 as Weight))
+            .saturating_add(DbWeight::get().writes(1 as Weight))
+    }
+    fn transfer_from() -> Weight {
+        (150_000_000 as Weight)
+            .saturating_add(DbWeight::get().reads(9 as Weight))
+            .saturating_add(DbWeight::get().writes(8 as Weight))
+    }
+    fn set_offchain_schema() -> Weight {
+        (33_000_000 as Weight)
+            .saturating_add(DbWeight::get().reads(2 as Weight))
+            .saturating_add(DbWeight::get().writes(1 as Weight))
+    }
+}