mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-22 09:11:02 +00:00
Add field names to pallet Event variants (#10184)
* Changed named fields to struct variants * Fixed errors. * Made adjustments as per `cargo +nightly fmt`. * Update frame/uniques/src/lib.rs Co-authored-by: Alexander Theißen <alex.theissen@me.com> * Removed redundant comments for structs. * Moved frame-support to dev dependencies Co-authored-by: Alexander Theißen <alex.theissen@me.com>
This commit is contained in:
@@ -44,7 +44,12 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
|
||||
details.owner = dest;
|
||||
Asset::<T, I>::insert(&class, &instance, &details);
|
||||
|
||||
Self::deposit_event(Event::Transferred(class, instance, origin, details.owner));
|
||||
Self::deposit_event(Event::Transferred {
|
||||
class,
|
||||
instance,
|
||||
from: origin,
|
||||
to: details.owner,
|
||||
});
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -105,7 +110,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
|
||||
Attribute::<T, I>::remove_prefix((&class,), None);
|
||||
T::Currency::unreserve(&class_details.owner, class_details.total_deposit);
|
||||
|
||||
Self::deposit_event(Event::Destroyed(class));
|
||||
Self::deposit_event(Event::Destroyed { class });
|
||||
|
||||
Ok(DestroyWitness {
|
||||
instances: class_details.instances,
|
||||
@@ -146,7 +151,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
|
||||
Ok(())
|
||||
})?;
|
||||
|
||||
Self::deposit_event(Event::Issued(class, instance, owner));
|
||||
Self::deposit_event(Event::Issued { class, instance, owner });
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -174,7 +179,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
|
||||
Asset::<T, I>::remove(&class, &instance);
|
||||
Account::<T, I>::remove((&owner, &class, &instance));
|
||||
|
||||
Self::deposit_event(Event::Burned(class, instance, owner));
|
||||
Self::deposit_event(Event::Burned { class, instance, owner });
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user