From 1ca6b68cf8cd35a1c58f790c28e51ae726272ee9 Mon Sep 17 00:00:00 2001 From: green-jay <75261756+green-jay@users.noreply.github.com> Date: Fri, 31 Dec 2021 11:49:04 +0100 Subject: [PATCH] Expose Uniques helper functions and DestroyWitness fields (#10529) --- frame/uniques/src/functions.rs | 10 +++++----- frame/uniques/src/types.rs | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/frame/uniques/src/functions.rs b/frame/uniques/src/functions.rs index e0ee09ab62d9d..9c3a5c1b19f86 100644 --- a/frame/uniques/src/functions.rs +++ b/frame/uniques/src/functions.rs @@ -22,7 +22,7 @@ use frame_support::{ensure, traits::Get}; use sp_runtime::{DispatchError, DispatchResult}; impl, I: 'static> Pallet { - pub(crate) fn do_transfer( + pub fn do_transfer( class: T::ClassId, instance: T::InstanceId, dest: T::AccountId, @@ -53,7 +53,7 @@ impl, I: 'static> Pallet { Ok(()) } - pub(super) fn do_create_class( + pub fn do_create_class( class: T::ClassId, owner: T::AccountId, admin: T::AccountId, @@ -86,7 +86,7 @@ impl, I: 'static> Pallet { Ok(()) } - pub(super) fn do_destroy_class( + pub fn do_destroy_class( class: T::ClassId, witness: DestroyWitness, maybe_check_owner: Option, @@ -122,7 +122,7 @@ impl, I: 'static> Pallet { }) } - pub(super) fn do_mint( + pub fn do_mint( class: T::ClassId, instance: T::InstanceId, owner: T::AccountId, @@ -157,7 +157,7 @@ impl, I: 'static> Pallet { Ok(()) } - pub(super) fn do_burn( + pub fn do_burn( class: T::ClassId, instance: T::InstanceId, with_details: impl FnOnce(&ClassDetailsFor, &InstanceDetailsFor) -> DispatchResult, diff --git a/frame/uniques/src/types.rs b/frame/uniques/src/types.rs index 1e4405aa09c84..5ba443dba6c4b 100644 --- a/frame/uniques/src/types.rs +++ b/frame/uniques/src/types.rs @@ -58,13 +58,13 @@ pub struct ClassDetails { pub struct DestroyWitness { /// The total number of outstanding instances of this asset class. #[codec(compact)] - pub(super) instances: u32, + pub instances: u32, /// The total number of outstanding instance metadata of this asset class. #[codec(compact)] - pub(super) instance_metadatas: u32, + pub instance_metadatas: u32, #[codec(compact)] /// The total number of attributes for this asset class. - pub(super) attributes: u32, + pub attributes: u32, } impl ClassDetails {