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

difftreelog

chore fix cargo fmt

Grigoriy Simonov2022-10-25parent: #1ada10d.patch.diff
in: master

4 files changed

modifiednode/cli/src/command.rsdiffbeforeafterboth
3434
35use crate::{35use crate::{
36 chain_spec::{36 chain_spec::{self, RuntimeId, RuntimeIdentification, ServiceId, ServiceIdentification},
37 self, RuntimeId, RuntimeIdentification, ServiceId, ServiceIdentification, default_runtime,
38 },
39 cli::{Cli, RelayChainCli, Subcommand},37 cli::{Cli, RelayChainCli, Subcommand},
40 service::{new_partial, start_node, start_dev_node},38 service::{new_partial, start_node, start_dev_node},
46#[cfg(feature = "quartz-runtime")]44#[cfg(feature = "quartz-runtime")]
47use crate::service::QuartzRuntimeExecutor;45use crate::service::QuartzRuntimeExecutor;
4846
49use crate::service::{OpalRuntimeExecutor, DefaultRuntimeExecutor};47use crate::service::OpalRuntimeExecutor;
5048
51use codec::Encode;49use codec::Encode;
52use cumulus_primitives_core::ParaId;50use cumulus_primitives_core::ParaId;
modifiednode/cli/src/service.rsdiffbeforeafterboth
46use cumulus_relay_chain_rpc_interface::{RelayChainRpcInterface, create_client_and_start_worker};46use cumulus_relay_chain_rpc_interface::{RelayChainRpcInterface, create_client_and_start_worker};
4747
48// Substrate Imports48// Substrate Imports
49use sc_client_api::ExecutorProvider;
50use sc_executor::NativeElseWasmExecutor;49use sc_executor::NativeElseWasmExecutor;
51use sc_executor::NativeExecutionDispatch;50use sc_executor::NativeExecutionDispatch;
52use sc_network::{NetworkService, NetworkBlock};51use sc_network::{NetworkService, NetworkBlock};
84/// Opal native executor instance.83/// Opal native executor instance.
85pub struct OpalRuntimeExecutor;84pub struct OpalRuntimeExecutor;
86
87#[cfg(feature = "unique-runtime")]
88pub type DefaultRuntimeExecutor = UniqueRuntimeExecutor;
89
90#[cfg(all(not(feature = "unique-runtime"), feature = "quartz-runtime"))]
91pub type DefaultRuntimeExecutor = QuartzRuntimeExecutor;
92
93#[cfg(all(not(feature = "unique-runtime"), not(feature = "quartz-runtime")))]
94pub type DefaultRuntimeExecutor = OpalRuntimeExecutor;
9585
96#[cfg(feature = "unique-runtime")]86#[cfg(feature = "unique-runtime")]
97impl NativeExecutionDispatch for UniqueRuntimeExecutor {87impl NativeExecutionDispatch for UniqueRuntimeExecutor {
modifiedpallets/common/src/erc.rsdiffbeforeafterboth
27use sp_std::vec::Vec;27use sp_std::vec::Vec;
28use up_data_structs::{28use up_data_structs::{
29 AccessMode, CollectionMode, CollectionPermissions, OwnerRestrictedSet, Property,29 AccessMode, CollectionMode, CollectionPermissions, OwnerRestrictedSet, Property,
30 SponsoringRateLimit, SponsorshipState, PropertyKey,30 SponsoringRateLimit, SponsorshipState,
31};31};
32use alloc::format;32use alloc::format;
3333
modifiedpallets/unique/src/eth/mod.rsdiffbeforeafterboth
28 dispatch::CollectionDispatch,28 dispatch::CollectionDispatch,
29 erc::{29 erc::{static_property::key, CollectionHelpersEvents},
30 static_property::key,
31 CollectionHelpersEvents,
32 },
33 Pallet as PalletCommon,30 Pallet as PalletCommon,
34
38use sp_std::vec;34use sp_std::vec;
39use up_data_structs::{35use up_data_structs::{
40 CollectionDescription, CollectionMode, CollectionName, CollectionTokenPrefix,36 CollectionDescription, CollectionMode, CollectionName, CollectionTokenPrefix,
41 CreateCollectionData, PropertyValue,37 CreateCollectionData,
42};38};
4339
44use crate::{weights::WeightInfo, Config, SelfWeightOf};40use crate::{weights::WeightInfo, Config, SelfWeightOf};
88 Ok((caller, name, description, token_prefix))84 Ok((caller, name, description, token_prefix))
89}85}
90
91fn create_refungible_collection_internal<T: Config>(
92 caller: caller,
93 value: value,
94 name: string,
95 description: string,
96 token_prefix: string,
97) -> Result<address> {
98 self::create_collection_internal::<T>(
99 caller,
100 value,
101 name,
102 CollectionMode::ReFungible,
103 description,
104 token_prefix
105 )
106}
10786
108#[inline(always)]87#[inline(always)]
109fn create_collection_internal<T: Config>(88fn create_collection_internal<T: Config>(
244 )223 )
245 }224 }
246
247 #[weight(<SelfWeightOf<T>>::create_collection())]
248 #[solidity(rename_selector = "createERC721MetadataCompatibleRFTCollection")]
249 fn create_refungible_collection_with_properties(
250 &mut self,
251 caller: caller,
252 value: value,
253 name: string,
254 description: string,
255 token_prefix: string,
256 base_uri: string,
257 ) -> Result<address> {
258 create_collection_internal::<T>(
259 caller,
260 value,
261 name,
262 CollectionMode::ReFungible,
263 description,
264 token_prefix,
265 )
266 }
267225
268 #[weight(<SelfWeightOf<T>>::create_collection())]226 #[weight(<SelfWeightOf<T>>::create_collection())]
269 #[solidity(rename_selector = "createFTCollection")]227 #[solidity(rename_selector = "createFTCollection")]