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:
Jegor Sidorenko
2022-05-16 15:38:12 +02:00
committed by GitHub
parent 359849b169
commit ed7d1e7ac0
13 changed files with 1114 additions and 1076 deletions
+2 -2
View File
@@ -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>();