git.delta.rocks / unique-network / refs/commits / 4ff3edf47018

difftreelog

Merge branch 'develop' into feature/ci-refactoring

Konstantin Astakhov2022-11-01parents: #41613d6 #49715db.patch.diff
in: master

6 files changed

modifiedcrates/evm-coder/procedural/src/solidity_interface.rsdiffbeforeafterboth
--- a/crates/evm-coder/procedural/src/solidity_interface.rs
+++ b/crates/evm-coder/procedural/src/solidity_interface.rs
@@ -718,7 +718,11 @@
 				}
 			}
 		} else {
-			quote! {#pascal_name}
+			quote! {
+				#(#[doc = #docs])*
+				#[allow(missing_docs)]
+				#pascal_name
+			}
 		}
 	}
 
@@ -788,6 +792,7 @@
 
 		quote! {
 			#call_name::#pascal_name #matcher => {
+				#[allow(deprecated)]
 				let result = #receiver #name(
 					#(
 						#args,
modifiedcrates/evm-coder/procedural/src/to_log.rsdiffbeforeafterboth
--- a/crates/evm-coder/procedural/src/to_log.rs
+++ b/crates/evm-coder/procedural/src/to_log.rs
@@ -194,7 +194,7 @@
 				#(
 					#consts
 				)*
-
+				/// Generate solidity definitions for methods described in this interface
 				pub fn generate_solidity_interface(tc: &evm_coder::solidity::TypeCollector, is_impl: bool) {
 					use evm_coder::solidity::*;
 					use core::fmt::Write;
modifiedpallets/common/src/erc.rsdiffbeforeafterboth
--- a/pallets/common/src/erc.rs
+++ b/pallets/common/src/erc.rs
@@ -64,6 +64,7 @@
 /// Does not always represent a full collection, for RFT it is either
 /// collection (Implementing ERC721), or specific collection token (Implementing ERC20).
 pub trait CommonEvmHandler {
+	/// Raw compiled binary code of the contract stub
 	const CODE: &'static [u8];
 
 	/// Call precompiled handle.
modifiedpallets/common/src/weights.rsdiffbeforeafterboth
before · pallets/common/src/weights.rs
1// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs23//! Autogenerated weights for pallet_common4//!5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev6//! DATE: 2022-05-23, STEPS: `50`, REPEAT: 1, LOW RANGE: `[]`, HIGH RANGE: `[]`7//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 102489// Executed Command:10// target/release/unique-collator11// benchmark12// pallet13// --pallet14// pallet-common15// --wasm-execution16// compiled17// --extrinsic18// *19// --template20// .maintain/frame-weight-template.hbs21// --steps=5022// --repeat=123// --heap-pages=409624// --output=./pallets/common/src/weights.rs2526#![cfg_attr(rustfmt, rustfmt_skip)]27#![allow(unused_parens)]28#![allow(unused_imports)]29#![allow(clippy::unnecessary_cast)]3031use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};32use sp_std::marker::PhantomData;3334/// Weight functions needed for pallet_common.35pub trait WeightInfo {36	fn set_collection_properties(b: u32, ) -> Weight;37	fn delete_collection_properties(b: u32, ) -> Weight;38}3940/// Weights for pallet_common using the Substrate node and recommended hardware.41pub struct SubstrateWeight<T>(PhantomData<T>);42impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {43	// Storage: Common CollectionProperties (r:1 w:1)44	fn set_collection_properties(b: u32, ) -> Weight {45		(Weight::from_ref_time(0))46			// Standard Error: 142_818_00047			.saturating_add(Weight::from_ref_time(2_786_252_000).saturating_mul(b as u64))48			.saturating_add(T::DbWeight::get().reads(1 as u64))49			.saturating_add(T::DbWeight::get().writes(1 as u64))50	}51	// Storage: Common CollectionProperties (r:1 w:1)52	fn delete_collection_properties(b: u32, ) -> Weight {53		(Weight::from_ref_time(0))54			// Standard Error: 101_087_00055			.saturating_add(Weight::from_ref_time(2_739_521_000).saturating_mul(b as u64))56			.saturating_add(T::DbWeight::get().reads(1 as u64))57			.saturating_add(T::DbWeight::get().writes(1 as u64))58	}59}6061// For backwards compatibility and tests62impl WeightInfo for () {63	// Storage: Common CollectionProperties (r:1 w:1)64	fn set_collection_properties(b: u32, ) -> Weight {65		(Weight::from_ref_time(0))66			// Standard Error: 142_818_00067			.saturating_add(Weight::from_ref_time(2_786_252_000).saturating_mul(b as u64))68			.saturating_add(RocksDbWeight::get().reads(1 as u64))69			.saturating_add(RocksDbWeight::get().writes(1 as u64))70	}71	// Storage: Common CollectionProperties (r:1 w:1)72	fn delete_collection_properties(b: u32, ) -> Weight {73		(Weight::from_ref_time(0))74			// Standard Error: 101_087_00075			.saturating_add(Weight::from_ref_time(2_739_521_000).saturating_mul(b as u64))76			.saturating_add(RocksDbWeight::get().reads(1 as u64))77			.saturating_add(RocksDbWeight::get().writes(1 as u64))78	}79}
after · pallets/common/src/weights.rs
1// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs23//! Autogenerated weights for pallet_common4//!5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev6//! DATE: 2022-05-23, STEPS: `50`, REPEAT: 1, LOW RANGE: `[]`, HIGH RANGE: `[]`7//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 102489// Executed Command:10// target/release/unique-collator11// benchmark12// pallet13// --pallet14// pallet-common15// --wasm-execution16// compiled17// --extrinsic18// *19// --template20// .maintain/frame-weight-template.hbs21// --steps=5022// --repeat=123// --heap-pages=409624// --output=./pallets/common/src/weights.rs2526#![cfg_attr(rustfmt, rustfmt_skip)]27#![allow(unused_parens)]28#![allow(unused_imports)]29#![allow(missing_docs)]30#![allow(clippy::unnecessary_cast)]3132use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};33use sp_std::marker::PhantomData;3435/// Weight functions needed for pallet_common.36pub trait WeightInfo {37	fn set_collection_properties(b: u32, ) -> Weight;38	fn delete_collection_properties(b: u32, ) -> Weight;39}4041/// Weights for pallet_common using the Substrate node and recommended hardware.42pub struct SubstrateWeight<T>(PhantomData<T>);43impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {44	// Storage: Common CollectionProperties (r:1 w:1)45	fn set_collection_properties(b: u32, ) -> Weight {46		(Weight::from_ref_time(0))47			// Standard Error: 142_818_00048			.saturating_add(Weight::from_ref_time(2_786_252_000).saturating_mul(b as u64))49			.saturating_add(T::DbWeight::get().reads(1 as u64))50			.saturating_add(T::DbWeight::get().writes(1 as u64))51	}52	// Storage: Common CollectionProperties (r:1 w:1)53	fn delete_collection_properties(b: u32, ) -> Weight {54		(Weight::from_ref_time(0))55			// Standard Error: 101_087_00056			.saturating_add(Weight::from_ref_time(2_739_521_000).saturating_mul(b as u64))57			.saturating_add(T::DbWeight::get().reads(1 as u64))58			.saturating_add(T::DbWeight::get().writes(1 as u64))59	}60}6162// For backwards compatibility and tests63impl WeightInfo for () {64	// Storage: Common CollectionProperties (r:1 w:1)65	fn set_collection_properties(b: u32, ) -> Weight {66		(Weight::from_ref_time(0))67			// Standard Error: 142_818_00068			.saturating_add(Weight::from_ref_time(2_786_252_000).saturating_mul(b as u64))69			.saturating_add(RocksDbWeight::get().reads(1 as u64))70			.saturating_add(RocksDbWeight::get().writes(1 as u64))71	}72	// Storage: Common CollectionProperties (r:1 w:1)73	fn delete_collection_properties(b: u32, ) -> Weight {74		(Weight::from_ref_time(0))75			// Standard Error: 101_087_00076			.saturating_add(Weight::from_ref_time(2_739_521_000).saturating_mul(b as u64))77			.saturating_add(RocksDbWeight::get().reads(1 as u64))78			.saturating_add(RocksDbWeight::get().writes(1 as u64))79	}80}
modifiedpallets/evm-contract-helpers/src/lib.rsdiffbeforeafterboth
--- a/pallets/evm-contract-helpers/src/lib.rs
+++ b/pallets/evm-contract-helpers/src/lib.rs
@@ -172,7 +172,7 @@
 	>;
 
 	#[pallet::event]
-	#[pallet::generate_deposit(pub fn deposit_event)]
+	#[pallet::generate_deposit(fn deposit_event)]
 	pub enum Event<T: Config> {
 		/// Contract sponsor was set.
 		ContractSponsorSet(
@@ -350,6 +350,7 @@
 		pub fn sponsoring_mode(contract: H160) -> SponsoringModeT {
 			<SponsoringMode<T>>::get(contract)
 				.or_else(|| {
+					#[allow(deprecated)]
 					<SelfSponsoring<T>>::get(contract).then(|| SponsoringModeT::Allowlisted)
 				})
 				.unwrap_or_default()
@@ -362,6 +363,7 @@
 			} else {
 				<SponsoringMode<T>>::insert(contract, mode);
 			}
+			#[allow(deprecated)]
 			<SelfSponsoring<T>>::remove(contract)
 		}
 
@@ -424,6 +426,7 @@
 			_ => return None,
 		})
 	}
+	#[allow(dead_code)]
 	fn to_eth(self) -> u8 {
 		match self {
 			SponsoringModeT::Disabled => 0,
modifiedpallets/refungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/refungible/src/lib.rs
+++ b/pallets/refungible/src/lib.rs
@@ -137,7 +137,6 @@
 /// for the convenience of database access. Notably contains the token metadata.
 #[struct_versioning::versioned(version = 2, upper)]
 #[derive(Encode, Decode, Default, TypeInfo, MaxEncodedLen)]
-#[deprecated(since = "0.2.0", note = "ItemData is no more contains usefull data")]
 pub struct ItemData {
 	pub const_data: BoundedVec<u8, CustomDataLimit>,
 
@@ -279,7 +278,8 @@
 		fn on_runtime_upgrade() -> Weight {
 			let storage_version = StorageVersion::get::<Pallet<T>>();
 			if storage_version < StorageVersion::new(2) {
-				<TokenData<T>>::remove_all(None);
+				#[allow(deprecated)]
+				let _ = <TokenData<T>>::clear(u32::MAX, None);
 			}
 			StorageVersion::new(2).put::<Pallet<T>>();