git.delta.rocks / unique-network / refs/commits / a6179b86a28f

difftreelog

Foreign assets benchmark

Dev2022-09-12parent: #838ab9f.patch.diff
in: master

8 files changed

modifiedMakefilediffbeforeafterboth
before · Makefile
1.PHONY: _help2_help:3	@echo "regenerate_solidity - generate stubs/interfaces for contracts defined in native (via evm-coder)"4	@echo "evm_stubs - recompile contract stubs and ABI"5	@echo "bench - run frame-benchmarking"6	@echo "  bench-evm-migration"7	@echo "  bench-unique"89FUNGIBLE_EVM_STUBS=./pallets/fungible/src/stubs10FUNGIBLE_EVM_ABI=./tests/src/eth/fungibleAbi.json1112REFUNGIBLE_EVM_STUBS=./pallets/refungible/src/stubs13REFUNGIBLE_EVM_ABI=./tests/src/eth/refungibleAbi.json1415NONFUNGIBLE_EVM_STUBS=./pallets/nonfungible/src/stubs16NONFUNGIBLE_EVM_ABI=./tests/src/eth/nonFungibleAbi.json1718REFUNGIBLE_EVM_STUBS=./pallets/refungible/src/stubs19REFUNGIBLE_EVM_ABI=./tests/src/eth/reFungibleAbi.json20REFUNGIBLE_TOKEN_EVM_ABI=./tests/src/eth/reFungibleTokenAbi.json2122CONTRACT_HELPERS_STUBS=./pallets/evm-contract-helpers/src/stubs/23CONTRACT_HELPERS_ABI=./tests/src/eth/util/contractHelpersAbi.json2425COLLECTION_HELPER_STUBS=./pallets/unique/src/eth/stubs/26COLLECTION_HELPER_ABI=./tests/src/eth/collectionHelpersAbi.json2728TESTS_API=./tests/src/eth/api/2930.PHONY: regenerate_solidity31regenerate_solidity: UniqueFungible.sol UniqueNFT.sol UniqueRefungible.sol UniqueRefungibleToken.sol ContractHelpers.sol CollectionHelpers.sol3233UniqueFungible.sol:34	PACKAGE=pallet-fungible NAME=erc::gen_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh35	PACKAGE=pallet-fungible NAME=erc::gen_impl OUTPUT=$(FUNGIBLE_EVM_STUBS)/$@ ./.maintain/scripts/generate_sol.sh3637UniqueNFT.sol:38	PACKAGE=pallet-nonfungible NAME=erc::gen_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh39	PACKAGE=pallet-nonfungible NAME=erc::gen_impl OUTPUT=$(NONFUNGIBLE_EVM_STUBS)/$@ ./.maintain/scripts/generate_sol.sh4041UniqueRefungible.sol:42	PACKAGE=pallet-refungible NAME=erc::gen_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh43	PACKAGE=pallet-refungible NAME=erc::gen_impl OUTPUT=$(REFUNGIBLE_EVM_STUBS)/$@ ./.maintain/scripts/generate_sol.sh4445UniqueRefungibleToken.sol:46	PACKAGE=pallet-refungible NAME=erc_token::gen_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh47	PACKAGE=pallet-refungible NAME=erc_token::gen_impl OUTPUT=$(REFUNGIBLE_EVM_STUBS)/$@ ./.maintain/scripts/generate_sol.sh4849ContractHelpers.sol:50	PACKAGE=pallet-evm-contract-helpers NAME=eth::contract_helpers_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh51	PACKAGE=pallet-evm-contract-helpers NAME=eth::contract_helpers_impl OUTPUT=$(CONTRACT_HELPERS_STUBS)/$@ ./.maintain/scripts/generate_sol.sh5253CollectionHelpers.sol:54	PACKAGE=pallet-unique NAME=eth::collection_helper_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh55	PACKAGE=pallet-unique NAME=eth::collection_helper_impl OUTPUT=$(COLLECTION_HELPER_STUBS)/$@ ./.maintain/scripts/generate_sol.sh5657UniqueFungible: UniqueFungible.sol58	INPUT=$(FUNGIBLE_EVM_STUBS)/$< OUTPUT=$(FUNGIBLE_EVM_STUBS)/UniqueFungible.raw ./.maintain/scripts/compile_stub.sh59	INPUT=$(FUNGIBLE_EVM_STUBS)/$< OUTPUT=$(FUNGIBLE_EVM_ABI) ./.maintain/scripts/generate_abi.sh6061UniqueNFT: UniqueNFT.sol62	INPUT=$(NONFUNGIBLE_EVM_STUBS)/$< OUTPUT=$(NONFUNGIBLE_EVM_STUBS)/UniqueNFT.raw ./.maintain/scripts/compile_stub.sh63	INPUT=$(NONFUNGIBLE_EVM_STUBS)/$< OUTPUT=$(NONFUNGIBLE_EVM_ABI) ./.maintain/scripts/generate_abi.sh6465UniqueRefungible: UniqueRefungible.sol66	INPUT=$(REFUNGIBLE_EVM_STUBS)/$< OUTPUT=$(REFUNGIBLE_EVM_STUBS)/UniqueRefungible.raw ./.maintain/scripts/compile_stub.sh67	INPUT=$(REFUNGIBLE_EVM_STUBS)/$< OUTPUT=$(REFUNGIBLE_EVM_ABI) ./.maintain/scripts/generate_abi.sh6869UniqueRefungibleToken: UniqueRefungibleToken.sol70	INPUT=$(REFUNGIBLE_EVM_STUBS)/$< OUTPUT=$(REFUNGIBLE_EVM_STUBS)/UniqueRefungibleToken.raw ./.maintain/scripts/compile_stub.sh71	INPUT=$(REFUNGIBLE_EVM_STUBS)/$< OUTPUT=$(REFUNGIBLE_TOKEN_EVM_ABI) ./.maintain/scripts/generate_abi.sh7273ContractHelpers: ContractHelpers.sol74	INPUT=$(CONTRACT_HELPERS_STUBS)/$< OUTPUT=$(CONTRACT_HELPERS_STUBS)/ContractHelpers.raw ./.maintain/scripts/compile_stub.sh75	INPUT=$(CONTRACT_HELPERS_STUBS)/$< OUTPUT=$(CONTRACT_HELPERS_ABI) ./.maintain/scripts/generate_abi.sh7677CollectionHelpers: CollectionHelpers.sol78	INPUT=$(COLLECTION_HELPER_STUBS)/$< OUTPUT=$(COLLECTION_HELPER_STUBS)/CollectionHelpers.raw ./.maintain/scripts/compile_stub.sh79	INPUT=$(COLLECTION_HELPER_STUBS)/$< OUTPUT=$(COLLECTION_HELPER_ABI) ./.maintain/scripts/generate_abi.sh8081evm_stubs: UniqueFungible UniqueNFT UniqueRefungible UniqueRefungibleToken ContractHelpers CollectionHelpers8283.PHONY: _bench84_bench:85	cargo run --release --features runtime-benchmarks,$(RUNTIME) -- \86	benchmark pallet --pallet pallet-$(if $(PALLET),$(PALLET),$(error Must set PALLET)) \87	--wasm-execution compiled --extrinsic '*' \88	--template .maintain/frame-weight-template.hbs --steps=50 --repeat=80 --heap-pages=4096 \89	--output=./pallets/$(if $(PALLET_DIR),$(PALLET_DIR),$(PALLET))/src/weights.rs9091.PHONY: bench-evm-migration92bench-evm-migration:93	make _bench PALLET=evm-migration9495.PHONY: bench-common96bench-common:97	make _bench PALLET=common9899.PHONY: bench-unique100bench-unique:101	make _bench PALLET=unique102103.PHONY: bench-fungible104bench-fungible:105	make _bench PALLET=fungible106107.PHONY: bench-refungible108bench-refungible:109	make _bench PALLET=refungible110111.PHONY: bench-nonfungible112bench-nonfungible:113	make _bench PALLET=nonfungible114115.PHONY: bench-structure116bench-structure:117	make _bench PALLET=structure118119.PHONY: bench-scheduler120bench-scheduler:121	make _bench PALLET=unique-scheduler PALLET_DIR=scheduler122123.PHONY: bench-rmrk-core124bench-rmrk-core:125	make _bench PALLET=proxy-rmrk-core126127.PHONY: bench-rmrk-equip128bench-rmrk-equip:129	make _bench PALLET=proxy-rmrk-equip130131.PHONY: bench132bench: bench-evm-migration bench-unique bench-structure bench-fungible bench-refungible bench-nonfungible bench-scheduler bench-rmrk-core bench-rmrk-equip
after · Makefile
1.PHONY: _help2_help:3	@echo "regenerate_solidity - generate stubs/interfaces for contracts defined in native (via evm-coder)"4	@echo "evm_stubs - recompile contract stubs and ABI"5	@echo "bench - run frame-benchmarking"6	@echo "  bench-evm-migration"7	@echo "  bench-unique"89FUNGIBLE_EVM_STUBS=./pallets/fungible/src/stubs10FUNGIBLE_EVM_ABI=./tests/src/eth/fungibleAbi.json1112REFUNGIBLE_EVM_STUBS=./pallets/refungible/src/stubs13REFUNGIBLE_EVM_ABI=./tests/src/eth/refungibleAbi.json1415NONFUNGIBLE_EVM_STUBS=./pallets/nonfungible/src/stubs16NONFUNGIBLE_EVM_ABI=./tests/src/eth/nonFungibleAbi.json1718REFUNGIBLE_EVM_STUBS=./pallets/refungible/src/stubs19REFUNGIBLE_EVM_ABI=./tests/src/eth/reFungibleAbi.json20REFUNGIBLE_TOKEN_EVM_ABI=./tests/src/eth/reFungibleTokenAbi.json2122CONTRACT_HELPERS_STUBS=./pallets/evm-contract-helpers/src/stubs/23CONTRACT_HELPERS_ABI=./tests/src/eth/util/contractHelpersAbi.json2425COLLECTION_HELPER_STUBS=./pallets/unique/src/eth/stubs/26COLLECTION_HELPER_ABI=./tests/src/eth/collectionHelpersAbi.json2728TESTS_API=./tests/src/eth/api/2930.PHONY: regenerate_solidity31regenerate_solidity: UniqueFungible.sol UniqueNFT.sol UniqueRefungible.sol UniqueRefungibleToken.sol ContractHelpers.sol CollectionHelpers.sol3233UniqueFungible.sol:34	PACKAGE=pallet-fungible NAME=erc::gen_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh35	PACKAGE=pallet-fungible NAME=erc::gen_impl OUTPUT=$(FUNGIBLE_EVM_STUBS)/$@ ./.maintain/scripts/generate_sol.sh3637UniqueNFT.sol:38	PACKAGE=pallet-nonfungible NAME=erc::gen_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh39	PACKAGE=pallet-nonfungible NAME=erc::gen_impl OUTPUT=$(NONFUNGIBLE_EVM_STUBS)/$@ ./.maintain/scripts/generate_sol.sh4041UniqueRefungible.sol:42	PACKAGE=pallet-refungible NAME=erc::gen_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh43	PACKAGE=pallet-refungible NAME=erc::gen_impl OUTPUT=$(REFUNGIBLE_EVM_STUBS)/$@ ./.maintain/scripts/generate_sol.sh4445UniqueRefungibleToken.sol:46	PACKAGE=pallet-refungible NAME=erc_token::gen_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh47	PACKAGE=pallet-refungible NAME=erc_token::gen_impl OUTPUT=$(REFUNGIBLE_EVM_STUBS)/$@ ./.maintain/scripts/generate_sol.sh4849ContractHelpers.sol:50	PACKAGE=pallet-evm-contract-helpers NAME=eth::contract_helpers_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh51	PACKAGE=pallet-evm-contract-helpers NAME=eth::contract_helpers_impl OUTPUT=$(CONTRACT_HELPERS_STUBS)/$@ ./.maintain/scripts/generate_sol.sh5253CollectionHelpers.sol:54	PACKAGE=pallet-unique NAME=eth::collection_helper_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh55	PACKAGE=pallet-unique NAME=eth::collection_helper_impl OUTPUT=$(COLLECTION_HELPER_STUBS)/$@ ./.maintain/scripts/generate_sol.sh5657UniqueFungible: UniqueFungible.sol58	INPUT=$(FUNGIBLE_EVM_STUBS)/$< OUTPUT=$(FUNGIBLE_EVM_STUBS)/UniqueFungible.raw ./.maintain/scripts/compile_stub.sh59	INPUT=$(FUNGIBLE_EVM_STUBS)/$< OUTPUT=$(FUNGIBLE_EVM_ABI) ./.maintain/scripts/generate_abi.sh6061UniqueNFT: UniqueNFT.sol62	INPUT=$(NONFUNGIBLE_EVM_STUBS)/$< OUTPUT=$(NONFUNGIBLE_EVM_STUBS)/UniqueNFT.raw ./.maintain/scripts/compile_stub.sh63	INPUT=$(NONFUNGIBLE_EVM_STUBS)/$< OUTPUT=$(NONFUNGIBLE_EVM_ABI) ./.maintain/scripts/generate_abi.sh6465UniqueRefungible: UniqueRefungible.sol66	INPUT=$(REFUNGIBLE_EVM_STUBS)/$< OUTPUT=$(REFUNGIBLE_EVM_STUBS)/UniqueRefungible.raw ./.maintain/scripts/compile_stub.sh67	INPUT=$(REFUNGIBLE_EVM_STUBS)/$< OUTPUT=$(REFUNGIBLE_EVM_ABI) ./.maintain/scripts/generate_abi.sh6869UniqueRefungibleToken: UniqueRefungibleToken.sol70	INPUT=$(REFUNGIBLE_EVM_STUBS)/$< OUTPUT=$(REFUNGIBLE_EVM_STUBS)/UniqueRefungibleToken.raw ./.maintain/scripts/compile_stub.sh71	INPUT=$(REFUNGIBLE_EVM_STUBS)/$< OUTPUT=$(REFUNGIBLE_TOKEN_EVM_ABI) ./.maintain/scripts/generate_abi.sh7273ContractHelpers: ContractHelpers.sol74	INPUT=$(CONTRACT_HELPERS_STUBS)/$< OUTPUT=$(CONTRACT_HELPERS_STUBS)/ContractHelpers.raw ./.maintain/scripts/compile_stub.sh75	INPUT=$(CONTRACT_HELPERS_STUBS)/$< OUTPUT=$(CONTRACT_HELPERS_ABI) ./.maintain/scripts/generate_abi.sh7677CollectionHelpers: CollectionHelpers.sol78	INPUT=$(COLLECTION_HELPER_STUBS)/$< OUTPUT=$(COLLECTION_HELPER_STUBS)/CollectionHelpers.raw ./.maintain/scripts/compile_stub.sh79	INPUT=$(COLLECTION_HELPER_STUBS)/$< OUTPUT=$(COLLECTION_HELPER_ABI) ./.maintain/scripts/generate_abi.sh8081evm_stubs: UniqueFungible UniqueNFT UniqueRefungible UniqueRefungibleToken ContractHelpers CollectionHelpers8283.PHONY: _bench84_bench:85	cargo run --release --features runtime-benchmarks,$(RUNTIME) -- \86	benchmark pallet --pallet pallet-$(if $(PALLET),$(PALLET),$(error Must set PALLET)) \87	--wasm-execution compiled --extrinsic '*' \88	--template .maintain/frame-weight-template.hbs --steps=50 --repeat=80 --heap-pages=4096 \89	--output=./pallets/$(if $(PALLET_DIR),$(PALLET_DIR),$(PALLET))/src/weights.rs9091.PHONY: bench-evm-migration92bench-evm-migration:93	make _bench PALLET=evm-migration9495.PHONY: bench-common96bench-common:97	make _bench PALLET=common9899.PHONY: bench-unique100bench-unique:101	make _bench PALLET=unique102103.PHONY: bench-fungible104bench-fungible:105	make _bench PALLET=fungible106107.PHONY: bench-refungible108bench-refungible:109	make _bench PALLET=refungible110111.PHONY: bench-nonfungible112bench-nonfungible:113	make _bench PALLET=nonfungible114115.PHONY: bench-structure116bench-structure:117	make _bench PALLET=structure118119.PHONY: bench-scheduler120bench-scheduler:121	make _bench PALLET=unique-scheduler PALLET_DIR=scheduler122123.PHONY: bench-rmrk-core124bench-rmrk-core:125	make _bench PALLET=proxy-rmrk-core126127.PHONY: bench-rmrk-equip128bench-rmrk-equip:129	make _bench PALLET=proxy-rmrk-equip130131.PHONY: bench-foreign-assets132bench-foreign-assets:133	make _bench PALLET=foreign-assets	134135.PHONY: bench136bench: bench-evm-migration bench-unique bench-structure bench-fungible bench-refungible bench-nonfungible bench-scheduler bench-rmrk-core bench-rmrk-equip bench-foreign-assets
modifiedpallets/foreign-assets/Cargo.tomldiffbeforeafterboth
--- a/pallets/foreign-assets/Cargo.toml
+++ b/pallets/foreign-assets/Cargo.toml
@@ -22,8 +22,7 @@
 xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27", default-features = false }
 #orml-tokens = { git = 'https://github.com/UniqueNetwork/open-runtime-module-library', branch = 'unique-polkadot-v0.9.24', version = "0.4.1-dev", default-features = false }
 orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.27", version = "0.4.1-dev", default-features = false }
-#git = "https://github.com/open-web3-stack/open-runtime-module-library"
-#branch = "polkadot-v0.9.27"
+frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
 
 [dev-dependencies]
 serde_json = "1.0.68"
@@ -51,3 +50,4 @@
 	"orml-tokens/std"
 ]
 try-runtime = ["frame-support/try-runtime"]
+runtime-benchmarks = ['frame-benchmarking', 'pallet-common/runtime-benchmarks']
\ No newline at end of file
addedpallets/foreign-assets/src/benchmarking.rsdiffbeforeafterboth
--- /dev/null
+++ b/pallets/foreign-assets/src/benchmarking.rs
@@ -0,0 +1,76 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
+#![allow(missing_docs)]
+
+use super::{Config, Pallet};
+use frame_benchmarking::{benchmarks, account};
+use frame_system::RawOrigin;
+use crate::AssetMetadata;
+use crate::Pallet as ForeignAssets;
+use xcm::opaque::latest::Junction::Parachain;
+use xcm::VersionedMultiLocation;
+use frame_support::{
+	traits::{Currency},
+};
+use sp_std::boxed::Box;
+
+benchmarks! {
+	register_foreign_asset {
+		let origin: RawOrigin<T::AccountId> = frame_system::RawOrigin::Root;
+		let owner: T::AccountId = account("user", 0, 1);
+		let location: VersionedMultiLocation = VersionedMultiLocation::from(Parachain(1000).into());
+		let metadata: AssetMetadata<<<T as Config>::Currency as Currency<<T as frame_system::Config>::AccountId>>::Balance> = AssetMetadata{
+			name: "name".into(),
+			symbol: "symbol".into(),
+			decimals: 18,
+			minimal_balance: 1u32.into()
+		};
+		let mut balance: <<T as Config>::Currency as Currency<<T as frame_system::Config>::AccountId>>::Balance =
+		   4_000_000_000u32.into();
+		balance = balance * balance;
+		<T as Config>::Currency::make_free_balance_be(&owner,
+			balance);
+	}: {
+		ForeignAssets::<T>::register_foreign_asset(origin.into(), owner, Box::new(location), Box::new(metadata))?
+	}
+
+	update_foreign_asset {
+		let origin: RawOrigin<T::AccountId> = frame_system::RawOrigin::Root;
+		let owner: T::AccountId = account("user", 0, 1);
+		let location: VersionedMultiLocation = VersionedMultiLocation::from(Parachain(2000).into());
+		let metadata: AssetMetadata<<<T as Config>::Currency as Currency<<T as frame_system::Config>::AccountId>>::Balance> = AssetMetadata{
+			name: "name".into(),
+			symbol: "symbol".into(),
+			decimals: 18,
+			minimal_balance: 1u32.into()
+		};
+		let metadata2: AssetMetadata<<<T as Config>::Currency as Currency<<T as frame_system::Config>::AccountId>>::Balance> = AssetMetadata{
+			name: "name2".into(),
+			symbol: "symbol2".into(),
+			decimals: 18,
+			minimal_balance: 1u32.into()
+		};
+		let mut balance: <<T as Config>::Currency as Currency<<T as frame_system::Config>::AccountId>>::Balance =
+		   4_000_000_000u32.into();
+		balance = balance * balance;
+		<T as Config>::Currency::make_free_balance_be(&owner, balance);
+		ForeignAssets::<T>::register_foreign_asset(origin.clone().into(), owner, Box::new(location.clone()), Box::new(metadata))?;
+
+	}: {
+		ForeignAssets::<T>::update_foreign_asset(origin.into(), 0, Box::new(location), Box::new(metadata2))?
+	}
+}
modifiedpallets/foreign-assets/src/lib.rsdiffbeforeafterboth
--- a/pallets/foreign-assets/src/lib.rs
+++ b/pallets/foreign-assets/src/lib.rs
@@ -124,6 +124,9 @@
 mod impl_fungibles;
 mod weights;
 
+#[cfg(feature = "runtime-benchmarks")]
+mod benchmarking;
+
 pub use module::*;
 pub use weights::WeightInfo;
 
@@ -303,7 +306,7 @@
 			let data: CreateCollectionData<T::AccountId> = CreateCollectionData {
 				name: name.try_into().unwrap(),
 				description: description.try_into().unwrap(),
-				mode: CollectionMode::Fungible(18),
+				mode: CollectionMode::Fungible(md.decimals),
 				..Default::default()
 			};
 
modifiedruntime/common/runtime_apis.rsdiffbeforeafterboth
--- a/runtime/common/runtime_apis.rs
+++ b/runtime/common/runtime_apis.rs
@@ -653,6 +653,10 @@
                     #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]
                     list_benchmark!(list, extra, pallet_proxy_rmrk_equip, RmrkEquip);
 
+                    #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]
+                    list_benchmark!(list, extra, pallet_foreign_assets, ForeignAssets);
+
+
                     // list_benchmark!(list, extra, pallet_evm_coder_substrate, EvmCoderSubstrate);
 
                     let storage_info = AllPalletsReversedWithSystemFirst::storage_info();
@@ -708,6 +712,9 @@
                     #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]
                     add_benchmark!(params, batches, pallet_proxy_rmrk_equip, RmrkEquip);
 
+                    #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]
+                    add_benchmark!(params, batches, pallet_foreign_assets, ForeignAssets);
+
                     // add_benchmark!(params, batches, pallet_evm_coder_substrate, EvmCoderSubstrate);
 
                     if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }
modifiedruntime/opal/Cargo.tomldiffbeforeafterboth
--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -35,6 +35,7 @@
     'pallet-nonfungible/runtime-benchmarks',
     'pallet-proxy-rmrk-core/runtime-benchmarks',
     'pallet-proxy-rmrk-equip/runtime-benchmarks',
+    'pallet-foreign-assets/runtime-benchmarks',
     'pallet-unique/runtime-benchmarks',
     'pallet-inflation/runtime-benchmarks',
     'pallet-unique-scheduler/runtime-benchmarks',
modifiedruntime/quartz/Cargo.tomldiffbeforeafterboth
--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -36,6 +36,7 @@
     'pallet-proxy-rmrk-core/runtime-benchmarks',
     'pallet-proxy-rmrk-equip/runtime-benchmarks',
     'pallet-unique/runtime-benchmarks',
+    'pallet-foreign-assets/runtime-benchmarks',
     'pallet-inflation/runtime-benchmarks',
     'pallet-unique-scheduler/runtime-benchmarks',
     'pallet-xcm/runtime-benchmarks',
modifiedruntime/unique/Cargo.tomldiffbeforeafterboth
--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -36,6 +36,7 @@
     'pallet-proxy-rmrk-core/runtime-benchmarks',
     'pallet-proxy-rmrk-equip/runtime-benchmarks',
     'pallet-unique/runtime-benchmarks',
+    'pallet-foreign-assets/runtime-benchmarks',
     'pallet-inflation/runtime-benchmarks',
     'pallet-unique-scheduler/runtime-benchmarks',
     'pallet-xcm/runtime-benchmarks',