git.delta.rocks / unique-network / refs/commits / fc4b45cb8d75

difftreelog

NFTPAR-183: Storage Refactoring. twox_64_concat for AccountId storage keys.

sotmorskiy2020-12-11parent: #b7831a8.patch.diff
in: master

1 file changed

modifiedpallets/nft/src/lib.rsdiffbeforeafterboth
358358
359 // Bound counters359 // Bound counters
360 CollectionCount: u32;360 CollectionCount: u32;
361 pub AccountItemCount get(fn account_item_count): map hasher(identity) T::AccountId => u32;361 pub AccountItemCount get(fn account_item_count): map hasher(twox_64_concat) T::AccountId => u32;
362362
363 // Basic collections363 // Basic collections
364 pub Collection get(fn collection) config(): map hasher(identity) CollectionId => CollectionType<T::AccountId>;364 pub Collection get(fn collection) config(): map hasher(identity) CollectionId => CollectionType<T::AccountId>;
365 pub AdminList get(fn admin_list_collection): map hasher(identity) CollectionId => Vec<T::AccountId>;365 pub AdminList get(fn admin_list_collection): map hasher(identity) CollectionId => Vec<T::AccountId>;
366 pub WhiteList get(fn white_list): map hasher(identity) CollectionId => Vec<T::AccountId>;366 pub WhiteList get(fn white_list): map hasher(identity) CollectionId => Vec<T::AccountId>;
367367
368 /// Balance owner per collection map368 /// Balance owner per collection map
369 pub Balance get(fn balance_count): double_map hasher(identity) CollectionId, hasher(identity) T::AccountId => u128;369 pub Balance get(fn balance_count): double_map hasher(identity) CollectionId, hasher(twox_64_concat) T::AccountId => u128;
370370
371 /// second parameter: item id + owner account id371 /// second parameter: item id + owner account id
372 pub ApprovedList get(fn approved): double_map hasher(identity) CollectionId, hasher(identity) (TokenId, T::AccountId) => Vec<ApprovePermissions<T::AccountId>>;372 pub ApprovedList get(fn approved): double_map hasher(identity) CollectionId, hasher(twox_64_concat) (TokenId, T::AccountId) => Vec<ApprovePermissions<T::AccountId>>;
373373
374 /// Item collections374 /// Item collections
375 pub NftItemList get(fn nft_item_id) config(): double_map hasher(identity) CollectionId, hasher(identity) TokenId => NftItemType<T::AccountId>;375 pub NftItemList get(fn nft_item_id) config(): double_map hasher(identity) CollectionId, hasher(identity) TokenId => NftItemType<T::AccountId>;
376 pub FungibleItemList get(fn fungible_item_id) config(): double_map hasher(identity) CollectionId, hasher(identity) TokenId => FungibleItemType<T::AccountId>;376 pub FungibleItemList get(fn fungible_item_id) config(): double_map hasher(identity) CollectionId, hasher(identity) TokenId => FungibleItemType<T::AccountId>;
377 pub ReFungibleItemList get(fn refungible_item_id) config(): double_map hasher(identity) CollectionId, hasher(identity) TokenId => ReFungibleItemType<T::AccountId>;377 pub ReFungibleItemList get(fn refungible_item_id) config(): double_map hasher(identity) CollectionId, hasher(identity) TokenId => ReFungibleItemType<T::AccountId>;
378378
379 /// Index list379 /// Index list
380 pub AddressTokens get(fn address_tokens): double_map hasher(identity) CollectionId, hasher(identity) T::AccountId => Vec<TokenId>;380 pub AddressTokens get(fn address_tokens): double_map hasher(identity) CollectionId, hasher(twox_64_concat) T::AccountId => Vec<TokenId>;
381381
382 /// Tokens transfer baskets382 /// Tokens transfer baskets
383 pub NftTransferBasket get(fn nft_transfer_basket): double_map hasher(identity) CollectionId, hasher(identity) TokenId => T::BlockNumber;383 pub NftTransferBasket get(fn nft_transfer_basket): double_map hasher(identity) CollectionId, hasher(identity) TokenId => T::BlockNumber;
384 pub FungibleTransferBasket get(fn fungible_transfer_basket): double_map hasher(identity) CollectionId, hasher(identity) TokenId => Vec<BasketItem<T::AccountId, T::BlockNumber>>;384 pub FungibleTransferBasket get(fn fungible_transfer_basket): double_map hasher(identity) CollectionId, hasher(identity) TokenId => Vec<BasketItem<T::AccountId, T::BlockNumber>>;
385 pub ReFungibleTransferBasket get(fn refungible_transfer_basket): double_map hasher(identity) CollectionId, hasher(identity) TokenId => T::BlockNumber;385 pub ReFungibleTransferBasket get(fn refungible_transfer_basket): double_map hasher(identity) CollectionId, hasher(identity) TokenId => T::BlockNumber;
386386
387 // Contract Sponsorship and Ownership387 // Contract Sponsorship and Ownership
388 pub ContractOwner get(fn contract_owner): map hasher(identity) T::AccountId => T::AccountId;388 pub ContractOwner get(fn contract_owner): map hasher(twox_64_concat) T::AccountId => T::AccountId;
389 pub ContractSelfSponsoring get(fn contract_self_sponsoring): map hasher(identity) T::AccountId => bool;389 pub ContractSelfSponsoring get(fn contract_self_sponsoring): map hasher(twox_64_concat) T::AccountId => bool;
390 pub ContractSponsorBasket get(fn contract_sponsor_basket): map hasher(identity) T::AccountId => T::BlockNumber;390 pub ContractSponsorBasket get(fn contract_sponsor_basket): map hasher(twox_64_concat) T::AccountId => T::BlockNumber;
391 pub ContractSponsoringRateLimit get(fn contract_sponsoring_rate_limit): map hasher(identity) T::AccountId => T::BlockNumber;391 pub ContractSponsoringRateLimit get(fn contract_sponsoring_rate_limit): map hasher(twox_64_concat) T::AccountId => T::BlockNumber;
392 }392 }
393 add_extra_genesis {393 add_extra_genesis {
394 build(|config: &GenesisConfig<T>| {394 build(|config: &GenesisConfig<T>| {