mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-21 16:45:41 +00:00
Minor Uniques pallet improvements and XCM v3 preparations (#10896)
* Introduce Helper to Uniques for benchmark stuff * Fixes * Formatting * Featuregate the Helper, include ContainsPair * Introduce & use EnsureOriginWithArg * Benchmarking * Docs * More ContainsBoth helpers * Formatting * Formatting * Fixes Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -85,7 +85,10 @@ pub trait Mutate<AccountId>: Inspect<AccountId> {
|
||||
/// Burn some asset `instance`.
|
||||
///
|
||||
/// By default, this is not a supported operation.
|
||||
fn burn_from(_instance: &Self::InstanceId) -> DispatchResult {
|
||||
fn burn(
|
||||
_instance: &Self::InstanceId,
|
||||
_maybe_check_owner: Option<&AccountId>,
|
||||
) -> DispatchResult {
|
||||
Err(TokenError::Unsupported.into())
|
||||
}
|
||||
|
||||
@@ -166,8 +169,8 @@ impl<
|
||||
fn mint_into(instance: &Self::InstanceId, who: &AccountId) -> DispatchResult {
|
||||
<F as nonfungibles::Mutate<AccountId>>::mint_into(&A::get(), instance, who)
|
||||
}
|
||||
fn burn_from(instance: &Self::InstanceId) -> DispatchResult {
|
||||
<F as nonfungibles::Mutate<AccountId>>::burn_from(&A::get(), instance)
|
||||
fn burn(instance: &Self::InstanceId, maybe_check_owner: Option<&AccountId>) -> DispatchResult {
|
||||
<F as nonfungibles::Mutate<AccountId>>::burn(&A::get(), instance, maybe_check_owner)
|
||||
}
|
||||
fn set_attribute(instance: &Self::InstanceId, key: &[u8], value: &[u8]) -> DispatchResult {
|
||||
<F as nonfungibles::Mutate<AccountId>>::set_attribute(&A::get(), instance, key, value)
|
||||
|
||||
@@ -165,7 +165,11 @@ pub trait Mutate<AccountId>: Inspect<AccountId> {
|
||||
/// Burn some asset `instance` of `class`.
|
||||
///
|
||||
/// By default, this is not a supported operation.
|
||||
fn burn_from(_class: &Self::ClassId, _instance: &Self::InstanceId) -> DispatchResult {
|
||||
fn burn(
|
||||
_class: &Self::ClassId,
|
||||
_instance: &Self::InstanceId,
|
||||
_maybe_check_owner: Option<&AccountId>,
|
||||
) -> DispatchResult {
|
||||
Err(TokenError::Unsupported.into())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user