difftreelog
added consts to `Unique` pallet
in: master
6 files changed
pallets/unique/src/lib.rsdiffbeforeafterboth86use sp_std::{vec, vec::Vec};86use sp_std::{vec, vec::Vec};87use up_data_structs::{87use up_data_structs::{88 MAX_COLLECTION_NAME_LENGTH, MAX_COLLECTION_DESCRIPTION_LENGTH, MAX_TOKEN_PREFIX_LENGTH,88 MAX_COLLECTION_NAME_LENGTH, MAX_COLLECTION_DESCRIPTION_LENGTH, MAX_TOKEN_PREFIX_LENGTH,89 MAX_PROPERTIES_PER_ITEM, MAX_PROPERTY_KEY_LENGTH, MAX_PROPERTY_VALUE_LENGTH,90 MAX_COLLECTION_PROPERTIES_SIZE, COLLECTION_ADMINS_LIMIT, MAX_TOKEN_PROPERTIES_SIZE,89 CreateItemData, CollectionLimits, CollectionPermissions, CollectionId, CollectionMode, TokenId,91 CreateItemData, CollectionLimits, CollectionPermissions, CollectionId, CollectionMode, TokenId,90 SponsorshipState, CreateCollectionData, CreateItemExData, budget, Property, PropertyKey,92 SponsorshipState, CreateCollectionData, CreateItemExData, budget, Property, PropertyKey,91 PropertyKeyPermission,93 PropertyKeyPermission,277 {279 {278 type Error = Error<T>;280 type Error = Error<T>;281282 #[doc = "Maximum number of levels of depth in the token nesting tree."]283 const NESTING_BUDGET: u32 = NESTING_BUDGET;284285 #[doc = "Maximum length for collection name."]286 const MAX_COLLECTION_NAME_LENGTH: u32 = MAX_COLLECTION_NAME_LENGTH;287288 #[doc = "Maximum length for collection description."]289 const MAX_COLLECTION_DESCRIPTION_LENGTH: u32 = MAX_COLLECTION_DESCRIPTION_LENGTH;290291 #[doc = "Maximal token prefix length."]292 const MAX_TOKEN_PREFIX_LENGTH: u32 = MAX_TOKEN_PREFIX_LENGTH;293294 #[doc = "Maximum admins per collection."]295 const COLLECTION_ADMINS_LIMIT: u32 = COLLECTION_ADMINS_LIMIT;296297 #[doc = "Maximal lenght of property key."]298 const MAX_PROPERTY_KEY_LENGTH: u32 = MAX_PROPERTY_KEY_LENGTH;299300 #[doc = "Maximal lenght of property value."]301 const MAX_PROPERTY_VALUE_LENGTH: u32 = MAX_PROPERTY_VALUE_LENGTH;302303 #[doc = "Maximum properties that can be assigned to token."]304 const MAX_PROPERTIES_PER_ITEM: u32 = MAX_PROPERTIES_PER_ITEM;305306 #[doc = "Maximum size for all collection properties."]307 const MAX_COLLECTION_PROPERTIES_SIZE: u32 = MAX_COLLECTION_PROPERTIES_SIZE;308309 #[doc = "Maximum size for all token properties."]310 const MAX_TOKEN_PROPERTIES_SIZE: u32 = MAX_TOKEN_PROPERTIES_SIZE;311312 #[doc = "Default NFT collection limit."]313 const NFT_DEFAULT_COLLECTION_LIMITS: CollectionLimits = CollectionLimits::with_default_limits(CollectionMode::NFT);314315 #[doc = "Default RFT collection limit."]316 const RFT_DEFAULT_COLLECTION_LIMITS: CollectionLimits = CollectionLimits::with_default_limits(CollectionMode::ReFungible);317318 #[doc = "Default FT collection limit."]319 const FT_DEFAULT_COLLECTION_LIMITS: CollectionLimits = CollectionLimits::with_default_limits(CollectionMode::Fungible(0));320279321280 pub fn deposit_event() = default;322 pub fn deposit_event() = default;primitives/data-structs/CHANGELOG.mddiffbeforeafterboth3All notable changes to this project will be documented in this file.3All notable changes to this project will be documented in this file.445<!-- bureaucrate goes here -->5<!-- bureaucrate goes here -->66## [v0.2.2] 2022-08-167## [v0.2.2] 2022-08-16788### Other changes9### Other changes28multiple users into `RefungibleMultipleItems` call.29multiple users into `RefungibleMultipleItems` call.293030## [v0.2.0] - 2022-08-0131## [v0.2.0] - 2022-08-013231### Deprecated33### Deprecated3432- `CreateReFungibleData::const_data`35- `CreateReFungibleData::const_data`333634## [v0.1.2] - 2022-07-2537## [v0.1.2] - 2022-07-253835### Added39### Added4036- Type aliases `CollectionName`, `CollectionDescription`, `CollectionTokenPrefix`41- Type aliases `CollectionName`, `CollectionDescription`, `CollectionTokenPrefix`4237## [v0.1.1] - 2022-07-2243## [v0.1.1] - 2022-07-224438### Added45### Added4639- Аields with properties to `CreateReFungibleData` and `CreateRefungibleExData`.47- Аields with properties to `CreateReFungibleData` and `CreateRefungibleExData`.48primitives/data-structs/src/lib.rsdiffbeforeafterboth609}609}610610611impl CollectionLimits {611impl CollectionLimits {612 pub fn with_default_limits(collection_type: CollectionMode) -> Self {613 CollectionLimits {614 account_token_ownership_limit: Some(ACCOUNT_TOKEN_OWNERSHIP_LIMIT),615 sponsored_data_size: Some(CUSTOM_DATA_LIMIT),616 sponsored_data_rate_limit: Some(SponsoringRateLimit::SponsoringDisabled),617 token_limit: Some(COLLECTION_TOKEN_LIMIT),618 sponsor_transfer_timeout: match collection_type {619 CollectionMode::NFT => Some(NFT_SPONSOR_TRANSFER_TIMEOUT),620 CollectionMode::ReFungible => Some(REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT),621 CollectionMode::Fungible(_) => Some(FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT),622 },623 sponsor_approve_timeout: Some(SPONSOR_APPROVE_TIMEOUT),624 owner_can_transfer: Some(false),625 owner_can_destroy: Some(true),626 transfers_enabled: Some(true),627 }628 }629612 /// Get effective value for [`account_token_ownership_limit`](self.account_token_ownership_limit).630 /// Get effective value for [`account_token_ownership_limit`](self.account_token_ownership_limit).613 pub fn account_token_ownership_limit(&self) -> u32 {631 pub fn account_token_ownership_limit(&self) -> u32 {tests/package.jsondiffbeforeafterboth102 "testXcmTransferStatemine": "mocha --timeout 9999999 -r ts-node/register ./**/xcm/xcmTransferStatemine.test.ts statemineId=1000 uniqueId=5000",102 "testXcmTransferStatemine": "mocha --timeout 9999999 -r ts-node/register ./**/xcm/xcmTransferStatemine.test.ts statemineId=1000 uniqueId=5000",103 "testXcmTransferMoonbeam": "mocha --timeout 9999999 -r ts-node/register ./**/xcm/xcmTransferMoonbeam.test.ts",103 "testXcmTransferMoonbeam": "mocha --timeout 9999999 -r ts-node/register ./**/xcm/xcmTransferMoonbeam.test.ts",104 "benchMintingFee": "ts-node src/benchmarks/mintFee/benchmark.ts",104 "benchMintingFee": "ts-node src/benchmarks/mintFee/benchmark.ts",105 "testApiConsts": "mocha --timeout 9999999 -r ts-node/register ./**/apiConsts.test.ts",105 "load": "mocha --timeout 9999999 -r ts-node/register './**/*.load.ts'",106 "load": "mocha --timeout 9999999 -r ts-node/register './**/*.load.ts'",106 "loadTransfer": "ts-node src/transfer.nload.ts",107 "loadTransfer": "ts-node src/transfer.nload.ts",107 "polkadot-types-fetch-metadata": "curl -H 'Content-Type: application/json' -d '{\"id\":\"1\", \"jsonrpc\":\"2.0\", \"method\": \"state_getMetadata\", \"params\":[]}' http://localhost:9933 > src/interfaces/metadata.json",108 "polkadot-types-fetch-metadata": "curl -H 'Content-Type: application/json' -d '{\"id\":\"1\", \"jsonrpc\":\"2.0\", \"method\": \"state_getMetadata\", \"params\":[]}' http://localhost:9933 > src/interfaces/metadata.json",tests/src/apiConsts.test.tsdiffbeforeafterbothno changes
tests/src/interfaces/augment-api-consts.tsdiffbeforeafterboth9import type { Option, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';9import type { Option, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';10import type { Codec } from '@polkadot/types-codec/types';10import type { Codec } from '@polkadot/types-codec/types';11import type { Perbill, Permill, Weight } from '@polkadot/types/interfaces/runtime';11import type { Perbill, Permill, Weight } from '@polkadot/types/interfaces/runtime';12import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, XcmV1MultiLocation } from '@polkadot/types/lookup';12import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, UpDataStructsCollectionLimits, XcmV1MultiLocation } from '@polkadot/types/lookup';131314export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;14export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;1515231 **/231 **/232 [key: string]: Codec;232 [key: string]: Codec;233 };233 };234 unique: {235 /**236 * Maximum admins per collection.237 **/238 collectionAdminsLimit: u32 & AugmentedConst<ApiType>;239 /**240 * Default FT collection limit.241 **/242 ftDefaultCollectionLimits: UpDataStructsCollectionLimits & AugmentedConst<ApiType>;243 /**244 * Maximum length for collection description.245 **/246 maxCollectionDescriptionLength: u32 & AugmentedConst<ApiType>;247 /**248 * Maximum length for collection name.249 **/250 maxCollectionNameLength: u32 & AugmentedConst<ApiType>;251 /**252 * Maximum size for all collection properties.253 **/254 maxCollectionPropertiesSize: u32 & AugmentedConst<ApiType>;255 /**256 * Maximum properties that can be assigned to token.257 **/258 maxPropertiesPerItem: u32 & AugmentedConst<ApiType>;259 /**260 * Maximal lenght of property key.261 **/262 maxPropertyKeyLength: u32 & AugmentedConst<ApiType>;263 /**264 * Maximal lenght of property value.265 **/266 maxPropertyValueLength: u32 & AugmentedConst<ApiType>;267 /**268 * Maximal token prefix length.269 **/270 maxTokenPrefixLength: u32 & AugmentedConst<ApiType>;271 /**272 * Maximum size for all token properties.273 **/274 maxTokenPropertiesSize: u32 & AugmentedConst<ApiType>;275 /**276 * Maximum number of levels of depth in the token nesting tree.277 **/278 nestingBudget: u32 & AugmentedConst<ApiType>;279 /**280 * Default NFT collection limit.281 **/282 nftDefaultCollectionLimits: UpDataStructsCollectionLimits & AugmentedConst<ApiType>;283 /**284 * Default RFT collection limit.285 **/286 rftDefaultCollectionLimits: UpDataStructsCollectionLimits & AugmentedConst<ApiType>;287 /**288 * Generic const289 **/290 [key: string]: Codec;291 };234 vesting: {292 vesting: {235 /**293 /**236 * The minimum amount transferred to call `vested_transfer`.294 * The minimum amount transferred to call `vested_transfer`.