mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-22 12:41:04 +00:00
Add ClassAccount storage to unique pallet (#9940)
* add ClassAccount to uniques storage * add tests for Class and ClassAccount storage * fix format * fix description * add migration * remove extra iteration * Update frame/uniques/src/migration.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_uniques --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/uniques/src/weights.rs --template=./.maintain/frame-weight-template.hbs * fix format Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: Parity Bot <admin@parity.io> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -81,6 +81,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
|
||||
},
|
||||
);
|
||||
|
||||
ClassAccount::<T, I>::insert(&owner, &class, ());
|
||||
Self::deposit_event(event);
|
||||
Ok(())
|
||||
}
|
||||
@@ -108,6 +109,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
|
||||
InstanceMetadataOf::<T, I>::remove_prefix(&class, None);
|
||||
ClassMetadataOf::<T, I>::remove(&class);
|
||||
Attribute::<T, I>::remove_prefix((&class,), None);
|
||||
ClassAccount::<T, I>::remove(&class_details.owner, &class);
|
||||
T::Currency::unreserve(&class_details.owner, class_details.total_deposit);
|
||||
|
||||
Self::deposit_event(Event::Destroyed { class });
|
||||
|
||||
Reference in New Issue
Block a user