Add nonfungibles::Create Trait & Implement for Uniques (#9438)

* Add nonfungibles::Create Trait & Implement for Uniques

Closes #9419

* Formatting

* Remove default implementation (`TokenError::Unsupported`) from `Create` trait

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Formatting

* Do not wrap parameters in Options

* Formatting

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Dan ForbesandBastian Köcher authored and GitHub committed 2021-07-28 13:39:04 +00:00
1 parent 52aa9c2ef7
commit 76611ba6a3
4 files changed
+74 -40

No files matched your search

@@ -117,6 +117,12 @@ pub trait InspectEnumerable<AccountId>: Inspect<AccountId> {
) -> Box<dyn Iterator<Item = Self::InstanceId>>;
}
/// Trait for providing the ability to create classes of nonfungible assets.
pub trait Create<AccountId>: Inspect<AccountId> {
/// Create a `class` of nonfungible assets to be owned by `who` and managed by `admin`.
fn create_class(class: &Self::ClassId, who: &AccountId, admin: &AccountId) -> DispatchResult;
}
/// Trait for providing an interface for multiple classes of NFT-like assets which may be minted,
/// burned and/or have attributes set on them.
pub trait Mutate<AccountId>: Inspect<AccountId> {