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

difftreelog

CORE-302 Add EvmCollection Pallet

Trubnikov Sergey2022-04-18parent: #f15380e.patch.diff
in: master

24 files changed

modifiedCargo.lockdiffbeforeafterboth
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5504,6 +5504,7 @@
  "pallet-ethereum",
  "pallet-evm",
  "pallet-evm-coder-substrate",
+ "pallet-evm-collection",
  "pallet-evm-contract-helpers",
  "pallet-evm-migration",
  "pallet-evm-transaction-payment",
@@ -6075,6 +6076,28 @@
 ]
 
 [[package]]
+name = "pallet-evm-collection"
+version = "0.1.0"
+dependencies = [
+ "ethereum",
+ "evm-coder",
+ "fp-evm-mapping",
+ "frame-support",
+ "frame-system",
+ "log",
+ "pallet-common",
+ "pallet-evm",
+ "pallet-evm-coder-substrate",
+ "pallet-nonfungible",
+ "parity-scale-codec",
+ "scale-info",
+ "sp-core",
+ "sp-runtime",
+ "sp-std",
+ "up-data-structs",
+]
+
+[[package]]
 name = "pallet-evm-contract-helpers"
 version = "0.1.0"
 dependencies = [
@@ -8784,6 +8807,7 @@
  "pallet-ethereum",
  "pallet-evm",
  "pallet-evm-coder-substrate",
+ "pallet-evm-collection",
  "pallet-evm-contract-helpers",
  "pallet-evm-migration",
  "pallet-evm-transaction-payment",
@@ -12845,6 +12869,7 @@
  "pallet-ethereum",
  "pallet-evm",
  "pallet-evm-coder-substrate",
+ "pallet-evm-collection",
  "pallet-evm-contract-helpers",
  "pallet-evm-migration",
  "pallet-evm-transaction-payment",
modifiedMakefilediffbeforeafterboth
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,9 @@
 CONTRACT_HELPERS_STUBS=./pallets/evm-contract-helpers/src/stubs/
 CONTRACT_HELPERS_ABI=./tests/src/eth/util/contractHelpersAbi.json
 
+COLLECTION_STUBS=./pallets/evm-collection/src/stubs/
+COLLECTION_ABI=./tests/src/eth/collectionAbi.json
+
 TESTS_API=./tests/src/eth/api/
 
 .PHONY: regenerate_solidity
@@ -32,6 +35,10 @@
 	PACKAGE=pallet-evm-contract-helpers NAME=eth::contract_helpers_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh
 	PACKAGE=pallet-evm-contract-helpers NAME=eth::contract_helpers_impl OUTPUT=$(CONTRACT_HELPERS_STUBS)/$@ ./.maintain/scripts/generate_sol.sh
 
+Collection.sol:
+	PACKAGE=pallet-evm-collection NAME=eth::contract_helpers_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh
+	PACKAGE=pallet-evm-collection NAME=eth::contract_helpers_impl OUTPUT=$(COLLECTION_STUBS)/$@ ./.maintain/scripts/generate_sol.sh
+
 UniqueFungible: UniqueFungible.sol
 	INPUT=$(FUNGIBLE_EVM_STUBS)/$< OUTPUT=$(FUNGIBLE_EVM_STUBS)/UniqueFungible.raw ./.maintain/scripts/compile_stub.sh
 	INPUT=$(FUNGIBLE_EVM_STUBS)/$< OUTPUT=$(FUNGIBLE_EVM_ABI) ./.maintain/scripts/generate_abi.sh
@@ -44,7 +51,11 @@
 	INPUT=$(CONTRACT_HELPERS_STUBS)/$< OUTPUT=$(CONTRACT_HELPERS_STUBS)/ContractHelpers.raw ./.maintain/scripts/compile_stub.sh
 	INPUT=$(CONTRACT_HELPERS_STUBS)/$< OUTPUT=$(CONTRACT_HELPERS_ABI) ./.maintain/scripts/generate_abi.sh
 
-evm_stubs: UniqueFungible UniqueNFT ContractHelpers
+Collection: Collection.sol
+	INPUT=$(COLLECTION_STUBS)/$< OUTPUT=$(COLLECTION_STUBS)/Collection.raw ./.maintain/scripts/compile_stub.sh
+	INPUT=$(COLLECTION_STUBS)/$< OUTPUT=$(COLLECTION_ABI) ./.maintain/scripts/generate_abi.sh
+
+evm_stubs: UniqueFungible UniqueNFT ContractHelpers Collection
 
 .PHONY: _bench
 _bench:
addedpallets/evm-collection/Cargo.tomldiffbeforeafterboth
--- /dev/null
+++ b/pallets/evm-collection/Cargo.toml
@@ -0,0 +1,49 @@
+[package]
+name = "pallet-evm-collection"
+version = "0.1.0"
+license = "GPLv3"
+edition = "2021"
+
+[dependencies]
+scale-info = { version = "2.0.1", default-features = false, features = [
+    "derive",
+] }
+ethereum = { version = "0.12.0", default-features = false }
+log = { default-features = false, version = "0.4.14" }
+
+# Substrate
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.21' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.21' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.21' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.21' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.21' }
+
+# Unique
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.21-logs" }
+fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.21-logs" }
+
+# Locals
+evm-coder = { default-features = false, path = '../../crates/evm-coder' }
+pallet-common = { default-features = false, path = '../../pallets/common' }
+pallet-evm-coder-substrate = { default-features = false, path = '../../pallets/evm-coder-substrate' }
+pallet-nonfungible = { default-features = false, path = '../../pallets/nonfungible' }
+up-data-structs = { default-features = false, path = '../../primitives/data-structs' }
+
+[dependencies.codec]
+default-features = false
+features = ['derive']
+package = 'parity-scale-codec'
+version = '3.1.2'
+
+[features]
+default = ["std"]
+std = [
+    "frame-support/std",
+    "frame-system/std",
+    "sp-runtime/std",
+    "sp-std/std",
+    "sp-core/std",
+    "evm-coder/std",
+    "pallet-evm-coder-substrate/std",
+    "pallet-evm/std",
+]
addedpallets/evm-collection/src/eth.rsdiffbeforeafterboth
--- /dev/null
+++ b/pallets/evm-collection/src/eth.rs
@@ -0,0 +1,169 @@
+// 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/>.
+
+use core::marker::PhantomData;
+use evm_coder::{abi::AbiWriter, execution::*, generate_stubgen, solidity_interface, types::*, ToLog};
+use ethereum as _;
+use pallet_common::CollectionById;
+use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder};
+use pallet_evm::{
+	ExitRevert, OnCreate, OnMethodCall, PrecompileResult, PrecompileFailure,
+	account::CrossAccountId, Pallet as PalletEvm,
+};
+use sp_core::H160;
+use up_data_structs::{
+	CreateCollectionData, MAX_COLLECTION_DESCRIPTION_LENGTH, MAX_TOKEN_PREFIX_LENGTH,
+	MAX_COLLECTION_NAME_LENGTH,
+};
+use crate::{Config, Pallet};
+use frame_support::traits::Get;
+
+use sp_std::vec::Vec;
+use alloc::format;
+
+struct EvmCollection<T: Config>(SubstrateRecorder<T>);
+impl<T: Config> WithRecorder<T> for EvmCollection<T> {
+	fn recorder(&self) -> &SubstrateRecorder<T> {
+		&self.0
+	}
+
+	fn into_recorder(self) -> SubstrateRecorder<T> {
+		self.0
+	}
+}
+
+#[derive(ToLog)]
+pub enum CollectionEvent {
+	CollectionCreated {
+		#[indexed]
+		owner: address,
+		#[indexed]
+		collection_id: address,
+	},
+}
+
+#[solidity_interface(name = "Collection")]
+impl<T: Config> EvmCollection<T> {
+	fn create_721_collection(
+		&self,
+		caller: caller,
+		name: string,
+		description: string,
+		token_prefix: string,
+	) -> Result<address> {
+		let caller = T::CrossAccountId::from_eth(caller);
+		let name = name
+			.encode_utf16()
+			.collect::<Vec<u16>>()
+			.try_into()
+			.map_err(|_| error_feild_too_long("name", MAX_COLLECTION_NAME_LENGTH))?;
+		let description = description
+			.encode_utf16()
+			.collect::<Vec<u16>>()
+			.try_into()
+			.map_err(|_| error_feild_too_long("description", MAX_COLLECTION_DESCRIPTION_LENGTH))?;
+		let token_prefix = token_prefix
+			.into_bytes()
+			.try_into()
+			.map_err(|_| error_feild_too_long("token_prefix", MAX_TOKEN_PREFIX_LENGTH))?;
+
+		let data = CreateCollectionData {
+			name,
+			description,
+			token_prefix,
+			..Default::default()
+		};
+
+		let collection_id =
+			<pallet_nonfungible::Pallet<T>>::init_collection(caller.as_sub().clone(), data)
+				.map_err(pallet_evm_coder_substrate::dispatch_to_evm::<T>)?;
+
+		let address = pallet_common::eth::collection_id_to_address(collection_id);
+		<PalletEvm<T>>::deposit_log(
+			CollectionEvent::CollectionCreated {
+				owner: *caller.as_eth(),
+				collection_id: address,
+			}
+			.to_log(address),
+		);
+		Ok(address)
+	}
+
+	// fn set_sponsor(collection_id: address, sponsor: address) -> Result<void> {
+	// 	let collection_id =
+	// 		pallet_common::eth::map_eth_to_id(&collection_id).ok_or(Error::Revert("".into()))?;
+	// 	let mut collection = <CollectionById<T>>::get(collection_id).ok_or(Error::Revert("".into()))?;
+	// 	let sponsor = T::CrossAccountId::from_eth(sponsor);
+	// 	collection.sponsorship = SponsorshipState::Unconfirmed(sponsor.as_sub().clone());
+	// 	<CollectionById<T>>::insert(collection_id, collection);
+	// 	Ok(())
+	// }
+
+	// fn set_offchain_shema(shema: string) -> Result<void> {
+	// 	Ok(())
+	// }
+
+	// fn set_const_on_chain_schema(shema: string) -> Result<void> {
+	// 	Ok(())
+	// }
+
+	// fn set_variable_on_chain_schema(shema: string) -> Result<void> {
+	// 	Ok(())
+	// }
+
+	// fn set_limits(limits: string) -> Result<void> {
+	// 	Ok(())
+	// }
+}
+
+fn error_feild_too_long(feild: &str, bound: u32) -> Error {
+	Error::Revert(format!("{} is too long. Max length is {}.", feild, bound))
+}
+
+pub struct CollectionOnMethodCall<T: Config>(PhantomData<*const T>);
+impl<T: Config> OnMethodCall<T> for CollectionOnMethodCall<T> {
+	fn is_reserved(contract: &sp_core::H160) -> bool {
+		contract == &T::ContractAddress::get()
+	}
+
+	fn is_used(contract: &sp_core::H160) -> bool {
+		contract == &T::ContractAddress::get()
+	}
+
+	fn call(
+		source: &sp_core::H160,
+		target: &sp_core::H160,
+		gas_left: u64,
+		input: &[u8],
+		value: sp_core::U256,
+	) -> Option<PrecompileResult> {
+		// TODO: Extract to another OnMethodCall handler
+		if target != &T::ContractAddress::get() {
+			return None;
+		}
+
+		let helpers = EvmCollection::<T>(SubstrateRecorder::<T>::new(gas_left));
+		pallet_evm_coder_substrate::call(*source, helpers, value, input)
+	}
+
+	fn get_code(contract: &sp_core::H160) -> Option<Vec<u8>> {
+		(contract == &T::ContractAddress::get())
+			.then(|| include_bytes!("./stubs/Collection.raw").to_vec())
+	}
+}
+
+generate_stubgen!(collection_impl, CollectionCall<()>, true);
+generate_stubgen!(collection_iface, CollectionCall<()>, false);
addedpallets/evm-collection/src/lib.rsdiffbeforeafterboth
--- /dev/null
+++ b/pallets/evm-collection/src/lib.rs
@@ -0,0 +1,53 @@
+// 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/>.
+
+#![cfg_attr(not(feature = "std"), no_std)]
+
+extern crate alloc;
+
+use codec::{Decode, Encode, MaxEncodedLen};
+pub use pallet::*;
+pub use eth::*;
+use scale_info::TypeInfo;
+pub mod eth;
+
+#[frame_support::pallet]
+pub mod pallet {
+	pub use super::*;
+	use evm_coder::execution::Result;
+	use frame_support::pallet_prelude::*;
+	use sp_core::H160;
+
+	#[pallet::config]
+	pub trait Config:
+		frame_system::Config + pallet_evm_coder_substrate::Config + pallet_evm::account::Config + pallet_nonfungible::Config
+	{
+		type ContractAddress: Get<H160>;
+	}
+
+	#[pallet::error]
+	pub enum Error<T> {
+		/// This method is only executable by owner
+		NoPermission,
+	}
+
+	#[pallet::pallet]
+	// #[pallet::generate_store(pub(super) trait Store)]
+	pub struct Pallet<T>(_);
+
+
+	impl<T: Config> Pallet<T> {}
+}
addedpallets/evm-collection/src/stubs/Collection.rawdiffbeforeafterboth

binary blob — no preview

addedpallets/evm-collection/src/stubs/Collection.soldiffbeforeafterboth
--- /dev/null
+++ b/pallets/evm-collection/src/stubs/Collection.sol
@@ -0,0 +1,161 @@
+// SPDX-License-Identifier: OTHER
+// This code is automatically generated
+
+pragma solidity >=0.8.0 <0.9.0;
+
+// Common stubs holder
+contract Dummy {
+	uint8 dummy;
+	string stub_error = "this contract is implemented in native";
+}
+
+contract ERC165 is Dummy {
+	function supportsInterface(bytes4 interfaceID)
+		external
+		view
+		returns (bool)
+	{
+		require(false, stub_error);
+		interfaceID;
+		return true;
+	}
+}
+
+// Selector: ee5467a8
+contract Collection is Dummy, ERC165 {
+	// Selector: contractOwner(address) 5152b14c
+	function contractOwner(address contractAddress)
+		public
+		view
+		returns (address)
+	{
+		require(false, stub_error);
+		contractAddress;
+		dummy;
+		return 0x0000000000000000000000000000000000000000;
+	}
+
+	// Selector: sponsoringEnabled(address) 6027dc61
+	function sponsoringEnabled(address contractAddress)
+		public
+		view
+		returns (bool)
+	{
+		require(false, stub_error);
+		contractAddress;
+		dummy;
+		return false;
+	}
+
+	// Deprecated
+	//
+	// Selector: toggleSponsoring(address,bool) fcac6d86
+	function toggleSponsoring(address contractAddress, bool enabled) public {
+		require(false, stub_error);
+		contractAddress;
+		enabled;
+		dummy = 0;
+	}
+
+	// Selector: setSponsoringMode(address,uint8) fde8a560
+	function setSponsoringMode(address contractAddress, uint8 mode) public {
+		require(false, stub_error);
+		contractAddress;
+		mode;
+		dummy = 0;
+	}
+
+	// Selector: sponsoringMode(address) b70c7267
+	function sponsoringMode(address contractAddress)
+		public
+		view
+		returns (uint8)
+	{
+		require(false, stub_error);
+		contractAddress;
+		dummy;
+		return 0;
+	}
+
+	// Selector: setSponsoringRateLimit(address,uint32) 77b6c908
+	function setSponsoringRateLimit(address contractAddress, uint32 rateLimit)
+		public
+	{
+		require(false, stub_error);
+		contractAddress;
+		rateLimit;
+		dummy = 0;
+	}
+
+	// Selector: getSponsoringRateLimit(address) 610cfabd
+	function getSponsoringRateLimit(address contractAddress)
+		public
+		view
+		returns (uint32)
+	{
+		require(false, stub_error);
+		contractAddress;
+		dummy;
+		return 0;
+	}
+
+	// Selector: allowed(address,address) 5c658165
+	function allowed(address contractAddress, address user)
+		public
+		view
+		returns (bool)
+	{
+		require(false, stub_error);
+		contractAddress;
+		user;
+		dummy;
+		return false;
+	}
+
+	// Selector: allowlistEnabled(address) c772ef6c
+	function allowlistEnabled(address contractAddress)
+		public
+		view
+		returns (bool)
+	{
+		require(false, stub_error);
+		contractAddress;
+		dummy;
+		return false;
+	}
+
+	// Selector: toggleAllowlist(address,bool) 36de20f5
+	function toggleAllowlist(address contractAddress, bool enabled) public {
+		require(false, stub_error);
+		contractAddress;
+		enabled;
+		dummy = 0;
+	}
+
+	// Selector: toggleAllowed(address,address,bool) 4706cc1c
+	function toggleAllowed(
+		address contractAddress,
+		address user,
+		bool allowed
+	) public {
+		require(false, stub_error);
+		contractAddress;
+		user;
+		allowed;
+		dummy = 0;
+	}
+
+	// Selector: create721Collection(string,string,string) 951c0151
+	function create721Collection(
+		string memory name,
+		string memory description,
+		string memory tokenPrefix
+	) public view returns (address) {
+		require(false, stub_error);
+		name;
+		description;
+		tokenPrefix;
+		dummy;
+		return 0x0000000000000000000000000000000000000000;
+	}
+}
modifiedpallets/evm-contract-helpers/src/eth.rsdiffbeforeafterboth
--- a/pallets/evm-contract-helpers/src/eth.rs
+++ b/pallets/evm-contract-helpers/src/eth.rs
@@ -20,20 +20,15 @@
 use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder};
 use pallet_evm::{
 	ExitRevert, OnCreate, OnMethodCall, PrecompileResult, PrecompileFailure,
-	account::CrossAccountId, Pallet as PalletEvm
+	account::CrossAccountId
 };
 use sp_core::H160;
-use up_data_structs::{
-	CreateCollectionData, MAX_COLLECTION_DESCRIPTION_LENGTH, MAX_TOKEN_PREFIX_LENGTH,
-	MAX_COLLECTION_NAME_LENGTH,
-};
 use crate::{
 	AllowlistEnabled, Config, Owner, Pallet, SponsorBasket, SponsoringRateLimit, SponsoringModeT,
 };
 use frame_support::traits::Get;
 use up_sponsorship::SponsorshipHandler;
 use sp_std::vec::Vec;
-use alloc::format;
 
 struct ContractHelpers<T: Config>(SubstrateRecorder<T>);
 impl<T: Config> WithRecorder<T> for ContractHelpers<T> {
@@ -142,56 +137,6 @@
 		<Pallet<T>>::toggle_allowed(contract_address, user, allowed);
 		Ok(())
 	}
-
-	fn create_721_collection(
-		&self,
-		caller: caller,
-		name: string,
-		description: string,
-		token_prefix: string,
-	) -> Result<address> {
-		let caller = T::CrossAccountId::from_eth(caller);
-		let name = name
-			.encode_utf16()
-			.collect::<Vec<u16>>()
-			.try_into()
-			.map_err(|_| error_feild_too_long("name", MAX_COLLECTION_NAME_LENGTH))?;
-		let description = description
-			.encode_utf16()
-			.collect::<Vec<u16>>()
-			.try_into()
-			.map_err(|_| error_feild_too_long("description", MAX_COLLECTION_DESCRIPTION_LENGTH))?;
-		let token_prefix = token_prefix
-			.into_bytes()
-			.try_into()
-			.map_err(|_| error_feild_too_long("token_prefix", MAX_TOKEN_PREFIX_LENGTH))?;
-
-		let data = CreateCollectionData {
-			name,
-			description,
-			token_prefix,
-			..Default::default()
-		};
-
-		let collection_id =
-			<pallet_nonfungible::Pallet<T>>::init_collection(caller.as_sub().clone(), data)
-				.map_err(pallet_evm_coder_substrate::dispatch_to_evm::<T>)?;
-
-		let address = pallet_common::eth::collection_id_to_address(collection_id);
-
-		<PalletEvm<T>>::deposit_log(
-			ContractHelperEvent::CollectionCreated {
-				owner: *caller.as_eth(),
-				collection_id: address,
-			}
-			.to_log(address),
-		);
-		Ok(address)
-	}
-}
-
-fn error_feild_too_long(feild: &str, bound: u32) -> Error {
-	Error::Revert(format!("{} is too long. Max length is {}.", feild, bound))
 }
 
 pub struct HelpersOnMethodCall<T: Config>(PhantomData<*const T>);
modifiedpallets/evm-contract-helpers/src/lib.rsdiffbeforeafterboth
--- a/pallets/evm-contract-helpers/src/lib.rs
+++ b/pallets/evm-contract-helpers/src/lib.rs
@@ -16,9 +16,6 @@
 
 #![cfg_attr(not(feature = "std"), no_std)]
 
-#[macro_use(format)]
-extern crate alloc;
-
 use codec::{Decode, Encode, MaxEncodedLen};
 pub use pallet::*;
 pub use eth::*;
addedpallets/evm-contract-helpers/src/stubs/Collection.soldiffbeforeafterboth
--- /dev/null
+++ b/pallets/evm-contract-helpers/src/stubs/Collection.sol
@@ -0,0 +1,192 @@
+// SPDX-License-Identifier: OTHER
+// This code is automatically generated
+
+pragma solidity >=0.8.0 <0.9.0;
+
+// Common stubs holder
+contract Dummy {
+	uint8 dummy;
+	string stub_error = "this contract is implemented in native";
+}
+
+contract ERC165 is Dummy {
+	function supportsInterface(bytes4 interfaceID)
+		external
+		view
+		returns (bool)
+	{
+		require(false, stub_error);
+		interfaceID;
+		return true;
+	}
+}
+
+// Selector: 61f17ed8
+contract ContractHelpers is Dummy, ERC165 {
+	// Selector: contractOwner(address) 5152b14c
+	function contractOwner(address contractAddress)
+		public
+		view
+		returns (address)
+	{
+		require(false, stub_error);
+		contractAddress;
+		dummy;
+		return 0x0000000000000000000000000000000000000000;
+	}
+
+	// Selector: sponsoringEnabled(address) 6027dc61
+	function sponsoringEnabled(address contractAddress)
+		public
+		view
+		returns (bool)
+	{
+		require(false, stub_error);
+		contractAddress;
+		dummy;
+		return false;
+	}
+
+	// Deprecated
+	//
+	// Selector: toggleSponsoring(address,bool) fcac6d86
+	function toggleSponsoring(address contractAddress, bool enabled) public {
+		require(false, stub_error);
+		contractAddress;
+		enabled;
+		dummy = 0;
+	}
+
+	// Selector: setSponsoringMode(address,uint8) fde8a560
+	function setSponsoringMode(address contractAddress, uint8 mode) public {
+		require(false, stub_error);
+		contractAddress;
+		mode;
+		dummy = 0;
+	}
+
+	// Selector: sponsoringMode(address) b70c7267
+	function sponsoringMode(address contractAddress)
+		public
+		view
+		returns (uint8)
+	{
+		require(false, stub_error);
+		contractAddress;
+		dummy;
+		return 0;
+	}
+
+	// Selector: setSponsoringRateLimit(address,uint32) 77b6c908
+	function setSponsoringRateLimit(address contractAddress, uint32 rateLimit)
+		public
+	{
+		require(false, stub_error);
+		contractAddress;
+		rateLimit;
+		dummy = 0;
+	}
+
+	// Selector: getSponsoringRateLimit(address) 610cfabd
+	function getSponsoringRateLimit(address contractAddress)
+		public
+		view
+		returns (uint32)
+	{
+		require(false, stub_error);
+		contractAddress;
+		dummy;
+		return 0;
+	}
+
+	// Selector: allowed(address,address) 5c658165
+	function allowed(address contractAddress, address user)
+		public
+		view
+		returns (bool)
+	{
+		require(false, stub_error);
+		contractAddress;
+		user;
+		dummy;
+		return false;
+	}
+
+	// Selector: allowlistEnabled(address) c772ef6c
+	function allowlistEnabled(address contractAddress)
+		public
+		view
+		returns (bool)
+	{
+		require(false, stub_error);
+		contractAddress;
+		dummy;
+		return false;
+	}
+
+	// Selector: toggleAllowlist(address,bool) 36de20f5
+	function toggleAllowlist(address contractAddress, bool enabled) public {
+		require(false, stub_error);
+		contractAddress;
+		enabled;
+		dummy = 0;
+	}
+
+	// Selector: toggleAllowed(address,address,bool) 4706cc1c
+	function toggleAllowed(
+		address contractAddress,
+		address user,
+		bool allowed
+	) public {
+		require(false, stub_error);
+		contractAddress;
+		user;
+		allowed;
+		dummy = 0;
+	}
+
+	// Selector: create721Collection(string,string,string) 951c0151
+	function create721Collection(
+		string memory name,
+		string memory description,
+		string memory tokenPrefix
+	) public view returns (address) {
+		require(false, stub_error);
+		name;
+		description;
+		tokenPrefix;
+		dummy;
+		return 0x0000000000000000000000000000000000000000;
+	}
+
+	// Selector: setSponsor(address,address) f01fba93
+	function setSponsor(address collectionId, address sponsor) public pure {
+		require(false, stub_error);
+		collectionId;
+		sponsor;
+	}
+
+	// Selector: setOffchainShema(string) c3aa408b
+	function setOffchainShema(string memory shema) public pure {
+		require(false, stub_error);
+		shema;
+	}
+
+	// Selector: setConstOnChainSchema(string) b284d8df
+	function setConstOnChainSchema(string memory shema) public pure {
+		require(false, stub_error);
+		shema;
+	}
+
+	// Selector: setVariableOnChainSchema(string) 7c5f0fea
+	function setVariableOnChainSchema(string memory shema) public pure {
+		require(false, stub_error);
+		shema;
+	}
+
+	// Selector: setLimits(string) 72cb345d
+	function setLimits(string memory limits) public pure {
+		require(false, stub_error);
+		limits;
+	}
+}
modifiedpallets/evm-contract-helpers/src/stubs/ContractHelpers.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/evm-contract-helpers/src/stubs/ContractHelpers.soldiffbeforeafterboth
--- a/pallets/evm-contract-helpers/src/stubs/ContractHelpers.sol
+++ b/pallets/evm-contract-helpers/src/stubs/ContractHelpers.sol
@@ -21,7 +21,7 @@
 	}
 }
 
-// Selector: ee5467a8
+// Selector: 7b4866f9
 contract ContractHelpers is Dummy, ERC165 {
 	// Selector: contractOwner(address) 5152b14c
 	function contractOwner(address contractAddress)
@@ -143,19 +143,5 @@
 		user;
 		allowed;
 		dummy = 0;
-	}
-
-	// Selector: create721Collection(string,string,string) 951c0151
-	function create721Collection(
-		string memory name,
-		string memory description,
-		string memory tokenPrefix
-	) public view returns (address) {
-		require(false, stub_error);
-		name;
-		description;
-		tokenPrefix;
-		dummy;
-		return 0x0000000000000000000000000000000000000000;
 	}
 }
modifiedruntime/opal/Cargo.tomldiffbeforeafterboth
--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -74,6 +74,7 @@
     'pallet-evm/std',
     'pallet-evm-migration/std',
     'pallet-evm-contract-helpers/std',
+    'pallet-evm-collection/std',
     'pallet-evm-transaction-payment/std',
     'pallet-evm-coder-substrate/std',
     'pallet-ethereum/std',
@@ -417,6 +418,7 @@
 pallet-charge-transaction = { git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.21", package = "pallet-template-transaction-payment", default-features = false, version = "3.0.0" }
 pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }
 pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }
+pallet-evm-collection = { path = '../../pallets/evm-collection', default-features = false }
 pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }
 pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }
 pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.21-logs" }
modifiedruntime/opal/src/lib.rsdiffbeforeafterboth
--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/src/lib.rs
@@ -49,7 +49,7 @@
 // A few exports that help ease life for downstream crates.
 pub use pallet_balances::Call as BalancesCall;
 pub use pallet_evm::{
-	EnsureAddressTruncated, HashedAddressMapping, Runner, account::CrossAccountId as _,
+	EnsureAddressTruncated, HashedAddressMapping, Runner, account::CrossAccountId as _, OnMethodCall,
 };
 pub use frame_support::{
 	construct_runtime, match_types,
@@ -306,6 +306,7 @@
 		pallet_evm_migration::OnMethodCall<Self>,
 		pallet_evm_contract_helpers::HelpersOnMethodCall<Self>,
 		CollectionDispatchT<Self>,
+		pallet_evm_collection::CollectionOnMethodCall<Self>,
 	);
 	type OnCreate = pallet_evm_contract_helpers::HelpersOnCreate<Self>;
 	type ChainId = ChainId;
@@ -974,6 +975,11 @@
 	pub const HelpersContractAddress: H160 = H160([
 		0x84, 0x28, 0x99, 0xec, 0xf3, 0x80, 0x55, 0x3e, 0x8a, 0x4d, 0xe7, 0x5b, 0xf5, 0x34, 0xcd, 0xf6, 0xfb, 0xf6, 0x40, 0x49,
 	]);
+	
+	// 0x6c4e9fe1ae37a41e93cee429e8e1881abdcbb54f
+	pub const EvmCollectionAddress: H160 = H160([
+		0x6c, 0x4e, 0x9f, 0xe1, 0xae, 0x37, 0xa4, 0x1e, 0x93, 0xce, 0xe4, 0x29, 0xe8, 0xe1, 0x88, 0x1a, 0xbd, 0xcb, 0xb5, 0x4f,
+	]);
 }
 
 impl pallet_evm_contract_helpers::Config for Runtime {
@@ -981,6 +987,10 @@
 	type DefaultSponsoringRateLimit = DefaultSponsoringRateLimit;
 }
 
+impl pallet_evm_collection::Config for Runtime {
+	type ContractAddress = EvmCollectionAddress;
+}
+
 construct_runtime!(
 	pub enum Runtime where
 		Block = Block,
@@ -1033,6 +1043,7 @@
 		EvmContractHelpers: pallet_evm_contract_helpers::{Pallet, Storage} = 151,
 		EvmTransactionPayment: pallet_evm_transaction_payment::{Pallet} = 152,
 		EvmMigration: pallet_evm_migration::{Pallet, Call, Storage} = 153,
+		EvmCollection: pallet_evm_collection::{Pallet} = 154,
 	}
 );
 
modifiedruntime/quartz/Cargo.tomldiffbeforeafterboth
--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -74,6 +74,7 @@
     'pallet-evm/std',
     'pallet-evm-migration/std',
     'pallet-evm-contract-helpers/std',
+    'pallet-evm-collection/std',
     'pallet-evm-transaction-payment/std',
     'pallet-evm-coder-substrate/std',
     'pallet-ethereum/std',
@@ -422,6 +423,7 @@
 pallet-charge-transaction = { git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.21", package = "pallet-template-transaction-payment", default-features = false, version = "3.0.0" }
 pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }
 pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }
+pallet-evm-collection = { path = '../../pallets/evm-collection', default-features = false }
 pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }
 pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }
 pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.21-logs" }
modifiedruntime/quartz/src/lib.rsdiffbeforeafterboth
--- a/runtime/quartz/src/lib.rs
+++ b/runtime/quartz/src/lib.rs
@@ -79,7 +79,7 @@
 };
 use smallvec::smallvec;
 use codec::{Encode, Decode};
-use pallet_evm::{Account as EVMAccount, FeeCalculator, GasWeightMapping};
+use pallet_evm::{Account as EVMAccount, FeeCalculator, GasWeightMapping, OnMethodCall};
 use fp_rpc::TransactionStatus;
 use sp_runtime::{
 	traits::{BlockNumberProvider, Dispatchable, PostDispatchInfoOf, Saturating},
@@ -278,6 +278,7 @@
 		pallet_evm_migration::OnMethodCall<Self>,
 		pallet_evm_contract_helpers::HelpersOnMethodCall<Self>,
 		CollectionDispatchT<Self>,
+		pallet_evm_collection::CollectionOnMethodCall<Self>,
 	);
 	type OnCreate = pallet_evm_contract_helpers::HelpersOnCreate<Self>;
 	type ChainId = ChainId;
@@ -951,6 +952,11 @@
 	pub const HelpersContractAddress: H160 = H160([
 		0x84, 0x28, 0x99, 0xec, 0xf3, 0x80, 0x55, 0x3e, 0x8a, 0x4d, 0xe7, 0x5b, 0xf5, 0x34, 0xcd, 0xf6, 0xfb, 0xf6, 0x40, 0x49,
 	]);
+		
+	// 0x6c4e9fe1ae37a41e93cee429e8e1881abdcbb54f
+	pub const EvmCollectionAddress: H160 = H160([
+		0x6c, 0x4e, 0x9f, 0xe1, 0xae, 0x37, 0xa4, 0x1e, 0x93, 0xce, 0xe4, 0x29, 0xe8, 0xe1, 0x88, 0x1a, 0xbd, 0xcb, 0xb5, 0x4f,
+	]);
 }
 
 impl pallet_evm_contract_helpers::Config for Runtime {
@@ -958,6 +964,10 @@
 	type DefaultSponsoringRateLimit = DefaultSponsoringRateLimit;
 }
 
+impl pallet_evm_collection::Config for Runtime {
+	type ContractAddress = EvmCollectionAddress;
+}
+
 construct_runtime!(
 	pub enum Runtime where
 		Block = Block,
@@ -1010,6 +1020,7 @@
 		EvmContractHelpers: pallet_evm_contract_helpers::{Pallet, Storage} = 151,
 		EvmTransactionPayment: pallet_evm_transaction_payment::{Pallet} = 152,
 		EvmMigration: pallet_evm_migration::{Pallet, Call, Storage} = 153,
+		EvmCollection: pallet_evm_collection::{Pallet} = 154,
 	}
 );
 
modifiedruntime/unique/Cargo.tomldiffbeforeafterboth
before · runtime/unique/Cargo.toml
1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Unique Runtime'8edition = '2021'9homepage = 'https://unique.network'10license = 'GPLv3'11name = 'unique-runtime'12repository = 'https://github.com/UniqueNetwork/unique-chain'13version = '0.9.18'1415[package.metadata.docs.rs]16targets = ['x86_64-unknown-linux-gnu']1718[features]19default = ['std']20runtime-benchmarks = [21    'hex-literal',22    'frame-benchmarking',23    'frame-support/runtime-benchmarks',24    'frame-system-benchmarking',25    'frame-system/runtime-benchmarks',26    'pallet-ethereum/runtime-benchmarks',27    'pallet-evm-migration/runtime-benchmarks',28    'pallet-evm-coder-substrate/runtime-benchmarks',29    'pallet-balances/runtime-benchmarks',30    'pallet-timestamp/runtime-benchmarks',31    'pallet-common/runtime-benchmarks',32    'pallet-structure/runtime-benchmarks',33    'pallet-fungible/runtime-benchmarks',34    'pallet-refungible/runtime-benchmarks',35    'pallet-nonfungible/runtime-benchmarks',36    'pallet-proxy-rmrk-core/runtime-benchmarks',37    'pallet-unique/runtime-benchmarks',38    'pallet-inflation/runtime-benchmarks',39    'pallet-xcm/runtime-benchmarks',40    'sp-runtime/runtime-benchmarks',41    'xcm-builder/runtime-benchmarks',42    'up-data-structs/runtime-benchmarks',43]44try-runtime = [45    'frame-try-runtime',46    'frame-executive/try-runtime',47    'frame-system/try-runtime',48]49std = [50    'codec/std',51    'cumulus-pallet-aura-ext/std',52    'cumulus-pallet-parachain-system/std',53    'cumulus-pallet-xcm/std',54    'cumulus-pallet-xcmp-queue/std',55    'cumulus-primitives-core/std',56    'cumulus-primitives-utility/std',57    'frame-try-runtime/std',58    'frame-executive/std',59    'frame-support/std',60    'frame-system/std',61    'frame-system-rpc-runtime-api/std',62    'pallet-aura/std',63    'pallet-balances/std',64    # 'pallet-contracts/std',65    # 'pallet-contracts-primitives/std',66    # 'pallet-contracts-rpc-runtime-api/std',67    # 'pallet-contract-helpers/std',68    'pallet-randomness-collective-flip/std',69    'pallet-sudo/std',70    'pallet-timestamp/std',71    'pallet-transaction-payment/std',72    'pallet-transaction-payment-rpc-runtime-api/std',73    'pallet-treasury/std',74    # 'pallet-vesting/std',75    'pallet-evm/std',76    'pallet-evm-migration/std',77    'pallet-evm-contract-helpers/std',78    'pallet-evm-transaction-payment/std',79    'pallet-evm-coder-substrate/std',80    'pallet-ethereum/std',81    'pallet-base-fee/std',82    'fp-rpc/std',83    'up-rpc/std',84    'fp-evm-mapping/std',85    'fp-self-contained/std',86    'parachain-info/std',87    'serde',88    'pallet-inflation/std',89    'pallet-common/std',90    'pallet-structure/std',91    'pallet-fungible/std',92    'pallet-refungible/std',93    'pallet-nonfungible/std',94    'pallet-proxy-rmrk-core/std',95    'pallet-unique/std',96    'pallet-unq-scheduler/std',97    'pallet-charge-transaction/std',98    'up-data-structs/std',99    'sp-api/std',100    'sp-block-builder/std',101    "sp-consensus-aura/std",102    'sp-core/std',103    'sp-inherents/std',104    'sp-io/std',105    'sp-offchain/std',106    'sp-runtime/std',107    'sp-session/std',108    'sp-std/std',109    'sp-transaction-pool/std',110    'sp-version/std',111    'xcm/std',112    'xcm-builder/std',113    'xcm-executor/std',114    'unique-runtime-common/std',115116    "orml-vesting/std",117]118limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']119120################################################################################121# Substrate Dependencies122123[dependencies.codec]124default-features = false125features = ['derive']126package = 'parity-scale-codec'127version = '3.1.2'128129[dependencies.frame-benchmarking]130default-features = false131git = "https://github.com/paritytech/substrate"132optional = true133branch = "polkadot-v0.9.21"134135[dependencies.frame-try-runtime]136default-features = false137git = 'https://github.com/paritytech/substrate'138optional = true139branch = 'polkadot-v0.9.21'140141[dependencies.frame-executive]142default-features = false143git = "https://github.com/paritytech/substrate"144branch = "polkadot-v0.9.21"145146[dependencies.frame-support]147default-features = false148git = "https://github.com/paritytech/substrate"149branch = "polkadot-v0.9.21"150151[dependencies.frame-system]152default-features = false153git = "https://github.com/paritytech/substrate"154branch = "polkadot-v0.9.21"155156[dependencies.frame-system-benchmarking]157default-features = false158git = "https://github.com/paritytech/substrate"159optional = true160branch = "polkadot-v0.9.21"161162[dependencies.frame-system-rpc-runtime-api]163default-features = false164git = "https://github.com/paritytech/substrate"165branch = "polkadot-v0.9.21"166167[dependencies.hex-literal]168optional = true169version = '0.3.3'170171[dependencies.serde]172default-features = false173features = ['derive']174optional = true175version = '1.0.130'176177[dependencies.pallet-aura]178default-features = false179git = "https://github.com/paritytech/substrate"180branch = "polkadot-v0.9.21"181182[dependencies.pallet-balances]183default-features = false184git = "https://github.com/paritytech/substrate"185branch = "polkadot-v0.9.21"186187# Contracts specific packages188# [dependencies.pallet-contracts]189# git = 'https://github.com/paritytech/substrate'190# default-features = false191# branch = 'master'192# version = '4.0.0-dev'193194# [dependencies.pallet-contracts-primitives]195# git = 'https://github.com/paritytech/substrate'196# default-features = false197# branch = 'master'198# version = '4.0.0-dev'199200# [dependencies.pallet-contracts-rpc-runtime-api]201# git = 'https://github.com/paritytech/substrate'202# default-features = false203# branch = 'master'204# version = '4.0.0-dev'205206[dependencies.pallet-randomness-collective-flip]207default-features = false208git = "https://github.com/paritytech/substrate"209branch = "polkadot-v0.9.21"210211[dependencies.pallet-sudo]212default-features = false213git = "https://github.com/paritytech/substrate"214branch = "polkadot-v0.9.21"215216[dependencies.pallet-timestamp]217default-features = false218git = "https://github.com/paritytech/substrate"219branch = "polkadot-v0.9.21"220221[dependencies.pallet-transaction-payment]222default-features = false223git = "https://github.com/paritytech/substrate"224branch = "polkadot-v0.9.21"225226[dependencies.pallet-transaction-payment-rpc-runtime-api]227default-features = false228git = "https://github.com/paritytech/substrate"229branch = "polkadot-v0.9.21"230231[dependencies.pallet-treasury]232default-features = false233git = "https://github.com/paritytech/substrate"234branch = "polkadot-v0.9.21"235236# [dependencies.pallet-vesting]237# default-features = false238# git = 'https://github.com/paritytech/substrate'239# branch = 'master'240241[dependencies.sp-arithmetic]242default-features = false243git = "https://github.com/paritytech/substrate"244branch = "polkadot-v0.9.21"245246[dependencies.sp-api]247default-features = false248git = "https://github.com/paritytech/substrate"249branch = "polkadot-v0.9.21"250251[dependencies.sp-block-builder]252default-features = false253git = "https://github.com/paritytech/substrate"254branch = "polkadot-v0.9.21"255256[dependencies.sp-core]257default-features = false258git = "https://github.com/paritytech/substrate"259branch = "polkadot-v0.9.21"260261[dependencies.sp-consensus-aura]262default-features = false263git = "https://github.com/paritytech/substrate"264branch = "polkadot-v0.9.21"265266[dependencies.sp-inherents]267default-features = false268git = "https://github.com/paritytech/substrate"269branch = "polkadot-v0.9.21"270271[dependencies.sp-io]272default-features = false273git = "https://github.com/paritytech/substrate"274branch = "polkadot-v0.9.21"275276[dependencies.sp-offchain]277default-features = false278git = "https://github.com/paritytech/substrate"279branch = "polkadot-v0.9.21"280281[dependencies.sp-runtime]282default-features = false283git = "https://github.com/paritytech/substrate"284branch = "polkadot-v0.9.21"285286[dependencies.sp-session]287default-features = false288git = "https://github.com/paritytech/substrate"289branch = "polkadot-v0.9.21"290291[dependencies.sp-std]292default-features = false293git = "https://github.com/paritytech/substrate"294branch = "polkadot-v0.9.21"295296[dependencies.sp-transaction-pool]297default-features = false298git = "https://github.com/paritytech/substrate"299branch = "polkadot-v0.9.21"300301[dependencies.sp-version]302default-features = false303git = "https://github.com/paritytech/substrate"304branch = "polkadot-v0.9.21"305306[dependencies.smallvec]307version = '1.6.1'308309################################################################################310# Cumulus dependencies311312[dependencies.parachain-info]313default-features = false314git = "https://github.com/uniquenetwork/cumulus"315branch = "polkadot-v0.9.21"316317[dependencies.cumulus-pallet-aura-ext]318git = "https://github.com/uniquenetwork/cumulus"319branch = "polkadot-v0.9.21"320default-features = false321322[dependencies.cumulus-pallet-parachain-system]323git = "https://github.com/uniquenetwork/cumulus"324branch = "polkadot-v0.9.21"325default-features = false326327[dependencies.cumulus-primitives-core]328git = "https://github.com/uniquenetwork/cumulus"329branch = "polkadot-v0.9.21"330default-features = false331332[dependencies.cumulus-pallet-xcm]333git = "https://github.com/uniquenetwork/cumulus"334branch = "polkadot-v0.9.21"335default-features = false336337[dependencies.cumulus-pallet-dmp-queue]338git = "https://github.com/uniquenetwork/cumulus"339branch = "polkadot-v0.9.21"340default-features = false341342[dependencies.cumulus-pallet-xcmp-queue]343git = "https://github.com/uniquenetwork/cumulus"344branch = "polkadot-v0.9.21"345default-features = false346347[dependencies.cumulus-primitives-utility]348git = "https://github.com/uniquenetwork/cumulus"349branch = "polkadot-v0.9.21"350default-features = false351352[dependencies.cumulus-primitives-timestamp]353git = "https://github.com/uniquenetwork/cumulus"354branch = "polkadot-v0.9.21"355default-features = false356357################################################################################358# Polkadot dependencies359360[dependencies.polkadot-parachain]361git = "https://github.com/paritytech/polkadot"362branch = "release-v0.9.21"363default-features = false364365[dependencies.xcm]366git = "https://github.com/paritytech/polkadot"367branch = "release-v0.9.21"368default-features = false369370[dependencies.xcm-builder]371git = "https://github.com/paritytech/polkadot"372branch = "release-v0.9.21"373default-features = false374375[dependencies.xcm-executor]376git = "https://github.com/paritytech/polkadot"377branch = "release-v0.9.21"378default-features = false379380[dependencies.pallet-xcm]381git = "https://github.com/paritytech/polkadot"382branch = "release-v0.9.21"383default-features = false384385[dependencies.orml-vesting]386git = "https://github.com/uniquenetwork/open-runtime-module-library"387branch = "unique-polkadot-v0.9.21"388version = "0.4.1-dev"389default-features = false390391################################################################################392# local dependencies393394[dependencies]395log = { version = "0.4.16", default-features = false }396unique-runtime-common = { path = "../common", default-features = false }397scale-info = { version = "2.0.1", default-features = false, features = [398    "derive",399] }400derivative = "2.2.0"401pallet-unique = { path = '../../pallets/unique', default-features = false }402up-rpc = { path = "../../primitives/rpc", default-features = false }403rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }404pallet-inflation = { path = '../../pallets/inflation', default-features = false }405up-data-structs = { path = '../../primitives/data-structs', default-features = false }406pallet-common = { default-features = false, path = "../../pallets/common" }407pallet-structure = { default-features = false, path = "../../pallets/structure" }408pallet-fungible = { default-features = false, path = "../../pallets/fungible" }409pallet-refungible = { default-features = false, path = "../../pallets/refungible" }410pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }411pallet-proxy-rmrk-core = { default-features = false, path = "../../pallets/proxy-rmrk-core", package = "pallet-rmrk-core" }412pallet-unq-scheduler = { path = '../../pallets/scheduler', default-features = false }413# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }414pallet-charge-transaction = { git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.21", package = "pallet-template-transaction-payment", default-features = false, version = "3.0.0" }415pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }416pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }417pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }418pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }419pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.21-logs" }420pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.21-logs" }421pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.21-logs" }422fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.21-logs" }423fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.21-logs" }424fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.21-logs" }425426################################################################################427# Build Dependencies428429[build-dependencies.substrate-wasm-builder]430git = "https://github.com/paritytech/substrate"431branch = "polkadot-v0.9.21"
after · runtime/unique/Cargo.toml
1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Unique Runtime'8edition = '2021'9homepage = 'https://unique.network'10license = 'GPLv3'11name = 'unique-runtime'12repository = 'https://github.com/UniqueNetwork/unique-chain'13version = '0.9.18'1415[package.metadata.docs.rs]16targets = ['x86_64-unknown-linux-gnu']1718[features]19default = ['std']20runtime-benchmarks = [21    'hex-literal',22    'frame-benchmarking',23    'frame-support/runtime-benchmarks',24    'frame-system-benchmarking',25    'frame-system/runtime-benchmarks',26    'pallet-ethereum/runtime-benchmarks',27    'pallet-evm-migration/runtime-benchmarks',28    'pallet-evm-coder-substrate/runtime-benchmarks',29    'pallet-balances/runtime-benchmarks',30    'pallet-timestamp/runtime-benchmarks',31    'pallet-common/runtime-benchmarks',32    'pallet-structure/runtime-benchmarks',33    'pallet-fungible/runtime-benchmarks',34    'pallet-refungible/runtime-benchmarks',35    'pallet-nonfungible/runtime-benchmarks',36    'pallet-proxy-rmrk-core/runtime-benchmarks',37    'pallet-unique/runtime-benchmarks',38    'pallet-inflation/runtime-benchmarks',39    'pallet-xcm/runtime-benchmarks',40    'sp-runtime/runtime-benchmarks',41    'xcm-builder/runtime-benchmarks',42    'up-data-structs/runtime-benchmarks',43]44try-runtime = [45    'frame-try-runtime',46    'frame-executive/try-runtime',47    'frame-system/try-runtime',48]49std = [50    'codec/std',51    'cumulus-pallet-aura-ext/std',52    'cumulus-pallet-parachain-system/std',53    'cumulus-pallet-xcm/std',54    'cumulus-pallet-xcmp-queue/std',55    'cumulus-primitives-core/std',56    'cumulus-primitives-utility/std',57    'frame-try-runtime/std',58    'frame-executive/std',59    'frame-support/std',60    'frame-system/std',61    'frame-system-rpc-runtime-api/std',62    'pallet-aura/std',63    'pallet-balances/std',64    # 'pallet-contracts/std',65    # 'pallet-contracts-primitives/std',66    # 'pallet-contracts-rpc-runtime-api/std',67    # 'pallet-contract-helpers/std',68    'pallet-randomness-collective-flip/std',69    'pallet-sudo/std',70    'pallet-timestamp/std',71    'pallet-transaction-payment/std',72    'pallet-transaction-payment-rpc-runtime-api/std',73    'pallet-treasury/std',74    # 'pallet-vesting/std',75    'pallet-evm/std',76    'pallet-evm-migration/std',77    'pallet-evm-contract-helpers/std',78    'pallet-evm-collection/std',79    'pallet-evm-transaction-payment/std',80    'pallet-evm-coder-substrate/std',81    'pallet-ethereum/std',82    'pallet-base-fee/std',83    'fp-rpc/std',84    'up-rpc/std',85    'fp-evm-mapping/std',86    'fp-self-contained/std',87    'parachain-info/std',88    'serde',89    'pallet-inflation/std',90    'pallet-common/std',91    'pallet-structure/std',92    'pallet-fungible/std',93    'pallet-refungible/std',94    'pallet-nonfungible/std',95    'pallet-proxy-rmrk-core/std',96    'pallet-unique/std',97    'pallet-unq-scheduler/std',98    'pallet-charge-transaction/std',99    'up-data-structs/std',100    'sp-api/std',101    'sp-block-builder/std',102    "sp-consensus-aura/std",103    'sp-core/std',104    'sp-inherents/std',105    'sp-io/std',106    'sp-offchain/std',107    'sp-runtime/std',108    'sp-session/std',109    'sp-std/std',110    'sp-transaction-pool/std',111    'sp-version/std',112    'xcm/std',113    'xcm-builder/std',114    'xcm-executor/std',115    'unique-runtime-common/std',116117    "orml-vesting/std",118]119limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']120121################################################################################122# Substrate Dependencies123124[dependencies.codec]125default-features = false126features = ['derive']127package = 'parity-scale-codec'128version = '3.1.2'129130[dependencies.frame-benchmarking]131default-features = false132git = "https://github.com/paritytech/substrate"133optional = true134branch = "polkadot-v0.9.21"135136[dependencies.frame-try-runtime]137default-features = false138git = 'https://github.com/paritytech/substrate'139optional = true140branch = 'polkadot-v0.9.21'141142[dependencies.frame-executive]143default-features = false144git = "https://github.com/paritytech/substrate"145branch = "polkadot-v0.9.21"146147[dependencies.frame-support]148default-features = false149git = "https://github.com/paritytech/substrate"150branch = "polkadot-v0.9.21"151152[dependencies.frame-system]153default-features = false154git = "https://github.com/paritytech/substrate"155branch = "polkadot-v0.9.21"156157[dependencies.frame-system-benchmarking]158default-features = false159git = "https://github.com/paritytech/substrate"160optional = true161branch = "polkadot-v0.9.21"162163[dependencies.frame-system-rpc-runtime-api]164default-features = false165git = "https://github.com/paritytech/substrate"166branch = "polkadot-v0.9.21"167168[dependencies.hex-literal]169optional = true170version = '0.3.3'171172[dependencies.serde]173default-features = false174features = ['derive']175optional = true176version = '1.0.130'177178[dependencies.pallet-aura]179default-features = false180git = "https://github.com/paritytech/substrate"181branch = "polkadot-v0.9.21"182183[dependencies.pallet-balances]184default-features = false185git = "https://github.com/paritytech/substrate"186branch = "polkadot-v0.9.21"187188# Contracts specific packages189# [dependencies.pallet-contracts]190# git = 'https://github.com/paritytech/substrate'191# default-features = false192# branch = 'master'193# version = '4.0.0-dev'194195# [dependencies.pallet-contracts-primitives]196# git = 'https://github.com/paritytech/substrate'197# default-features = false198# branch = 'master'199# version = '4.0.0-dev'200201# [dependencies.pallet-contracts-rpc-runtime-api]202# git = 'https://github.com/paritytech/substrate'203# default-features = false204# branch = 'master'205# version = '4.0.0-dev'206207[dependencies.pallet-randomness-collective-flip]208default-features = false209git = "https://github.com/paritytech/substrate"210branch = "polkadot-v0.9.21"211212[dependencies.pallet-sudo]213default-features = false214git = "https://github.com/paritytech/substrate"215branch = "polkadot-v0.9.21"216217[dependencies.pallet-timestamp]218default-features = false219git = "https://github.com/paritytech/substrate"220branch = "polkadot-v0.9.21"221222[dependencies.pallet-transaction-payment]223default-features = false224git = "https://github.com/paritytech/substrate"225branch = "polkadot-v0.9.21"226227[dependencies.pallet-transaction-payment-rpc-runtime-api]228default-features = false229git = "https://github.com/paritytech/substrate"230branch = "polkadot-v0.9.21"231232[dependencies.pallet-treasury]233default-features = false234git = "https://github.com/paritytech/substrate"235branch = "polkadot-v0.9.21"236237# [dependencies.pallet-vesting]238# default-features = false239# git = 'https://github.com/paritytech/substrate'240# branch = 'master'241242[dependencies.sp-arithmetic]243default-features = false244git = "https://github.com/paritytech/substrate"245branch = "polkadot-v0.9.21"246247[dependencies.sp-api]248default-features = false249git = "https://github.com/paritytech/substrate"250branch = "polkadot-v0.9.21"251252[dependencies.sp-block-builder]253default-features = false254git = "https://github.com/paritytech/substrate"255branch = "polkadot-v0.9.21"256257[dependencies.sp-core]258default-features = false259git = "https://github.com/paritytech/substrate"260branch = "polkadot-v0.9.21"261262[dependencies.sp-consensus-aura]263default-features = false264git = "https://github.com/paritytech/substrate"265branch = "polkadot-v0.9.21"266267[dependencies.sp-inherents]268default-features = false269git = "https://github.com/paritytech/substrate"270branch = "polkadot-v0.9.21"271272[dependencies.sp-io]273default-features = false274git = "https://github.com/paritytech/substrate"275branch = "polkadot-v0.9.21"276277[dependencies.sp-offchain]278default-features = false279git = "https://github.com/paritytech/substrate"280branch = "polkadot-v0.9.21"281282[dependencies.sp-runtime]283default-features = false284git = "https://github.com/paritytech/substrate"285branch = "polkadot-v0.9.21"286287[dependencies.sp-session]288default-features = false289git = "https://github.com/paritytech/substrate"290branch = "polkadot-v0.9.21"291292[dependencies.sp-std]293default-features = false294git = "https://github.com/paritytech/substrate"295branch = "polkadot-v0.9.21"296297[dependencies.sp-transaction-pool]298default-features = false299git = "https://github.com/paritytech/substrate"300branch = "polkadot-v0.9.21"301302[dependencies.sp-version]303default-features = false304git = "https://github.com/paritytech/substrate"305branch = "polkadot-v0.9.21"306307[dependencies.smallvec]308version = '1.6.1'309310################################################################################311# Cumulus dependencies312313[dependencies.parachain-info]314default-features = false315git = "https://github.com/uniquenetwork/cumulus"316branch = "polkadot-v0.9.21"317318[dependencies.cumulus-pallet-aura-ext]319git = "https://github.com/uniquenetwork/cumulus"320branch = "polkadot-v0.9.21"321default-features = false322323[dependencies.cumulus-pallet-parachain-system]324git = "https://github.com/uniquenetwork/cumulus"325branch = "polkadot-v0.9.21"326default-features = false327328[dependencies.cumulus-primitives-core]329git = "https://github.com/uniquenetwork/cumulus"330branch = "polkadot-v0.9.21"331default-features = false332333[dependencies.cumulus-pallet-xcm]334git = "https://github.com/uniquenetwork/cumulus"335branch = "polkadot-v0.9.21"336default-features = false337338[dependencies.cumulus-pallet-dmp-queue]339git = "https://github.com/uniquenetwork/cumulus"340branch = "polkadot-v0.9.21"341default-features = false342343[dependencies.cumulus-pallet-xcmp-queue]344git = "https://github.com/uniquenetwork/cumulus"345branch = "polkadot-v0.9.21"346default-features = false347348[dependencies.cumulus-primitives-utility]349git = "https://github.com/uniquenetwork/cumulus"350branch = "polkadot-v0.9.21"351default-features = false352353[dependencies.cumulus-primitives-timestamp]354git = "https://github.com/uniquenetwork/cumulus"355branch = "polkadot-v0.9.21"356default-features = false357358################################################################################359# Polkadot dependencies360361[dependencies.polkadot-parachain]362git = "https://github.com/paritytech/polkadot"363branch = "release-v0.9.21"364default-features = false365366[dependencies.xcm]367git = "https://github.com/paritytech/polkadot"368branch = "release-v0.9.21"369default-features = false370371[dependencies.xcm-builder]372git = "https://github.com/paritytech/polkadot"373branch = "release-v0.9.21"374default-features = false375376[dependencies.xcm-executor]377git = "https://github.com/paritytech/polkadot"378branch = "release-v0.9.21"379default-features = false380381[dependencies.pallet-xcm]382git = "https://github.com/paritytech/polkadot"383branch = "release-v0.9.21"384default-features = false385386[dependencies.orml-vesting]387git = "https://github.com/uniquenetwork/open-runtime-module-library"388branch = "unique-polkadot-v0.9.21"389version = "0.4.1-dev"390default-features = false391392################################################################################393# local dependencies394395[dependencies]396log = { version = "0.4.16", default-features = false }397unique-runtime-common = { path = "../common", default-features = false }398scale-info = { version = "2.0.1", default-features = false, features = [399    "derive",400] }401derivative = "2.2.0"402pallet-unique = { path = '../../pallets/unique', default-features = false }403up-rpc = { path = "../../primitives/rpc", default-features = false }404rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }405pallet-inflation = { path = '../../pallets/inflation', default-features = false }406up-data-structs = { path = '../../primitives/data-structs', default-features = false }407pallet-common = { default-features = false, path = "../../pallets/common" }408pallet-structure = { default-features = false, path = "../../pallets/structure" }409pallet-fungible = { default-features = false, path = "../../pallets/fungible" }410pallet-refungible = { default-features = false, path = "../../pallets/refungible" }411pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }412pallet-proxy-rmrk-core = { default-features = false, path = "../../pallets/proxy-rmrk-core", package = "pallet-rmrk-core" }413pallet-unq-scheduler = { path = '../../pallets/scheduler', default-features = false }414# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }415pallet-charge-transaction = { git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.21", package = "pallet-template-transaction-payment", default-features = false, version = "3.0.0" }416pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }417pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }418pallet-evm-collection = { path = '../../pallets/evm-collection', default-features = false }419pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }420pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }421pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.21-logs" }422pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.21-logs" }423pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.21-logs" }424fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.21-logs" }425fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.21-logs" }426fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.21-logs" }427428################################################################################429# Build Dependencies430431[build-dependencies.substrate-wasm-builder]432git = "https://github.com/paritytech/substrate"433branch = "polkadot-v0.9.21"
modifiedruntime/unique/src/lib.rsdiffbeforeafterboth
--- a/runtime/unique/src/lib.rs
+++ b/runtime/unique/src/lib.rs
@@ -49,7 +49,7 @@
 // A few exports that help ease life for downstream crates.
 pub use pallet_balances::Call as BalancesCall;
 pub use pallet_evm::{
-	EnsureAddressTruncated, HashedAddressMapping, Runner, account::CrossAccountId as _,
+	EnsureAddressTruncated, HashedAddressMapping, Runner, account::CrossAccountId as _, OnMethodCall,
 };
 pub use frame_support::{
 	construct_runtime, match_types,
@@ -282,6 +282,7 @@
 		pallet_evm_migration::OnMethodCall<Self>,
 		pallet_evm_contract_helpers::HelpersOnMethodCall<Self>,
 		CollectionDispatchT<Self>,
+		pallet_evm_collection::CollectionOnMethodCall<Self>,
 	);
 	type OnCreate = pallet_evm_contract_helpers::HelpersOnCreate<Self>;
 	type ChainId = ChainId;
@@ -956,6 +957,11 @@
 	pub const HelpersContractAddress: H160 = H160([
 		0x84, 0x28, 0x99, 0xec, 0xf3, 0x80, 0x55, 0x3e, 0x8a, 0x4d, 0xe7, 0x5b, 0xf5, 0x34, 0xcd, 0xf6, 0xfb, 0xf6, 0x40, 0x49,
 	]);
+		
+	// 0x6c4e9fe1ae37a41e93cee429e8e1881abdcbb54f
+	pub const EvmCollectionAddress: H160 = H160([
+		0x6c, 0x4e, 0x9f, 0xe1, 0xae, 0x37, 0xa4, 0x1e, 0x93, 0xce, 0xe4, 0x29, 0xe8, 0xe1, 0x88, 0x1a, 0xbd, 0xcb, 0xb5, 0x4f,
+	]);
 }
 
 impl pallet_evm_contract_helpers::Config for Runtime {
@@ -963,6 +969,10 @@
 	type DefaultSponsoringRateLimit = DefaultSponsoringRateLimit;
 }
 
+impl pallet_evm_collection::Config for Runtime {
+	type ContractAddress = EvmCollectionAddress;
+}
+
 construct_runtime!(
 	pub enum Runtime where
 		Block = Block,
@@ -1015,6 +1025,7 @@
 		EvmContractHelpers: pallet_evm_contract_helpers::{Pallet, Storage} = 151,
 		EvmTransactionPayment: pallet_evm_transaction_payment::{Pallet} = 152,
 		EvmMigration: pallet_evm_migration::{Pallet, Call, Storage} = 153,
+		EvmCollection: pallet_evm_collection::{Pallet} = 154,
 	}
 );
 
addedtests/src/eth/api/Collection.soldiffbeforeafterboth
--- /dev/null
+++ b/tests/src/eth/api/Collection.sol
@@ -0,0 +1,81 @@
+// SPDX-License-Identifier: OTHER
+// This code is automatically generated
+
+pragma solidity >=0.8.0 <0.9.0;
+
+// Common stubs holder
+interface Dummy {
+
+}
+
+interface ERC165 is Dummy {
+	function supportsInterface(bytes4 interfaceID) external view returns (bool);
+}
+
+// Selector: ee5467a8
+interface Collection is Dummy, ERC165 {
+	// Selector: contractOwner(address) 5152b14c
+	function contractOwner(address contractAddress)
+		external
+		view
+		returns (address);
+
+	// Selector: sponsoringEnabled(address) 6027dc61
+	function sponsoringEnabled(address contractAddress)
+		external
+		view
+		returns (bool);
+
+	// Deprecated
+	//
+	// Selector: toggleSponsoring(address,bool) fcac6d86
+	function toggleSponsoring(address contractAddress, bool enabled) external;
+
+	// Selector: setSponsoringMode(address,uint8) fde8a560
+	function setSponsoringMode(address contractAddress, uint8 mode) external;
+
+	// Selector: sponsoringMode(address) b70c7267
+	function sponsoringMode(address contractAddress)
+		external
+		view
+		returns (uint8);
+
+	// Selector: setSponsoringRateLimit(address,uint32) 77b6c908
+	function setSponsoringRateLimit(address contractAddress, uint32 rateLimit)
+		external;
+
+	// Selector: getSponsoringRateLimit(address) 610cfabd
+	function getSponsoringRateLimit(address contractAddress)
+		external
+		view
+		returns (uint32);
+
+	// Selector: allowed(address,address) 5c658165
+	function allowed(address contractAddress, address user)
+		external
+		view
+		returns (bool);
+
+	// Selector: allowlistEnabled(address) c772ef6c
+	function allowlistEnabled(address contractAddress)
+		external
+		view
+		returns (bool);
+
+	// Selector: toggleAllowlist(address,bool) 36de20f5
+	function toggleAllowlist(address contractAddress, bool enabled) external;
+
+	// Selector: toggleAllowed(address,address,bool) 4706cc1c
+	function toggleAllowed(
+		address contractAddress,
+		address user,
+		bool allowed
+	) external;
+
+	// Selector: create721Collection(string,string,string) 951c0151
+	function create721Collection(
+		string memory name,
+		string memory description,
+		string memory tokenPrefix
+	) external view returns (address);
+}
modifiedtests/src/eth/api/ContractHelpers.soldiffbeforeafterboth
--- a/tests/src/eth/api/ContractHelpers.sol
+++ b/tests/src/eth/api/ContractHelpers.sol
@@ -12,7 +12,7 @@
 	function supportsInterface(bytes4 interfaceID) external view returns (bool);
 }
 
-// Selector: ee5467a8
+// Selector: 7b4866f9
 interface ContractHelpers is Dummy, ERC165 {
 	// Selector: contractOwner(address) 5152b14c
 	function contractOwner(address contractAddress)
@@ -71,11 +71,4 @@
 		address user,
 		bool allowed
 	) external;
-
-	// Selector: create721Collection(string,string,string) 951c0151
-	function create721Collection(
-		string memory name,
-		string memory description,
-		string memory tokenPrefix
-	) external view returns (address);
 }
addedtests/src/eth/collectionAbi.jsondiffbeforeafterboth
--- /dev/null
+++ b/tests/src/eth/collectionAbi.json
@@ -0,0 +1,172 @@
+[
+  {
+    "inputs": [
+      {
+        "internalType": "address",
+        "name": "contractAddress",
+        "type": "address"
+      },
+      { "internalType": "address", "name": "user", "type": "address" }
+    ],
+    "name": "allowed",
+    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
+    "stateMutability": "view",
+    "type": "function"
+  },
+  {
+    "inputs": [
+      {
+        "internalType": "address",
+        "name": "contractAddress",
+        "type": "address"
+      }
+    ],
+    "name": "allowlistEnabled",
+    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
+    "stateMutability": "view",
+    "type": "function"
+  },
+  {
+    "inputs": [
+      {
+        "internalType": "address",
+        "name": "contractAddress",
+        "type": "address"
+      }
+    ],
+    "name": "contractOwner",
+    "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
+    "stateMutability": "view",
+    "type": "function"
+  },
+  {
+    "inputs": [
+      { "internalType": "string", "name": "name", "type": "string" },
+      { "internalType": "string", "name": "description", "type": "string" },
+      { "internalType": "string", "name": "tokenPrefix", "type": "string" }
+    ],
+    "name": "create721Collection",
+    "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
+    "stateMutability": "view",
+    "type": "function"
+  },
+  {
+    "inputs": [
+      {
+        "internalType": "address",
+        "name": "contractAddress",
+        "type": "address"
+      }
+    ],
+    "name": "getSponsoringRateLimit",
+    "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }],
+    "stateMutability": "view",
+    "type": "function"
+  },
+  {
+    "inputs": [
+      {
+        "internalType": "address",
+        "name": "contractAddress",
+        "type": "address"
+      },
+      { "internalType": "uint8", "name": "mode", "type": "uint8" }
+    ],
+    "name": "setSponsoringMode",
+    "outputs": [],
+    "stateMutability": "nonpayable",
+    "type": "function"
+  },
+  {
+    "inputs": [
+      {
+        "internalType": "address",
+        "name": "contractAddress",
+        "type": "address"
+      },
+      { "internalType": "uint32", "name": "rateLimit", "type": "uint32" }
+    ],
+    "name": "setSponsoringRateLimit",
+    "outputs": [],
+    "stateMutability": "nonpayable",
+    "type": "function"
+  },
+  {
+    "inputs": [
+      {
+        "internalType": "address",
+        "name": "contractAddress",
+        "type": "address"
+      }
+    ],
+    "name": "sponsoringEnabled",
+    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
+    "stateMutability": "view",
+    "type": "function"
+  },
+  {
+    "inputs": [
+      {
+        "internalType": "address",
+        "name": "contractAddress",
+        "type": "address"
+      }
+    ],
+    "name": "sponsoringMode",
+    "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }],
+    "stateMutability": "view",
+    "type": "function"
+  },
+  {
+    "inputs": [
+      { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }
+    ],
+    "name": "supportsInterface",
+    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
+    "stateMutability": "view",
+    "type": "function"
+  },
+  {
+    "inputs": [
+      {
+        "internalType": "address",
+        "name": "contractAddress",
+        "type": "address"
+      },
+      { "internalType": "address", "name": "user", "type": "address" },
+      { "internalType": "bool", "name": "allowed", "type": "bool" }
+    ],
+    "name": "toggleAllowed",
+    "outputs": [],
+    "stateMutability": "nonpayable",
+    "type": "function"
+  },
+  {
+    "inputs": [
+      {
+        "internalType": "address",
+        "name": "contractAddress",
+        "type": "address"
+      },
+      { "internalType": "bool", "name": "enabled", "type": "bool" }
+    ],
+    "name": "toggleAllowlist",
+    "outputs": [],
+    "stateMutability": "nonpayable",
+    "type": "function"
+  },
+  {
+    "inputs": [
+      {
+        "internalType": "address",
+        "name": "contractAddress",
+        "type": "address"
+      },
+      { "internalType": "bool", "name": "enabled", "type": "bool" }
+    ],
+    "name": "toggleSponsoring",
+    "outputs": [],
+    "stateMutability": "nonpayable",
+    "type": "function"
+  }
+]
modifiedtests/src/eth/createCollection.test.tsdiffbeforeafterboth
--- a/tests/src/eth/createCollection.test.ts
+++ b/tests/src/eth/createCollection.test.ts
@@ -16,12 +16,12 @@
 
 import {expect} from 'chai';
 import {getCreatedCollectionCount, getDetailedCollectionInfo} from '../util/helpers';
-import {collectionIdFromAddress, contractHelpers, createEthAccountWithBalance, itWeb3} from './util/helpers';
+import {collectionHelper, collectionIdFromAddress, contractHelpers, createEthAccountWithBalance, itWeb3} from './util/helpers';
 
 describe('Create collection from EVM', () => {
   itWeb3('Create collection', async ({api, web3}) => {
     const owner = await createEthAccountWithBalance(api, web3);
-    const helpers = contractHelpers(web3, owner);
+    const helpers = collectionHelper(web3, owner);
     const collectionName = 'CollectionEVM';
     const description = 'Some description';
     const tokenPrefix = 'token prefix';
modifiedtests/src/eth/util/contractHelpersAbi.jsondiffbeforeafterboth
--- a/tests/src/eth/util/contractHelpersAbi.json
+++ b/tests/src/eth/util/contractHelpersAbi.json
@@ -41,17 +41,6 @@
   },
   {
     "inputs": [
-      { "internalType": "string", "name": "name", "type": "string" },
-      { "internalType": "string", "name": "description", "type": "string" },
-      { "internalType": "string", "name": "tokenPrefix", "type": "string" }
-    ],
-    "name": "create721Collection",
-    "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
-    "stateMutability": "view",
-    "type": "function"
-  },
-  {
-    "inputs": [
       {
         "internalType": "address",
         "name": "contractAddress",
modifiedtests/src/eth/util/helpers.tsdiffbeforeafterboth
--- a/tests/src/eth/util/helpers.ts
+++ b/tests/src/eth/util/helpers.ts
@@ -28,6 +28,7 @@
 import config from '../../config';
 import privateKey from '../../substrate/privateKey';
 import contractHelpersAbi from './contractHelpersAbi.json';
+import collectionAbi from '../collectionAbi.json';
 import getBalance from '../../substrate/get-balance';
 import waitNewBlocks from '../../substrate/wait-new-blocks';
 
@@ -273,6 +274,16 @@
   return new web3.eth.Contract(contractHelpersAbi as any, '0x842899ECF380553E8a4de75bF534cdf6fBF64049', {from: caller, ...GAS_ARGS});
 }
 
+/** 
+ * pallet evm_collection
+ * @param web3 
+ * @param caller - eth address
+ * @returns 
+ */
+export function collectionHelper(web3: Web3, caller: string) {
+  return new web3.eth.Contract(collectionAbi as any, '0x6c4e9fe1ae37a41e93cee429e8e1881abdcbb54f', {from: caller, ...GAS_ARGS});
+}
+
 /**
  * Execute ethereum method call using substrate account
  * @param to target contract