|
27 | 27 | //! Implementations of these traits may be converted to implementations of corresponding |
28 | 28 | //! `nonfungible` traits by using the `nonfungible::ItemOf` type adapter. |
29 | 29 |
|
30 | | -use crate::dispatch::{DispatchError, DispatchResult}; |
| 30 | +use crate::dispatch::{DispatchError, DispatchResult, Parameter}; |
31 | 31 | use codec::{Decode, Encode}; |
32 | 32 | use sp_runtime::TokenError; |
33 | 33 | use sp_std::prelude::*; |
34 | 34 |
|
35 | 35 | /// Trait for providing an interface to many read-only NFT-like sets of items. |
36 | 36 | pub trait Inspect<AccountId> { |
37 | 37 | /// Type for identifying an item. |
38 | | - type ItemId; |
| 38 | + type ItemId: Parameter; |
39 | 39 |
|
40 | 40 | /// Type for identifying a collection (an identifier for an independent collection of |
41 | 41 | /// items). |
42 | | - type CollectionId; |
| 42 | + type CollectionId: Parameter; |
43 | 43 |
|
44 | 44 | /// Returns the owner of `item` of `collection`, or `None` if the item doesn't exist |
45 | 45 | /// (or somehow has no owner). |
@@ -193,7 +193,7 @@ pub trait Create<AccountId, CollectionConfig>: Inspect<AccountId> { |
193 | 193 | /// Trait for providing the ability to destroy collections of nonfungible items. |
194 | 194 | pub trait Destroy<AccountId>: Inspect<AccountId> { |
195 | 195 | /// The witness data needed to destroy an item. |
196 | | - type DestroyWitness; |
| 196 | + type DestroyWitness: Parameter; |
197 | 197 |
|
198 | 198 | /// Provide the appropriate witness data needed to destroy an item. |
199 | 199 | fn get_destroy_witness(collection: &Self::CollectionId) -> Option<Self::DestroyWitness>; |
|
0 commit comments