difftreelog
Fix warnings, update Dockerfile
in: master
4 files changed
Dockerfilediffbeforeafterboth--- a/Dockerfile
+++ b/Dockerfile
@@ -3,8 +3,8 @@
FROM phusion/baseimage:18.04-1.0.0 as builder
LABEL maintainer="UniqueNetwork.io"
-ENV WASM_TOOLCHAIN=nightly-2021-01-27
-ENV NATIVE_TOOLCHAIN=1.49.0
+ENV WASM_TOOLCHAIN=nightly-2021-03-01
+# ENV NATIVE_TOOLCHAIN=1.50.0
ARG PROFILE=release
@@ -25,10 +25,10 @@
RUN export PATH="/cargo-home/bin:$PATH" && \
export CARGO_HOME="/cargo-home" && \
rustup toolchain uninstall $(rustup toolchain list) && \
- rustup toolchain install $NATIVE_TOOLCHAIN && \
+ # rustup toolchain install $NATIVE_TOOLCHAIN && \
rustup toolchain install $WASM_TOOLCHAIN && \
rustup target add wasm32-unknown-unknown --toolchain $WASM_TOOLCHAIN && \
- rustup default $NATIVE_TOOLCHAIN && \
+ rustup default $WASM_TOOLCHAIN && \
rustup target list --installed && \
rustup show
README.mddiffbeforeafterboth--- a/README.md
+++ b/README.md
@@ -63,18 +63,17 @@
2. Remove all installed toolchains with `rustup toolchain list` and `rustup toolchain uninstall <toolchain>`.
-3. Install stable toolchain 1.49.0 and make it default, install nightly 2021-01-27:
+3. Install install nightly 2021-03-01 and make it default:
```bash
-rustup toolchain install 1.49.0
-rustup toolchain install nightly-2020-01-27
-rustup default nightly-2021-01-27
+rustup toolchain install nightly-2021-03-01
+rustup default nightly-2021-03-01
```
4. Add wasm target for nightly toolchain:
```bash
-rustup target add wasm32-unknown-unknown --toolchain nightly-2021-01-27
+rustup target add wasm32-unknown-unknown --toolchain nightly-2021-03-01
```
5. Build:
node/src/service.rsdiffbeforeafterboth1//! Service and ServiceFactory implementation. Specialized wrapper over substrate service.23//4// This file is subject to the terms and conditions defined in5// file 'LICENSE', which is part of this source code package.6//78use std::sync::Arc;9use std::time::Duration;10use sc_client_api::{ExecutorProvider, RemoteBackend};11use nft_runtime::{self, opaque::Block, RuntimeApi};12use sc_service::{error::Error as ServiceError, Configuration, TaskManager};13use sp_inherents::InherentDataProviders;14use sc_executor::native_executor_instance;15pub use sc_executor::NativeExecutor;16use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair};17use sc_finality_grandpa::SharedVoterState;18use sc_keystore::LocalKeystore;19use sc_telemetry::TelemetrySpan;2021// Our native executor instance.22native_executor_instance!(23 pub Executor,24 nft_runtime::api::dispatch,25 nft_runtime::native_version,26 frame_benchmarking::benchmarking::HostFunctions,27);2829type FullClient = sc_service::TFullClient<Block, RuntimeApi, Executor>;30type FullBackend = sc_service::TFullBackend<Block>;31type FullSelectChain = sc_consensus::LongestChain<FullBackend, Block>;3233pub fn new_partial(config: &Configuration) -> Result<sc_service::PartialComponents<34 FullClient, FullBackend, FullSelectChain,35 sp_consensus::DefaultImportQueue<Block, FullClient>,36 sc_transaction_pool::FullPool<Block, FullClient>,37 (38 sc_consensus_aura::AuraBlockImport<39 Block,40 FullClient,41 sc_finality_grandpa::GrandpaBlockImport<FullBackend, Block, FullClient, FullSelectChain>,42 AuraPair43 >,44 sc_finality_grandpa::LinkHalf<Block, FullClient, FullSelectChain>,45 )46>, ServiceError> {47 if config.keystore_remote.is_some() {48 return Err(ServiceError::Other(49 format!("Remote Keystores are not supported.")))50 }51 let inherent_data_providers = sp_inherents::InherentDataProviders::new();5253 let (client, backend, keystore_container, task_manager) =54 sc_service::new_full_parts::<Block, RuntimeApi, Executor>(&config)?;55 let client = Arc::new(client);5657 let select_chain = sc_consensus::LongestChain::new(backend.clone());5859 let transaction_pool = sc_transaction_pool::BasicPool::new_full(60 config.transaction_pool.clone(),61 config.role.is_authority().into(),62 config.prometheus_registry(),63 task_manager.spawn_handle(),64 client.clone(),65 );6667 let (grandpa_block_import, grandpa_link) = sc_finality_grandpa::block_import(68 client.clone(), &(client.clone() as Arc<_>), select_chain.clone(),69 )?;7071 let aura_block_import = sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new(72 grandpa_block_import.clone(), client.clone(),73 );7475 let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _, _>(76 sc_consensus_aura::slot_duration(&*client)?,77 aura_block_import.clone(),78 Some(Box::new(grandpa_block_import.clone())),79 client.clone(),80 inherent_data_providers.clone(),81 &task_manager.spawn_handle(),82 config.prometheus_registry(),83 sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()),84 )?;8586 Ok(sc_service::PartialComponents {87 client, backend, task_manager, import_queue, keystore_container, select_chain, transaction_pool,88 inherent_data_providers,89 other: (aura_block_import, grandpa_link),90 })91}9293fn remote_keystore(_url: &String) -> Result<Arc<LocalKeystore>, &'static str> {94 // FIXME: here would the concrete keystore be built,95 // must return a concrete type (NOT `LocalKeystore`) that96 // implements `CryptoStore` and `SyncCryptoStore`97 Err("Remote Keystore not supported.")98}99100/// Builds a new service for a full client.101pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError> {102 let sc_service::PartialComponents {103 client, backend, mut task_manager, import_queue, mut keystore_container, select_chain, transaction_pool,104 inherent_data_providers,105 other: (block_import, grandpa_link),106 } = new_partial(&config)?;107108 if let Some(url) = &config.keystore_remote {109 match remote_keystore(url) {110 Ok(k) => keystore_container.set_remote_keystore(k),111 Err(e) => {112 return Err(ServiceError::Other(113 format!("Error hooking up remote keystore for {}: {}", url, e)))114 }115 };116 }117118 config.network.extra_sets.push(sc_finality_grandpa::grandpa_peers_set_config());119120 let (network, network_status_sinks, system_rpc_tx, network_starter) =121 sc_service::build_network(sc_service::BuildNetworkParams {122 config: &config,123 client: client.clone(),124 transaction_pool: transaction_pool.clone(),125 spawn_handle: task_manager.spawn_handle(),126 import_queue,127 on_demand: None,128 block_announce_validator_builder: None,129 })?;130131 if config.offchain_worker.enabled {132 sc_service::build_offchain_workers(133 &config, backend.clone(), task_manager.spawn_handle(), client.clone(), network.clone(),134 );135 }136137 let role = config.role.clone();138 let force_authoring = config.force_authoring;139 let backoff_authoring_blocks: Option<()> = None;140 let name = config.network.node_name.clone();141 let enable_grandpa = !config.disable_grandpa;142 let prometheus_registry = config.prometheus_registry().cloned();143144 let rpc_extensions_builder = {145 let client = client.clone();146 let pool = transaction_pool.clone();147148 Box::new(move |deny_unsafe, _| {149 let deps = crate::rpc::FullDeps {150 client: client.clone(),151 pool: pool.clone(),152 deny_unsafe,153 };154155 crate::rpc::create_full(deps)156 })157 };158159 let (_rpc_handlers, telemetry_connection_notifier) = sc_service::spawn_tasks(160 sc_service::SpawnTasksParams {161 network: network.clone(),162 client: client.clone(),163 keystore: keystore_container.sync_keystore(),164 task_manager: &mut task_manager,165 transaction_pool: transaction_pool.clone(),166 rpc_extensions_builder,167 on_demand: None,168 remote_blockchain: None,169 backend,170 network_status_sinks,171 system_rpc_tx,172 config,173 },174 )?;175176 if role.is_authority() {177 let proposer = sc_basic_authorship::ProposerFactory::new(178 task_manager.spawn_handle(),179 client.clone(),180 transaction_pool,181 prometheus_registry.as_ref(),182 );183184 let can_author_with =185 sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone());186187 let aura = sc_consensus_aura::start_aura::<_, _, _, _, _, AuraPair, _, _, _, _>(188 sc_consensus_aura::slot_duration(&*client)?,189 client.clone(),190 select_chain,191 block_import,192 proposer,193 network.clone(),194 inherent_data_providers.clone(),195 force_authoring,196 backoff_authoring_blocks,197 keystore_container.sync_keystore(),198 can_author_with,199 )?;200201 // the AURA authoring task is considered essential, i.e. if it202 // fails we take down the service with it.203 task_manager.spawn_essential_handle().spawn_blocking("aura", aura);204 }205206 // if the node isn't actively participating in consensus then it doesn't207 // need a keystore, regardless of which protocol we use below.208 let keystore = if role.is_authority() {209 Some(keystore_container.sync_keystore())210 } else {211 None212 };213214 let grandpa_config = sc_finality_grandpa::Config {215 // FIXME #1578 make this available through chainspec216 gossip_duration: Duration::from_millis(333),217 justification_period: 512,218 name: Some(name),219 observer_enabled: false,220 keystore,221 is_authority: role.is_network_authority(),222 };223224 if enable_grandpa {225 // start the full GRANDPA voter226 // NOTE: non-authorities could run the GRANDPA observer protocol, but at227 // this point the full voter should provide better guarantees of block228 // and vote data availability than the observer. The observer has not229 // been tested extensively yet and having most nodes in a network run it230 // could lead to finality stalls.231 let grandpa_config = sc_finality_grandpa::GrandpaParams {232 config: grandpa_config,233 link: grandpa_link,234 network,235 telemetry_on_connect: telemetry_connection_notifier.map(|x| x.on_connect_stream()),236 voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(),237 prometheus_registry,238 shared_voter_state: SharedVoterState::empty(),239 };240241 // the GRANDPA voter task is considered infallible, i.e.242 // if it fails we take down the service with it.243 task_manager.spawn_essential_handle().spawn_blocking(244 "grandpa-voter",245 sc_finality_grandpa::run_grandpa_voter(grandpa_config)?246 );247 }248249 network_starter.start_network();250 Ok(task_manager)251}252/// Builds a new service for a light client.253pub fn new_light(mut config: Configuration) -> Result<TaskManager, ServiceError> {254 let (client, backend, keystore_container, mut task_manager, on_demand) =255 sc_service::new_light_parts::<Block, RuntimeApi, Executor>(&config)?;256257 config.network.extra_sets.push(sc_finality_grandpa::grandpa_peers_set_config());258259 let select_chain = sc_consensus::LongestChain::new(backend.clone());260261 let transaction_pool = Arc::new(sc_transaction_pool::BasicPool::new_light(262 config.transaction_pool.clone(),263 config.prometheus_registry(),264 task_manager.spawn_handle(),265 client.clone(),266 on_demand.clone(),267 ));268269 let (grandpa_block_import, _) = sc_finality_grandpa::block_import(270 client.clone(),271 &(client.clone() as Arc<_>),272 select_chain.clone(),273 )?;274275 let aura_block_import = sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new(276 grandpa_block_import.clone(),277 client.clone(),278 );279280 let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _, _>(281 sc_consensus_aura::slot_duration(&*client)?,282 aura_block_import,283 Some(Box::new(grandpa_block_import)),284 client.clone(),285 InherentDataProviders::new(),286 &task_manager.spawn_handle(),287 config.prometheus_registry(),288 sp_consensus::NeverCanAuthor,289 )?;290291 let (network, network_status_sinks, system_rpc_tx, network_starter) =292 sc_service::build_network(sc_service::BuildNetworkParams {293 config: &config,294 client: client.clone(),295 transaction_pool: transaction_pool.clone(),296 spawn_handle: task_manager.spawn_handle(),297 import_queue,298 on_demand: Some(on_demand.clone()),299 block_announce_validator_builder: None,300 })?;301302 if config.offchain_worker.enabled {303 sc_service::build_offchain_workers(304 &config, backend.clone(), task_manager.spawn_handle(), client.clone(), network.clone(),305 );306 }307308 sc_service::spawn_tasks(sc_service::SpawnTasksParams {309 remote_blockchain: Some(backend.remote_blockchain()),310 transaction_pool,311 task_manager: &mut task_manager,312 on_demand: Some(on_demand),313 rpc_extensions_builder: Box::new(|_, _| ()),314 config,315 client,316 keystore: keystore_container.sync_keystore(),317 backend,318 network,319 network_status_sinks,320 system_rpc_tx,321 })?;322323 network_starter.start_network();324325 Ok(task_manager)326}1//! Service and ServiceFactory implementation. Specialized wrapper over substrate service.23//4// This file is subject to the terms and conditions defined in5// file 'LICENSE', which is part of this source code package.6//78use std::sync::Arc;9use std::time::Duration;10use sc_client_api::{ExecutorProvider, RemoteBackend};11use nft_runtime::{self, opaque::Block, RuntimeApi};12use sc_service::{error::Error as ServiceError, Configuration, TaskManager};13use sp_inherents::InherentDataProviders;14use sc_executor::native_executor_instance;15pub use sc_executor::NativeExecutor;16use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair};17use sc_finality_grandpa::SharedVoterState;18use sc_keystore::LocalKeystore;1920// Our native executor instance.21native_executor_instance!(22 pub Executor,23 nft_runtime::api::dispatch,24 nft_runtime::native_version,25 frame_benchmarking::benchmarking::HostFunctions,26);2728type FullClient = sc_service::TFullClient<Block, RuntimeApi, Executor>;29type FullBackend = sc_service::TFullBackend<Block>;30type FullSelectChain = sc_consensus::LongestChain<FullBackend, Block>;3132pub fn new_partial(config: &Configuration) -> Result<sc_service::PartialComponents<33 FullClient, FullBackend, FullSelectChain,34 sp_consensus::DefaultImportQueue<Block, FullClient>,35 sc_transaction_pool::FullPool<Block, FullClient>,36 (37 sc_consensus_aura::AuraBlockImport<38 Block,39 FullClient,40 sc_finality_grandpa::GrandpaBlockImport<FullBackend, Block, FullClient, FullSelectChain>,41 AuraPair42 >,43 sc_finality_grandpa::LinkHalf<Block, FullClient, FullSelectChain>,44 )45>, ServiceError> {46 if config.keystore_remote.is_some() {47 return Err(ServiceError::Other(48 format!("Remote Keystores are not supported.")))49 }50 let inherent_data_providers = sp_inherents::InherentDataProviders::new();5152 let (client, backend, keystore_container, task_manager) =53 sc_service::new_full_parts::<Block, RuntimeApi, Executor>(&config)?;54 let client = Arc::new(client);5556 let select_chain = sc_consensus::LongestChain::new(backend.clone());5758 let transaction_pool = sc_transaction_pool::BasicPool::new_full(59 config.transaction_pool.clone(),60 config.role.is_authority().into(),61 config.prometheus_registry(),62 task_manager.spawn_handle(),63 client.clone(),64 );6566 let (grandpa_block_import, grandpa_link) = sc_finality_grandpa::block_import(67 client.clone(), &(client.clone() as Arc<_>), select_chain.clone(),68 )?;6970 let aura_block_import = sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new(71 grandpa_block_import.clone(), client.clone(),72 );7374 let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _, _>(75 sc_consensus_aura::slot_duration(&*client)?,76 aura_block_import.clone(),77 Some(Box::new(grandpa_block_import.clone())),78 client.clone(),79 inherent_data_providers.clone(),80 &task_manager.spawn_handle(),81 config.prometheus_registry(),82 sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()),83 )?;8485 Ok(sc_service::PartialComponents {86 client, backend, task_manager, import_queue, keystore_container, select_chain, transaction_pool,87 inherent_data_providers,88 other: (aura_block_import, grandpa_link),89 })90}9192fn remote_keystore(_url: &String) -> Result<Arc<LocalKeystore>, &'static str> {93 // FIXME: here would the concrete keystore be built,94 // must return a concrete type (NOT `LocalKeystore`) that95 // implements `CryptoStore` and `SyncCryptoStore`96 Err("Remote Keystore not supported.")97}9899/// Builds a new service for a full client.100pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError> {101 let sc_service::PartialComponents {102 client, backend, mut task_manager, import_queue, mut keystore_container, select_chain, transaction_pool,103 inherent_data_providers,104 other: (block_import, grandpa_link),105 } = new_partial(&config)?;106107 if let Some(url) = &config.keystore_remote {108 match remote_keystore(url) {109 Ok(k) => keystore_container.set_remote_keystore(k),110 Err(e) => {111 return Err(ServiceError::Other(112 format!("Error hooking up remote keystore for {}: {}", url, e)))113 }114 };115 }116117 config.network.extra_sets.push(sc_finality_grandpa::grandpa_peers_set_config());118119 let (network, network_status_sinks, system_rpc_tx, network_starter) =120 sc_service::build_network(sc_service::BuildNetworkParams {121 config: &config,122 client: client.clone(),123 transaction_pool: transaction_pool.clone(),124 spawn_handle: task_manager.spawn_handle(),125 import_queue,126 on_demand: None,127 block_announce_validator_builder: None,128 })?;129130 if config.offchain_worker.enabled {131 sc_service::build_offchain_workers(132 &config, backend.clone(), task_manager.spawn_handle(), client.clone(), network.clone(),133 );134 }135136 let role = config.role.clone();137 let force_authoring = config.force_authoring;138 let backoff_authoring_blocks: Option<()> = None;139 let name = config.network.node_name.clone();140 let enable_grandpa = !config.disable_grandpa;141 let prometheus_registry = config.prometheus_registry().cloned();142143 let rpc_extensions_builder = {144 let client = client.clone();145 let pool = transaction_pool.clone();146147 Box::new(move |deny_unsafe, _| {148 let deps = crate::rpc::FullDeps {149 client: client.clone(),150 pool: pool.clone(),151 deny_unsafe,152 };153154 crate::rpc::create_full(deps)155 })156 };157158 let (_rpc_handlers, telemetry_connection_notifier) = sc_service::spawn_tasks(159 sc_service::SpawnTasksParams {160 network: network.clone(),161 client: client.clone(),162 keystore: keystore_container.sync_keystore(),163 task_manager: &mut task_manager,164 transaction_pool: transaction_pool.clone(),165 rpc_extensions_builder,166 on_demand: None,167 remote_blockchain: None,168 backend,169 network_status_sinks,170 system_rpc_tx,171 config,172 },173 )?;174175 if role.is_authority() {176 let proposer = sc_basic_authorship::ProposerFactory::new(177 task_manager.spawn_handle(),178 client.clone(),179 transaction_pool,180 prometheus_registry.as_ref(),181 );182183 let can_author_with =184 sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone());185186 let aura = sc_consensus_aura::start_aura::<_, _, _, _, _, AuraPair, _, _, _, _>(187 sc_consensus_aura::slot_duration(&*client)?,188 client.clone(),189 select_chain,190 block_import,191 proposer,192 network.clone(),193 inherent_data_providers.clone(),194 force_authoring,195 backoff_authoring_blocks,196 keystore_container.sync_keystore(),197 can_author_with,198 )?;199200 // the AURA authoring task is considered essential, i.e. if it201 // fails we take down the service with it.202 task_manager.spawn_essential_handle().spawn_blocking("aura", aura);203 }204205 // if the node isn't actively participating in consensus then it doesn't206 // need a keystore, regardless of which protocol we use below.207 let keystore = if role.is_authority() {208 Some(keystore_container.sync_keystore())209 } else {210 None211 };212213 let grandpa_config = sc_finality_grandpa::Config {214 // FIXME #1578 make this available through chainspec215 gossip_duration: Duration::from_millis(333),216 justification_period: 512,217 name: Some(name),218 observer_enabled: false,219 keystore,220 is_authority: role.is_network_authority(),221 };222223 if enable_grandpa {224 // start the full GRANDPA voter225 // NOTE: non-authorities could run the GRANDPA observer protocol, but at226 // this point the full voter should provide better guarantees of block227 // and vote data availability than the observer. The observer has not228 // been tested extensively yet and having most nodes in a network run it229 // could lead to finality stalls.230 let grandpa_config = sc_finality_grandpa::GrandpaParams {231 config: grandpa_config,232 link: grandpa_link,233 network,234 telemetry_on_connect: telemetry_connection_notifier.map(|x| x.on_connect_stream()),235 voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(),236 prometheus_registry,237 shared_voter_state: SharedVoterState::empty(),238 };239240 // the GRANDPA voter task is considered infallible, i.e.241 // if it fails we take down the service with it.242 task_manager.spawn_essential_handle().spawn_blocking(243 "grandpa-voter",244 sc_finality_grandpa::run_grandpa_voter(grandpa_config)?245 );246 }247248 network_starter.start_network();249 Ok(task_manager)250}251/// Builds a new service for a light client.252pub fn new_light(mut config: Configuration) -> Result<TaskManager, ServiceError> {253 let (client, backend, keystore_container, mut task_manager, on_demand) =254 sc_service::new_light_parts::<Block, RuntimeApi, Executor>(&config)?;255256 config.network.extra_sets.push(sc_finality_grandpa::grandpa_peers_set_config());257258 let select_chain = sc_consensus::LongestChain::new(backend.clone());259260 let transaction_pool = Arc::new(sc_transaction_pool::BasicPool::new_light(261 config.transaction_pool.clone(),262 config.prometheus_registry(),263 task_manager.spawn_handle(),264 client.clone(),265 on_demand.clone(),266 ));267268 let (grandpa_block_import, _) = sc_finality_grandpa::block_import(269 client.clone(),270 &(client.clone() as Arc<_>),271 select_chain.clone(),272 )?;273274 let aura_block_import = sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new(275 grandpa_block_import.clone(),276 client.clone(),277 );278279 let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _, _>(280 sc_consensus_aura::slot_duration(&*client)?,281 aura_block_import,282 Some(Box::new(grandpa_block_import)),283 client.clone(),284 InherentDataProviders::new(),285 &task_manager.spawn_handle(),286 config.prometheus_registry(),287 sp_consensus::NeverCanAuthor,288 )?;289290 let (network, network_status_sinks, system_rpc_tx, network_starter) =291 sc_service::build_network(sc_service::BuildNetworkParams {292 config: &config,293 client: client.clone(),294 transaction_pool: transaction_pool.clone(),295 spawn_handle: task_manager.spawn_handle(),296 import_queue,297 on_demand: Some(on_demand.clone()),298 block_announce_validator_builder: None,299 })?;300301 if config.offchain_worker.enabled {302 sc_service::build_offchain_workers(303 &config, backend.clone(), task_manager.spawn_handle(), client.clone(), network.clone(),304 );305 }306307 sc_service::spawn_tasks(sc_service::SpawnTasksParams {308 remote_blockchain: Some(backend.remote_blockchain()),309 transaction_pool,310 task_manager: &mut task_manager,311 on_demand: Some(on_demand),312 rpc_extensions_builder: Box::new(|_, _| ()),313 config,314 client,315 keystore: keystore_container.sync_keystore(),316 backend,317 network,318 network_status_sinks,319 system_rpc_tx,320 })?;321322 network_starter.start_network();323324 Ok(task_manager)325}pallets/nft/src/lib.rsdiffbeforeafterboth--- a/pallets/nft/src/lib.rs
+++ b/pallets/nft/src/lib.rs
@@ -43,7 +43,6 @@
};
use sp_runtime::traits::StaticLookup;
use pallet_contracts::chain_extension::UncheckedFrom;
-use pallet_contracts::*;
use pallet_transaction_payment::OnChargeTransaction;
#[cfg(test)]
@@ -1118,13 +1117,11 @@
// Transfer permissions check
let target_collection = <Collection<T>>::get(collection_id);
- let allowance_limit = if (
- target_collection.limits.owner_can_transfer &&
+ let allowance_limit = if target_collection.limits.owner_can_transfer &&
Self::is_owner_or_admin_permissions(
collection_id,
sender.clone(),
- )
- ) {
+ ) {
None
} else if let Some(amount) = Self::owned_amount(
sender.clone(),