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

difftreelog

misc: fix after rebase

Trubnikov Sergey2022-07-22parent: #ce8edd2.patch.diff
in: master

1 file changed

modifiedpallets/unique/src/eth/mod.rsdiffbeforeafterboth
23use pallet_evm::{OnMethodCall, PrecompileResult, account::CrossAccountId, PrecompileHandle};23use pallet_evm::{OnMethodCall, PrecompileResult, account::CrossAccountId, PrecompileHandle};
24use up_data_structs::{24use up_data_structs::{
25 CollectionName, CollectionDescription, CollectionTokenPrefix, CreateCollectionData,25 CollectionName, CollectionDescription, CollectionTokenPrefix, CreateCollectionData,
26 CollectionMode, PropertyValue, CollectionTokenPrefix,26 CollectionMode, PropertyValue,
27};27};
28use frame_support::traits::Get;28use frame_support::traits::Get;
29use pallet_common::{29use pallet_common::{
150150
151/// @title Contract, which allows users to operate with collections151/// @title Contract, which allows users to operate with collections
152#[solidity_interface(name = "CollectionHelpers", events(CollectionHelpersEvents))]152#[solidity_interface(name = "CollectionHelpers", events(CollectionHelpersEvents))]
153impl<T: Config + pallet_nonfungible::Config> EvmCollectionHelpers<T> {153impl<T> EvmCollectionHelpers<T>
154where
155 T: Config + pallet_nonfungible::Config + pallet_refungible::Config
156{
154 /// Create an NFT collection157 /// Create an NFT collection
155 /// @param name Name of the collection158 /// @param name Name of the collection
218 description: string,221 description: string,
219 token_prefix: string,222 token_prefix: string,
220 ) -> Result<address> {223 ) -> Result<address> {
221 let (caller, name, description, token_prefix) =224 let (caller, name, description, token_prefix, _base_uri) =
222 convert_data::<T>(caller, name, description, token_prefix)?;225 convert_data::<T>(caller, name, description, token_prefix, "".into())?;
223 let data = make_data::<T>(name, CollectionMode::ReFungible, description, token_prefix)?;226 let data = make_data::<T>(
227 name,
228 CollectionMode::ReFungible,
229 description,
230 token_prefix,
231 Default::default(),
232 false,
233 )?;
224 let collection_id = <pallet_refungible::Pallet<T>>::init_collection(caller.clone(), data)234 let collection_id = <pallet_refungible::Pallet<T>>::init_collection(caller.clone(), data)
225 .map_err(pallet_evm_coder_substrate::dispatch_to_evm::<T>)?;235 .map_err(pallet_evm_coder_substrate::dispatch_to_evm::<T>)?;