mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 05:47:58 +00:00
Use 'Items' and 'Collections' in uniques pallet (#11389)
* Rename class to collection * Use "assets collection" instead of "asset collection" * Rename 'instance' to 'asset' * Change "asset `collection`" to "`collection`" * A bit more clean up * Rename Asset to Item * Add a storage hack * Typos * fix compile * fmt * Fix * cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --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 * Update frame/uniques/src/lib.rs * cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --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 * Change 'items collection' to 'collection' * Apply suggestions Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: Parity Bot <admin@parity.io>
This commit is contained in:
@@ -34,8 +34,8 @@ pub fn migrate_to_v1<T: Config<I>, I: 'static, P: GetStorageVersion + PalletInfo
|
||||
|
||||
if on_chain_storage_version < 1 {
|
||||
let mut count = 0;
|
||||
for (class, detail) in Class::<T, I>::iter() {
|
||||
ClassAccount::<T, I>::insert(&detail.owner, &class, ());
|
||||
for (collection, detail) in Collection::<T, I>::iter() {
|
||||
CollectionAccount::<T, I>::insert(&detail.owner, &collection, ());
|
||||
count += 1;
|
||||
}
|
||||
StorageVersion::new(1).put::<P>();
|
||||
|
||||
Reference in New Issue
Block a user