Skip to content

Commit

Permalink
Expose Uniques helper functions and DestroyWitness fields (paritytech…
Browse files Browse the repository at this point in the history
  • Loading branch information
green-jay authored Dec 31, 2021
1 parent 88a0032 commit 1ca6b68
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions frame/uniques/src/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use frame_support::{ensure, traits::Get};
use sp_runtime::{DispatchError, DispatchResult};

impl<T: Config<I>, I: 'static> Pallet<T, I> {
pub(crate) fn do_transfer(
pub fn do_transfer(
class: T::ClassId,
instance: T::InstanceId,
dest: T::AccountId,
Expand Down Expand Up @@ -53,7 +53,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
Ok(())
}

pub(super) fn do_create_class(
pub fn do_create_class(
class: T::ClassId,
owner: T::AccountId,
admin: T::AccountId,
Expand Down Expand Up @@ -86,7 +86,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
Ok(())
}

pub(super) fn do_destroy_class(
pub fn do_destroy_class(
class: T::ClassId,
witness: DestroyWitness,
maybe_check_owner: Option<T::AccountId>,
Expand Down Expand Up @@ -122,7 +122,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
})
}

pub(super) fn do_mint(
pub fn do_mint(
class: T::ClassId,
instance: T::InstanceId,
owner: T::AccountId,
Expand Down Expand Up @@ -157,7 +157,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
Ok(())
}

pub(super) fn do_burn(
pub fn do_burn(
class: T::ClassId,
instance: T::InstanceId,
with_details: impl FnOnce(&ClassDetailsFor<T, I>, &InstanceDetailsFor<T, I>) -> DispatchResult,
Expand Down
6 changes: 3 additions & 3 deletions frame/uniques/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ pub struct ClassDetails<AccountId, DepositBalance> {
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<AccountId, DepositBalance> ClassDetails<AccountId, DepositBalance> {
Expand Down

0 comments on commit 1ca6b68

Please sign in to comment.