mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 21:01:03 +00:00
Expose Uniques helper functions and DestroyWitness fields (#10529)
This commit is contained in:
@@ -22,7 +22,7 @@ use frame_support::{ensure, traits::Get};
|
|||||||
use sp_runtime::{DispatchError, DispatchResult};
|
use sp_runtime::{DispatchError, DispatchResult};
|
||||||
|
|
||||||
impl<T: Config<I>, I: 'static> Pallet<T, I> {
|
impl<T: Config<I>, I: 'static> Pallet<T, I> {
|
||||||
pub(crate) fn do_transfer(
|
pub fn do_transfer(
|
||||||
class: T::ClassId,
|
class: T::ClassId,
|
||||||
instance: T::InstanceId,
|
instance: T::InstanceId,
|
||||||
dest: T::AccountId,
|
dest: T::AccountId,
|
||||||
@@ -53,7 +53,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(super) fn do_create_class(
|
pub fn do_create_class(
|
||||||
class: T::ClassId,
|
class: T::ClassId,
|
||||||
owner: T::AccountId,
|
owner: T::AccountId,
|
||||||
admin: T::AccountId,
|
admin: T::AccountId,
|
||||||
@@ -86,7 +86,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(super) fn do_destroy_class(
|
pub fn do_destroy_class(
|
||||||
class: T::ClassId,
|
class: T::ClassId,
|
||||||
witness: DestroyWitness,
|
witness: DestroyWitness,
|
||||||
maybe_check_owner: Option<T::AccountId>,
|
maybe_check_owner: Option<T::AccountId>,
|
||||||
@@ -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,
|
class: T::ClassId,
|
||||||
instance: T::InstanceId,
|
instance: T::InstanceId,
|
||||||
owner: T::AccountId,
|
owner: T::AccountId,
|
||||||
@@ -157,7 +157,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(super) fn do_burn(
|
pub fn do_burn(
|
||||||
class: T::ClassId,
|
class: T::ClassId,
|
||||||
instance: T::InstanceId,
|
instance: T::InstanceId,
|
||||||
with_details: impl FnOnce(&ClassDetailsFor<T, I>, &InstanceDetailsFor<T, I>) -> DispatchResult,
|
with_details: impl FnOnce(&ClassDetailsFor<T, I>, &InstanceDetailsFor<T, I>) -> DispatchResult,
|
||||||
|
|||||||
@@ -58,13 +58,13 @@ pub struct ClassDetails<AccountId, DepositBalance> {
|
|||||||
pub struct DestroyWitness {
|
pub struct DestroyWitness {
|
||||||
/// The total number of outstanding instances of this asset class.
|
/// The total number of outstanding instances of this asset class.
|
||||||
#[codec(compact)]
|
#[codec(compact)]
|
||||||
pub(super) instances: u32,
|
pub instances: u32,
|
||||||
/// The total number of outstanding instance metadata of this asset class.
|
/// The total number of outstanding instance metadata of this asset class.
|
||||||
#[codec(compact)]
|
#[codec(compact)]
|
||||||
pub(super) instance_metadatas: u32,
|
pub instance_metadatas: u32,
|
||||||
#[codec(compact)]
|
#[codec(compact)]
|
||||||
/// The total number of attributes for this asset class.
|
/// The total number of attributes for this asset class.
|
||||||
pub(super) attributes: u32,
|
pub attributes: u32,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<AccountId, DepositBalance> ClassDetails<AccountId, DepositBalance> {
|
impl<AccountId, DepositBalance> ClassDetails<AccountId, DepositBalance> {
|
||||||
|
|||||||
Reference in New Issue
Block a user