Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Uniques: Allowing multiple approvals #12164

Closed
wants to merge 12 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fmt
Szegoo committed Sep 1, 2022
commit 1cb6e9d0b50c1d99cd47eb3b68f2aabdf19506be
83 changes: 66 additions & 17 deletions frame/uniques/src/lib.rs
Original file line number Diff line number Diff line change
@@ -276,13 +276,26 @@ pub mod pallet {
#[pallet::generate_deposit(pub(super) fn deposit_event)]
pub enum Event<T: Config<I>, I: 'static = ()> {
/// A `collection` was created.
Created { collection: T::CollectionId, creator: T::AccountId, owner: T::AccountId },
Created {
collection: T::CollectionId,
creator: T::AccountId,
owner: T::AccountId,
},
/// A `collection` was force-created.
ForceCreated { collection: T::CollectionId, owner: T::AccountId },
ForceCreated {
collection: T::CollectionId,
owner: T::AccountId,
},
/// A `collection` was destroyed.
Destroyed { collection: T::CollectionId },
Destroyed {
collection: T::CollectionId,
},
/// An `item` was issued.
Issued { collection: T::CollectionId, item: T::ItemId, owner: T::AccountId },
Issued {
collection: T::CollectionId,
item: T::ItemId,
owner: T::AccountId,
},
/// An `item` was transferred.
Transferred {
collection: T::CollectionId,
@@ -291,17 +304,34 @@ pub mod pallet {
to: T::AccountId,
},
/// An `item` was destroyed.
Burned { collection: T::CollectionId, item: T::ItemId, owner: T::AccountId },
Burned {
collection: T::CollectionId,
item: T::ItemId,
owner: T::AccountId,
},
/// Some `item` was frozen.
Frozen { collection: T::CollectionId, item: T::ItemId },
Frozen {
collection: T::CollectionId,
item: T::ItemId,
},
/// Some `item` was thawed.
Thawed { collection: T::CollectionId, item: T::ItemId },
Thawed {
collection: T::CollectionId,
item: T::ItemId,
},
/// Some `collection` was frozen.
CollectionFrozen { collection: T::CollectionId },
CollectionFrozen {
collection: T::CollectionId,
},
/// Some `collection` was thawed.
CollectionThawed { collection: T::CollectionId },
CollectionThawed {
collection: T::CollectionId,
},
/// The owner changed.
OwnerChanged { collection: T::CollectionId, new_owner: T::AccountId },
OwnerChanged {
collection: T::CollectionId,
new_owner: T::AccountId,
},
/// The management team changed.
TeamChanged {
collection: T::CollectionId,
@@ -331,15 +361,19 @@ pub mod pallet {
owner: T::AccountId,
},
/// A `collection` has had its attributes changed by the `Force` origin.
ItemStatusChanged { collection: T::CollectionId },
ItemStatusChanged {
collection: T::CollectionId,
},
/// New metadata has been set for a `collection`.
CollectionMetadataSet {
collection: T::CollectionId,
data: BoundedVec<u8, T::StringLimit>,
is_frozen: bool,
},
/// Metadata has been cleared for a `collection`.
CollectionMetadataCleared { collection: T::CollectionId },
CollectionMetadataCleared {
collection: T::CollectionId,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to run rustup update and then: cargo +nightly fmt
The latest fmt shouldn't change the syntax that way

},
/// New metadata has been set for an item.
MetadataSet {
collection: T::CollectionId,
@@ -348,9 +382,15 @@ pub mod pallet {
is_frozen: bool,
},
/// Metadata has been cleared for an item.
MetadataCleared { collection: T::CollectionId, item: T::ItemId },
MetadataCleared {
collection: T::CollectionId,
item: T::ItemId,
},
/// Metadata has been cleared for an item.
Redeposited { collection: T::CollectionId, successful_items: Vec<T::ItemId> },
Redeposited {
collection: T::CollectionId,
successful_items: Vec<T::ItemId>,
},
/// New attribute metadata has been set for a `collection` or `item`.
AttributeSet {
collection: T::CollectionId,
@@ -365,9 +405,15 @@ pub mod pallet {
key: BoundedVec<u8, T::KeyLimit>,
},
/// Ownership acceptance has changed for an account.
OwnershipAcceptanceChanged { who: T::AccountId, maybe_collection: Option<T::CollectionId> },
OwnershipAcceptanceChanged {
who: T::AccountId,
maybe_collection: Option<T::CollectionId>,
},
/// Max supply has been set for a collection.
CollectionMaxSupplySet { collection: T::CollectionId, max_supply: u32 },
CollectionMaxSupplySet {
collection: T::CollectionId,
max_supply: u32,
},
/// The price was set for the instance.
ItemPriceSet {
collection: T::CollectionId,
@@ -376,7 +422,10 @@ pub mod pallet {
whitelisted_buyer: Option<T::AccountId>,
},
/// The price for the instance was removed.
ItemPriceRemoved { collection: T::CollectionId, item: T::ItemId },
ItemPriceRemoved {
collection: T::CollectionId,
item: T::ItemId,
},
/// An item was bought.
ItemBought {
collection: T::CollectionId,