git.delta.rocks / unique-network / refs/commits / 890b4afabe76

difftreelog

Merge branch 'develop' into feature/CORE-324

Yaroslav Bolyukin2022-04-01parents: #4b84a72 #a961c1a.patch.diff
in: master

17 files changed

modified.envdiffbeforeafterboth
--- a/.env
+++ b/.env
@@ -1,6 +1,6 @@
 RUST_TOOLCHAIN=nightly-2021-11-11
 RUST_C=1.58.0-nightly
-POLKA_VERSION=release-v0.9.17
+POLKA_VERSION=release-v0.9.18
 UNIQUE_BRANCH=develop
 USER=***
 PASS=***
modifiedCargo.lockdiffbeforeafterboth
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5575,7 +5575,7 @@
 
 [[package]]
 name = "opal-runtime"
-version = "0.1.0"
+version = "0.9.18"
 dependencies = [
  "cumulus-pallet-aura-ext",
  "cumulus-pallet-dmp-queue",
@@ -8709,7 +8709,7 @@
 
 [[package]]
 name = "quartz-runtime"
-version = "0.1.0"
+version = "0.9.18"
 dependencies = [
  "cumulus-pallet-aura-ext",
  "cumulus-pallet-dmp-queue",
@@ -8723,13 +8723,10 @@
  "fp-evm-mapping",
  "fp-rpc",
  "fp-self-contained",
- "frame-benchmarking",
  "frame-executive",
  "frame-support",
  "frame-system",
- "frame-system-benchmarking",
  "frame-system-rpc-runtime-api",
- "hex-literal",
  "orml-vesting",
  "pallet-aura",
  "pallet-balances",
@@ -12551,7 +12548,7 @@
 
 [[package]]
 name = "unique-runtime"
-version = "0.9.17"
+version = "0.9.18"
 dependencies = [
  "cumulus-pallet-aura-ext",
  "cumulus-pallet-dmp-queue",
@@ -12627,7 +12624,7 @@
 
 [[package]]
 name = "unique-runtime-common"
-version = "0.1.0"
+version = "0.9.18"
 dependencies = [
  "fp-rpc",
  "frame-support",
modifiedCargo.tomldiffbeforeafterboth
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -5,8 +5,11 @@
     'pallets/*',
     'client/*',
     'primitives/*',
-    'runtime/*',
     'crates/*',
 ]
+exclude = [
+    "runtime/unique",
+    "runtime/quartz"
+]
 [profile.release]
 panic = 'unwind'
modifiedDockerfile-parachaindiffbeforeafterboth
--- a/Dockerfile-parachain
+++ b/Dockerfile-parachain
@@ -1,5 +1,5 @@
 # ===== Rust builder =====
-FROM phusion/baseimage:focal-1.0.0 as rust-builder
+FROM phusion/baseimage:focal-1.1.0 as rust-builder
 LABEL maintainer="Unique.Network"
 
 ARG RUST_TOOLCHAIN=nightly-2021-11-11
@@ -77,7 +77,7 @@
 
 # ===== RUN ======
 
-FROM phusion/baseimage:focal-1.0.0
+FROM phusion/baseimage:focal-1.1.0
 
 ARG PROFILE=release
 
modifiedREADME.mddiffbeforeafterboth
before · README.md
1![Docker build](https://github.com/usetech-llc/nft_parachain/workflows/Docker%20build/badge.svg)23# Unique Parachain45## Project Description67The Unique Pallet is the core of NFT functionality. Like ERC-721 standard in Ethereum ecosystem, this pallet provides the8basement for creating collections of unique non-divisible things, also called Non Fungible Tokens (NFTs), minting NFT of9a given Collection, and managing their ownership.1011The pallet also enables storing NFT properties. Though (according to ERC-721) NFT properties belong to logic of a12concrete application that operates a Collection, so purposefully the NFT Tracking Module does not have any knowledge13about properties except their byte size leaving application logic out to be controlled by Smart Contracts.1415The Unique Chain also provides:1617-   Smart Contracts Pallet and example smart contract that interacts with Unique Runtime18-   ERC-1155 Functionality (currently PoC as Re-Fungible tokens, i.e. items that are still unique, but that can be split19    between multiple users)20-   Variety of economic options for dapp producers to choose from to create freemium games and other ways to attract21    users. As a step one, we implemented an economic model when a collection sponsor can be set to pay for collection22    Transfer transactions.2324Wider Unique Ecosystem (most of it was developed during Hackusama):2526-   [SubstraPunks Game hosted on IPFS](https://github.com/usetech-llc/substrapunks)27-   [Unique Wallet and UI](https://uniqueapps.usetech.com/#/nft)28-   [NFT Asset for Unity Framework](https://github.com/usetech-llc/nft_unity)2930Please see our [walk-through instructions](doc/hackusama_walk_through.md) to try everything out!3132## Application Development3334If you are building an application that operates NFT tokens, use [this document](doc/application_development.md).353637## Building3839Building Unique chain requires special versions of Rust and toolchain. We don't use the most recent versions of everything40so that we can keep the builds stable.41421. Install Rust:4344```bash45sudo apt-get install git curl libssl-dev llvm pkg-config libclang-dev clang46curl https://sh.rustup.rs -sSf | sh47```48492. Remove all installed toolchains with `rustup toolchain list` and `rustup toolchain uninstall <toolchain>`.50513. Install install nightly 2021-11-11 and make it default:5253```bash54rustup toolchain install nightly-2021-11-1155rustup default nightly-2021-11-1156```57584. Add wasm target for nightly toolchain:5960```bash61rustup target add wasm32-unknown-unknown --toolchain nightly-2021-11-1162```63645. Build:65```bash66cargo build67```6869optionally, build in release:70```bash71cargo build --release72```7374## Building as Parachain locally7576Note: checkout this project and all related projects (see below) in the sibling folders (both under the same folder)7778### Polkadot launch utility7980```81git clone https://github.com/paritytech/polkadot-launch82```8384### Build relay8586```87git clone https://github.com/paritytech/polkadot.git88cd polkadot89git checkout release-v0.9.1890cargo build --release91```9293### Build Unique parachain9495Run in the root of this project:96```97cargo build --release98```99100### Build Acala parachain (optional, full config only)101102```103git clone https://github.com/AcalaNetwork/Acala104cd Acala105git checkout 54db3acd409a0b787f116f20e163a3b24101ce38106make build-release107```108109## Running as Parachain locally110111```112./launch-testnet.sh113```114115Optional, full setup with Acala and Statemint116```117./launch-testnet-full.sh118```119120## Run Integration Tests1211221. Install all needed dependecies123```124cd tests125yarn install126```1271282. Run tests129```130yarn test131```132133134## Code Formatting135136### Apply formatting and clippy fixes137```bash138cargo clippy139cargo fmt140```141142### Format tests143```bash144pushd tests && yarn fix ; popd145```146147### Check code style in tests148```bash149cd tests && yarn eslint --ext .ts,.js src/150```151152153## Karura token transfer154155To get started, you need to open inbound and outbound hrmp channels.156157### Next, we need to register our asset at Karura.158```159assetRegistry -> registerForeignAsset(location, metadata)160location:161	V0(X2(Parent, Parachain(PARA_ID)))162metadata:163	name         OPL164	symbol       OPL165	decimals     18166minimalBalance	 1167```168169### Next, we can send tokens from Opal to Karura:170```171polkadotXcm -> reserveTransferAssets172dest:173	V0(X2(Parent, Parachain(<KARURA_PARA_ID>)))174beneficiary:175	X1(AccountId(Any, <ACCOUNT>))176assets:177	V1(Concrete(0,Here), Fungible(<AMOUNT>))178feeAssetItem:179	0180weightLimit:181	<LIMIT>182```183184The result will be displayed in ChainState185tokens -> accounts186187### To send tokens from Karura to Opal:188```189xtokens -> transfer190191currencyId:192	ForeingAsset193		<TOKEN_ID>194195amount:196		<AMOUNT>197dest:198	V1199	(200		Parents:1,201		X2(Parachain(<KARURA_PARA_ID>), AccountId(Any, <ACCOUNT>)202	)203destWeight:204	<WEIGHT>205```
after · README.md
1![Docker build](https://github.com/usetech-llc/nft_parachain/workflows/Docker%20build/badge.svg)23# Unique Parachain45## Project Description67The Unique Pallet is the core of NFT functionality. Like ERC-721 standard in Ethereum ecosystem, this pallet provides the8basement for creating collections of unique non-divisible things, also called Non Fungible Tokens (NFTs), minting NFT of9a given Collection, and managing their ownership.1011The pallet also enables storing NFT properties. Though (according to ERC-721) NFT properties belong to logic of a12concrete application that operates a Collection, so purposefully the NFT Tracking Module does not have any knowledge13about properties except their byte size leaving application logic out to be controlled by Smart Contracts.1415The Unique Chain also provides:1617-   Smart Contracts Pallet and example smart contract that interacts with Unique Runtime18-   ERC-1155 Functionality (currently PoC as Re-Fungible tokens, i.e. items that are still unique, but that can be split19    between multiple users)20-   Variety of economic options for dapp producers to choose from to create freemium games and other ways to attract21    users. As a step one, we implemented an economic model when a collection sponsor can be set to pay for collection22    Transfer transactions.2324Wider Unique Ecosystem (most of it was developed during Hackusama):2526-   [SubstraPunks Game hosted on IPFS](https://github.com/usetech-llc/substrapunks)27-   [Unique Wallet and UI](https://uniqueapps.usetech.com/#/nft)28-   [NFT Asset for Unity Framework](https://github.com/usetech-llc/nft_unity)2930Please see our [walk-through instructions](doc/hackusama_walk_through.md) to try everything out!3132## Application Development3334If you are building an application that operates NFT tokens, use [this document](doc/application_development.md).353637## Building3839Building Unique chain requires special versions of Rust and toolchain. We don't use the most recent versions of everything40so that we can keep the builds stable.41421. Install Rust:4344```bash45sudo apt-get install git curl libssl-dev llvm pkg-config libclang-dev clang46curl https://sh.rustup.rs -sSf | sh47```48492. Remove all installed toolchains with `rustup toolchain list` and `rustup toolchain uninstall <toolchain>`.50513. Install install nightly 2021-11-11 and make it default:5253```bash54rustup toolchain install nightly-2021-11-1155rustup default nightly-2021-11-1156```57584. Add wasm target for nightly toolchain:5960```bash61rustup target add wasm32-unknown-unknown --toolchain nightly-2021-11-1162```63645. Build:65```bash66cargo build --features=unique-runtime,quartz-runtime --release67```6869## Building as Parachain locally7071Note: checkout this project and all related projects (see below) in the sibling folders (both under the same folder)7273### Polkadot launch utility7475```76git clone https://github.com/paritytech/polkadot-launch77```7879### Build relay8081```82git clone https://github.com/paritytech/polkadot.git83cd polkadot84git checkout release-v0.9.1885cargo build --release86```8788### Build Unique parachain8990Run in the root of this project:91```92cargo build --release93```9495### Build Acala parachain (optional, full config only)9697```98git clone https://github.com/AcalaNetwork/Acala99cd Acala100git checkout 54db3acd409a0b787f116f20e163a3b24101ce38101make build-release102```103104## Running as Parachain locally105106```107./launch-testnet.sh108```109110Optional, full setup with Acala and Statemint111```112./launch-testnet-full.sh113```114115## Run Integration Tests1161171. Install all needed dependecies118```119cd tests120yarn install121```1221232. Run tests124```125yarn test126```127128129## Code Formatting130131### Apply formatting and clippy fixes132```bash133cargo clippy134cargo fmt135```136137### Format tests138```bash139pushd tests && yarn fix ; popd140```141142### Check code style in tests143```bash144cd tests && yarn eslint --ext .ts,.js src/145```146147148## Karura token transfer149150To get started, you need to open inbound and outbound hrmp channels.151152### Next, we need to register our asset at Karura.153```154assetRegistry -> registerForeignAsset(location, metadata)155location:156	V0(X2(Parent, Parachain(PARA_ID)))157metadata:158	name         OPL159	symbol       OPL160	decimals     18161minimalBalance	 1162```163164### Next, we can send tokens from Opal to Karura:165```166polkadotXcm -> reserveTransferAssets167dest:168	V0(X2(Parent, Parachain(<KARURA_PARA_ID>)))169beneficiary:170	X1(AccountId(Any, <ACCOUNT>))171assets:172	V1(Concrete(0,Here), Fungible(<AMOUNT>))173feeAssetItem:174	0175weightLimit:176	<LIMIT>177```178179The result will be displayed in ChainState180tokens -> accounts181182### To send tokens from Karura to Opal:183```184xtokens -> transfer185186currencyId:187	ForeingAsset188		<TOKEN_ID>189190amount:191		<AMOUNT>192dest:193	V1194	(195		Parents:1,196		X2(Parachain(<KARURA_PARA_ID>), AccountId(Any, <ACCOUNT>)197	)198destWeight:199	<WEIGHT>200```
modifiednode/cli/Cargo.tomldiffbeforeafterboth
--- a/node/cli/Cargo.toml
+++ b/node/cli/Cargo.toml
@@ -312,7 +312,7 @@
 unique-rpc = { default-features = false, path = "../rpc" }
 
 [features]
-default = ["unique-runtime", "quartz-runtime"]
+default = []
 runtime-benchmarks = [
     'unique-runtime/runtime-benchmarks',
     'polkadot-service/runtime-benchmarks',
modifiednode/cli/src/chain_spec.rsdiffbeforeafterboth
--- a/node/cli/src/chain_spec.rs
+++ b/node/cli/src/chain_spec.rs
@@ -14,7 +14,6 @@
 // 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 cumulus_primitives_core::ParaId;
 use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup};
 use sc_service::ChainType;
 use sp_core::{sr25519, Pair, Public};
@@ -26,6 +25,15 @@
 
 use unique_runtime_common::types::*;
 
+#[cfg(feature = "unique-runtime")]
+use unique_runtime as default_runtime;
+
+#[cfg(all(not(feature = "unique-runtime"), feature = "quartz-runtime"))]
+use quartz_runtime as default_runtime;
+
+#[cfg(all(not(feature = "unique-runtime"), not(feature = "quartz-runtime")))]
+use opal_runtime as default_runtime;
+
 /// The `ChainSpec` parameterized for the unique runtime.
 #[cfg(feature = "unique-runtime")]
 pub type UniqueChainSpec = sc_service::GenericChainSpec<unique_runtime::GenesisConfig, Extensions>;
@@ -37,9 +45,22 @@
 /// The `ChainSpec` parameterized for the opal runtime.
 pub type OpalChainSpec = sc_service::GenericChainSpec<opal_runtime::GenesisConfig, Extensions>;
 
+#[cfg(feature = "unique-runtime")]
+pub type DefaultChainSpec = UniqueChainSpec;
+
+#[cfg(all(not(feature = "unique-runtime"), feature = "quartz-runtime"))]
+pub type DefaultChainSpec = QuartzChainSpec;
+
+#[cfg(all(not(feature = "unique-runtime"), not(feature = "quartz-runtime")))]
+pub type DefaultChainSpec = OpalChainSpec;
+
 pub enum RuntimeId {
+	#[cfg(feature = "unique-runtime")]
 	Unique,
+
+	#[cfg(feature = "quartz-runtime")]
 	Quartz,
+
 	Opal,
 	Unknown(String),
 }
@@ -51,12 +72,12 @@
 impl RuntimeIdentification for Box<dyn sc_service::ChainSpec> {
 	fn runtime_id(&self) -> RuntimeId {
 		#[cfg(feature = "unique-runtime")]
-		if self.id().starts_with("unique") {
+		if self.id().starts_with("unique") || self.id().starts_with("unq") {
 			return RuntimeId::Unique;
 		}
 
 		#[cfg(feature = "quartz-runtime")]
-		if self.id().starts_with("quartz") {
+		if self.id().starts_with("quartz") || self.id().starts_with("qtz") {
 			return RuntimeId::Quartz;
 		}
 
@@ -121,20 +142,66 @@
 	AccountPublic::from(get_from_seed::<TPublic>(seed)).into_account()
 }
 
+macro_rules! testnet_genesis {
+	(
+		$runtime:path,
+		$root_key:expr,
+		$initial_authorities:expr,
+		$endowed_accounts:expr,
+		$id:expr
+	) => {{
+		use $runtime::*;
+
+		GenesisConfig {
+			system: SystemConfig {
+				code: WASM_BINARY
+					.expect("WASM binary was not build, please build it!")
+					.to_vec(),
+			},
+			balances: BalancesConfig {
+				balances: $endowed_accounts
+					.iter()
+					.cloned()
+					// 1e13 UNQ
+					.map(|k| (k, 1 << 100))
+					.collect(),
+			},
+			treasury: Default::default(),
+			sudo: SudoConfig {
+				key: Some($root_key),
+			},
+			vesting: VestingConfig { vesting: vec![] },
+			parachain_info: ParachainInfoConfig {
+				parachain_id: $id.into(),
+			},
+			parachain_system: Default::default(),
+			aura: AuraConfig {
+				authorities: $initial_authorities,
+			},
+			aura_ext: Default::default(),
+			evm: EVMConfig {
+				accounts: BTreeMap::new(),
+			},
+			ethereum: EthereumConfig {},
+		}
+	}};
+}
+
 pub fn development_config() -> OpalChainSpec {
 	let mut properties = Map::new();
-	properties.insert("tokenSymbol".into(), "OPL".into());
-	properties.insert("tokenDecimals".into(), 15.into());
-	properties.insert("ss58Format".into(), 42.into());
+	properties.insert("tokenSymbol".into(), opal_runtime::TOKEN_SYMBOL.into());
+	properties.insert("tokenDecimals".into(), 18.into());
+	properties.insert("ss58Format".into(), opal_runtime::SS58Prefix::get().into());
 
 	OpalChainSpec::from_genesis(
 		// Name
-		"Development",
+		"OPAL by UNIQUE",
 		// ID
-		"dev",
+		"opal_dev",
 		ChainType::Local,
 		move || {
-			testnet_genesis(
+			testnet_genesis!(
+				opal_runtime,
 				// Sudo account
 				get_account_id_from_seed::<sr25519::Public>("Alice"),
 				vec![
@@ -146,7 +213,7 @@
 					get_account_id_from_seed::<sr25519::Public>("Alice"),
 					get_account_id_from_seed::<sr25519::Public>("Bob"),
 				],
-				1000.into(),
+				1000
 			)
 		},
 		// Bootnodes
@@ -166,15 +233,33 @@
 	)
 }
 
-pub fn local_testnet_rococo_config() -> OpalChainSpec {
-	OpalChainSpec::from_genesis(
+pub fn local_testnet_rococo_config() -> DefaultChainSpec {
+	let mut properties = Map::new();
+	properties.insert("tokenSymbol".into(), default_runtime::TOKEN_SYMBOL.into());
+	properties.insert("tokenDecimals".into(), 18.into());
+	properties.insert(
+		"ss58Format".into(),
+		default_runtime::SS58Prefix::get().into(),
+	);
+
+	DefaultChainSpec::from_genesis(
 		// Name
-		"Local Testnet",
+		format!(
+			"{}{}",
+			default_runtime::RUNTIME_NAME.to_uppercase(),
+			if cfg!(feature = "unique-runtime") {
+				""
+			} else {
+				" by UNIQUE"
+			}
+		)
+		.as_str(),
 		// ID
-		"local_testnet",
+		format!("{}_local", default_runtime::RUNTIME_NAME).as_str(),
 		ChainType::Local,
 		move || {
-			testnet_genesis(
+			testnet_genesis!(
+				default_runtime,
 				// Sudo account
 				get_account_id_from_seed::<sr25519::Public>("Alice"),
 				vec![
@@ -196,7 +281,7 @@
 					get_account_id_from_seed::<sr25519::Public>("Eve//stash"),
 					get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
 				],
-				1000.into(),
+				1000
 			)
 		},
 		// Bootnodes
@@ -207,51 +292,11 @@
 		None,
 		None,
 		// Properties
-		None,
+		Some(properties),
 		// Extensions
 		Extensions {
 			relay_chain: "rococo-local".into(),
 			para_id: 1000,
 		},
 	)
-}
-
-fn testnet_genesis(
-	root_key: AccountId,
-	initial_authorities: Vec<AuraId>,
-	endowed_accounts: Vec<AccountId>,
-	id: ParaId,
-) -> opal_runtime::GenesisConfig {
-	use opal_runtime::*;
-
-	GenesisConfig {
-		system: SystemConfig {
-			code: WASM_BINARY
-				.expect("WASM binary was not build, please build it!")
-				.to_vec(),
-		},
-		balances: BalancesConfig {
-			balances: endowed_accounts
-				.iter()
-				.cloned()
-				// 1e13 UNQ
-				.map(|k| (k, 1 << 100))
-				.collect(),
-		},
-		treasury: Default::default(),
-		sudo: SudoConfig {
-			key: Some(root_key),
-		},
-		vesting: VestingConfig { vesting: vec![] },
-		parachain_info: ParachainInfoConfig { parachain_id: id },
-		parachain_system: Default::default(),
-		aura: AuraConfig {
-			authorities: initial_authorities,
-		},
-		aura_ext: Default::default(),
-		evm: EVMConfig {
-			accounts: BTreeMap::new(),
-		},
-		ethereum: EthereumConfig {},
-	}
 }
modifiednode/cli/src/service.rsdiffbeforeafterboth
--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -61,9 +61,16 @@
 
 use unique_runtime_common::types::{AuraId, RuntimeInstance, AccountId, Balance, Index, Hash, Block};
 
-/// Native executor instance.
+/// Unique native executor instance.
+#[cfg(feature = "unique-runtime")]
 pub struct UniqueRuntimeExecutor;
+
+#[cfg(feature = "quartz-runtime")]
+/// Quartz native executor instance.
+
 pub struct QuartzRuntimeExecutor;
+
+/// Opal native executor instance.
 pub struct OpalRuntimeExecutor;
 
 #[cfg(feature = "unique-runtime")]
modifiedpallets/unique/src/eth/sponsoring.rsdiffbeforeafterboth
--- a/pallets/unique/src/eth/sponsoring.rs
+++ b/pallets/unique/src/eth/sponsoring.rs
@@ -24,12 +24,13 @@
 use up_sponsorship::SponsorshipHandler;
 use core::marker::PhantomData;
 use core::convert::TryInto;
-use up_data_structs::TokenId;
 use pallet_evm::account::CrossAccountId;
 
-use pallet_nonfungible::erc::{UniqueNFTCall, ERC721UniqueExtensionsCall, ERC721Call};
+use pallet_nonfungible::erc::{
+	UniqueNFTCall, ERC721UniqueExtensionsCall, ERC721MintableCall, ERC721Call,
+};
 use pallet_fungible::erc::{UniqueFungibleCall, ERC20Call};
-use up_data_structs::{CreateItemData, CreateNftData};
+use up_data_structs::{TokenId, CreateItemData, CreateNftData};
 
 pub struct UniqueEthSponsorshipHandler<T: Config>(PhantomData<*const T>);
 impl<T: Config> SponsorshipHandler<T::CrossAccountId, (H160, Vec<u8>)>
@@ -50,6 +51,18 @@
 						let token_id: TokenId = token_id.try_into().ok()?;
 						withdraw_transfer::<T>(&collection, &who, &token_id).map(|()| sponsor)
 					}
+					UniqueNFTCall::ERC721Mintable(
+						ERC721MintableCall::Mint { token_id, .. }
+						| ERC721MintableCall::MintWithTokenUri { token_id, .. },
+					) => {
+						let _token_id: TokenId = token_id.try_into().ok()?;
+						withdraw_create_item::<T>(
+							&collection,
+							&who,
+							&CreateItemData::NFT(CreateNftData::default()),
+						)
+						.map(|()| sponsor)
+					}
 					UniqueNFTCall::ERC721(ERC721Call::TransferFrom { token_id, from, .. }) => {
 						let token_id: TokenId = token_id.try_into().ok()?;
 						let from = T::CrossAccountId::from_eth(from);
@@ -60,18 +73,6 @@
 						withdraw_approve::<T>(&collection, who.as_sub(), &token_id)
 							.map(|()| sponsor)
 					}
-					UniqueNFTCall::ERC721Mintable(call) => match call {
-						pallet_nonfungible::erc::ERC721MintableCall::Mint { .. }
-						| pallet_nonfungible::erc::ERC721MintableCall::MintWithTokenUri {
-							..
-						} => withdraw_create_item(
-							&collection,
-							who.as_sub(),
-							&CreateItemData::NFT(CreateNftData::default()),
-						)
-						.map(|()| sponsor),
-						_ => None,
-					},
 					_ => None,
 				}
 			}
modifiedpallets/unique/src/sponsorship.rsdiffbeforeafterboth
--- a/pallets/unique/src/sponsorship.rs
+++ b/pallets/unique/src/sponsorship.rs
@@ -103,7 +103,7 @@
 
 pub fn withdraw_create_item<T: Config>(
 	collection: &CollectionHandle<T>,
-	who: &T::AccountId,
+	who: &T::CrossAccountId,
 	_properties: &CreateItemData,
 ) -> Option<()> {
 	if _properties.data_size() as u32 > collection.limits.sponsored_data_size() {
@@ -120,14 +120,14 @@
 			CreateItemData::ReFungible(_) => REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,
 		});
 
-	if let Some(last_tx_block) = <CreateItemBasket<T>>::get((collection.id, &who)) {
+	if let Some(last_tx_block) = <CreateItemBasket<T>>::get((collection.id, who.as_sub())) {
 		let timeout = last_tx_block + limit.into();
 		if block_number < timeout {
 			return None;
 		}
 	}
 
-	CreateItemBasket::<T>::insert((collection.id, who.clone()), block_number);
+	CreateItemBasket::<T>::insert((collection.id, who.as_sub()), block_number);
 
 	Some(())
 }
@@ -246,7 +246,12 @@
 				..
 			} => {
 				let (sponsor, collection) = load(*collection_id)?;
-				withdraw_create_item::<T>(&collection, who, data).map(|()| sponsor)
+				withdraw_create_item::<T>(
+					&collection,
+					&T::CrossAccountId::from_sub(who.clone()),
+					data,
+				)
+				.map(|()| sponsor)
 			}
 			Call::transfer {
 				collection_id,
modifiedruntime/common/Cargo.tomldiffbeforeafterboth
--- a/runtime/common/Cargo.toml
+++ b/runtime/common/Cargo.toml
@@ -6,7 +6,7 @@
 license = 'All Rights Reserved'
 name = 'unique-runtime-common'
 repository = 'https://github.com/UniqueNetwork/unique-chain'
-version = '0.1.0'
+version = '0.9.18'
 
 [features]
 default = ['std']
modifiedruntime/opal/Cargo.tomldiffbeforeafterboth
--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -10,7 +10,7 @@
 license = 'GPLv3'
 name = 'opal-runtime'
 repository = 'https://github.com/UniqueNetwork/unique-chain'
-version = '0.1.0'
+version = '0.9.18'
 
 [package.metadata.docs.rs]
 targets = ['x86_64-unknown-linux-gnu']
modifiedruntime/opal/src/lib.rsdiffbeforeafterboth
--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/src/lib.rs
@@ -116,7 +116,8 @@
 
 use unique_runtime_common::{impl_common_runtime_apis, types::*, constants::*};
 
-pub const RUNTIME_NAME: &str = "Opal";
+pub const RUNTIME_NAME: &str = "opal";
+pub const TOKEN_SYMBOL: &str = "OPL";
 
 type CrossAccountId = pallet_evm::account::BasicCrossAccountId<Runtime>;
 
@@ -168,7 +169,7 @@
 	spec_name: create_runtime_str!(RUNTIME_NAME),
 	impl_name: create_runtime_str!(RUNTIME_NAME),
 	authoring_version: 1,
-	spec_version: 917004,
+	spec_version: 918001,
 	impl_version: 0,
 	apis: RUNTIME_API_VERSIONS,
 	transaction_version: 1,
modifiedruntime/quartz/Cargo.tomldiffbeforeafterboth
--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -10,7 +10,7 @@
 license = 'GPLv3'
 name = 'quartz-runtime'
 repository = 'https://github.com/UniqueNetwork/unique-chain'
-version = '0.1.0'
+version = '0.9.18'
 
 [package.metadata.docs.rs]
 targets = ['x86_64-unknown-linux-gnu']
modifiedruntime/quartz/src/lib.rsdiffbeforeafterboth
--- a/runtime/quartz/src/lib.rs
+++ b/runtime/quartz/src/lib.rs
@@ -116,7 +116,8 @@
 
 use unique_runtime_common::{impl_common_runtime_apis, types::*, constants::*};
 
-pub const RUNTIME_NAME: &str = "Quartz";
+pub const RUNTIME_NAME: &str = "quartz";
+pub const TOKEN_SYMBOL: &str = "QTZ";
 
 type CrossAccountId = pallet_evm::account::BasicCrossAccountId<Runtime>;
 
@@ -153,7 +154,7 @@
 	spec_name: create_runtime_str!(RUNTIME_NAME),
 	impl_name: create_runtime_str!(RUNTIME_NAME),
 	authoring_version: 1,
-	spec_version: 917004,
+	spec_version: 918001,
 	impl_version: 0,
 	apis: RUNTIME_API_VERSIONS,
 	transaction_version: 1,
modifiedruntime/unique/Cargo.tomldiffbeforeafterboth
--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -10,7 +10,7 @@
 license = 'GPLv3'
 name = 'unique-runtime'
 repository = 'https://github.com/UniqueNetwork/unique-chain'
-version = '0.9.17'
+version = '0.9.18'
 
 [package.metadata.docs.rs]
 targets = ['x86_64-unknown-linux-gnu']
modifiedruntime/unique/src/lib.rsdiffbeforeafterboth
--- a/runtime/unique/src/lib.rs
+++ b/runtime/unique/src/lib.rs
@@ -115,7 +115,8 @@
 
 use unique_runtime_common::{impl_common_runtime_apis, types::*, constants::*};
 
-pub const RUNTIME_NAME: &str = "Unique";
+pub const RUNTIME_NAME: &str = "unique";
+pub const TOKEN_SYMBOL: &str = "UNQ";
 
 type CrossAccountId = pallet_evm::account::BasicCrossAccountId<Runtime>;
 
@@ -152,7 +153,7 @@
 	spec_name: create_runtime_str!(RUNTIME_NAME),
 	impl_name: create_runtime_str!(RUNTIME_NAME),
 	authoring_version: 1,
-	spec_version: 917004,
+	spec_version: 918001,
 	impl_version: 0,
 	apis: RUNTIME_API_VERSIONS,
 	transaction_version: 1,