Common¶
Events¶
AllowListAddressAdded¶
Address was added to the allow list.
Attributes¶
Name | Type | Composition |
---|---|---|
None | CollectionId |
u32 |
None | T::CrossAccountId |
{'Substrate': 'AccountId', 'Ethereum': '[u8; 20]'} |
AllowListAddressRemoved¶
Address was removed from the allow list.
Attributes¶
Name | Type | Composition |
---|---|---|
None | CollectionId |
u32 |
None | T::CrossAccountId |
{'Substrate': 'AccountId', 'Ethereum': '[u8; 20]'} |
Approved¶
Amount pieces of token owned by sender
was approved for spender
.
Attributes¶
Name | Type | Composition |
---|---|---|
None | CollectionId |
u32 |
None | TokenId |
u32 |
None | T::CrossAccountId |
{'Substrate': 'AccountId', 'Ethereum': '[u8; 20]'} |
None | T::CrossAccountId |
{'Substrate': 'AccountId', 'Ethereum': '[u8; 20]'} |
None | u128 |
u128 |
ApprovedForAll¶
A sender
approves operations on all owned tokens for spender
.
Attributes¶
Name | Type | Composition |
---|---|---|
None | CollectionId |
u32 |
None | T::CrossAccountId |
{'Substrate': 'AccountId', 'Ethereum': '[u8; 20]'} |
None | T::CrossAccountId |
{'Substrate': 'AccountId', 'Ethereum': '[u8; 20]'} |
None | bool |
bool |
CollectionAdminAdded¶
Collection admin was added.
Attributes¶
Name | Type | Composition |
---|---|---|
None | CollectionId |
u32 |
None | T::CrossAccountId |
{'Substrate': 'AccountId', 'Ethereum': '[u8; 20]'} |
CollectionAdminRemoved¶
Collection admin was removed.
Attributes¶
Name | Type | Composition |
---|---|---|
None | CollectionId |
u32 |
None | T::CrossAccountId |
{'Substrate': 'AccountId', 'Ethereum': '[u8; 20]'} |
CollectionCreated¶
New collection was created
Attributes¶
Name | Type | Composition |
---|---|---|
None | CollectionId |
u32 |
None | u8 |
u8 |
None | T::AccountId |
AccountId |
CollectionDestroyed¶
New collection was destroyed
Attributes¶
Name | Type | Composition |
---|---|---|
None | CollectionId |
u32 |
CollectionLimitSet¶
Collection limits were set.
Attributes¶
Name | Type | Composition |
---|---|---|
None | CollectionId |
u32 |
CollectionOwnerChanged¶
Collection owned was changed.
Attributes¶
Name | Type | Composition |
---|---|---|
None | CollectionId |
u32 |
None | T::AccountId |
AccountId |
CollectionPermissionSet¶
Collection permissions were set.
Attributes¶
Name | Type | Composition |
---|---|---|
None | CollectionId |
u32 |
CollectionPropertyDeleted¶
The property has been deleted.
Attributes¶
Name | Type | Composition |
---|---|---|
None | CollectionId |
u32 |
None | PropertyKey |
Bytes |
CollectionPropertySet¶
The colletion property has been added or edited.
Attributes¶
Name | Type | Composition |
---|---|---|
None | CollectionId |
u32 |
None | PropertyKey |
Bytes |
CollectionSponsorRemoved¶
Collection sponsor was removed.
Attributes¶
Name | Type | Composition |
---|---|---|
None | CollectionId |
u32 |
CollectionSponsorSet¶
Collection sponsor was set.
Attributes¶
Name | Type | Composition |
---|---|---|
None | CollectionId |
u32 |
None | T::AccountId |
AccountId |
ItemCreated¶
New item was created.
Attributes¶
Name | Type | Composition |
---|---|---|
None | CollectionId |
u32 |
None | TokenId |
u32 |
None | T::CrossAccountId |
{'Substrate': 'AccountId', 'Ethereum': '[u8; 20]'} |
None | u128 |
u128 |
ItemDestroyed¶
Collection item was burned.
Attributes¶
Name | Type | Composition |
---|---|---|
None | CollectionId |
u32 |
None | TokenId |
u32 |
None | T::CrossAccountId |
{'Substrate': 'AccountId', 'Ethereum': '[u8; 20]'} |
None | u128 |
u128 |
PropertyPermissionSet¶
The token property permission of a collection has been set.
Attributes¶
Name | Type | Composition |
---|---|---|
None | CollectionId |
u32 |
None | PropertyKey |
Bytes |
SponsorshipConfirmed¶
New sponsor was confirm.
Attributes¶
Name | Type | Composition |
---|---|---|
None | CollectionId |
u32 |
None | T::AccountId |
AccountId |
TokenPropertyDeleted¶
The token property has been deleted.
Attributes¶
Name | Type | Composition |
---|---|---|
None | CollectionId |
u32 |
None | TokenId |
u32 |
None | PropertyKey |
Bytes |
TokenPropertySet¶
The token property has been added or edited.
Attributes¶
Name | Type | Composition |
---|---|---|
None | CollectionId |
u32 |
None | TokenId |
u32 |
None | PropertyKey |
Bytes |
Transfer¶
Item was transferred
Attributes¶
Name | Type | Composition |
---|---|---|
None | CollectionId |
u32 |
None | TokenId |
u32 |
None | T::CrossAccountId |
{'Substrate': 'AccountId', 'Ethereum': '[u8; 20]'} |
None | T::CrossAccountId |
{'Substrate': 'AccountId', 'Ethereum': '[u8; 20]'} |
None | u128 |
u128 |
Storage functions¶
AdminAmount¶
Storage of the amount of collection admins.
Python¶
result = substrate.query(
'Common', 'AdminAmount', ['u32']
)
Return value¶
'u32'
Allowlist¶
Allowlisted collection users.
Python¶
result = substrate.query(
'Common', 'Allowlist', [
'u32',
{
'Ethereum': '[u8; 20]',
'Substrate': 'AccountId',
},
]
)
Return value¶
'bool'
CollectionById¶
Storage of collection info.
Python¶
result = substrate.query(
'Common', 'CollectionById', ['u32']
)
Return value¶
{
'description': ['u16'],
'flags': '[u8; 1]',
'limits': {
'account_token_ownership_limit': (None, 'u32'),
'owner_can_destroy': (None, 'bool'),
'owner_can_transfer': (None, 'bool'),
'sponsor_approve_timeout': (None, 'u32'),
'sponsor_transfer_timeout': (None, 'u32'),
'sponsored_data_rate_limit': (
None,
{'Blocks': 'u32', 'SponsoringDisabled': None},
),
'sponsored_data_size': (None, 'u32'),
'token_limit': (None, 'u32'),
'transfers_enabled': (None, 'bool'),
},
'mode': {'Fungible': 'u8', 'NFT': None, 'ReFungible': None},
'name': ['u16'],
'owner': 'AccountId',
'permissions': {
'access': (None, ('Normal', 'AllowList')),
'mint_mode': (None, 'bool'),
'nesting': (
None,
{
'collection_admin': 'bool',
'restricted': (None, 'scale_info::281'),
'token_owner': 'bool',
},
),
},
'sponsorship': {
'Confirmed': 'AccountId',
'Disabled': None,
'Unconfirmed': 'AccountId',
},
'token_prefix': 'Bytes',
}
CollectionProperties¶
Storage of collection properties.
Python¶
result = substrate.query(
'Common', 'CollectionProperties', ['u32']
)
Return value¶
{'_reserved': 'u32', 'consumed_space': 'u32', 'map': 'scale_info::578'}
CollectionPropertyPermissions¶
Storage of token property permissions of a collection.
Python¶
result = substrate.query(
'Common', 'CollectionPropertyPermissions', ['u32']
)
Return value¶
'scale_info::583'
CreatedCollectionCount¶
Storage of the count of created collections. Essentially contains the last collection ID.
Python¶
result = substrate.query(
'Common', 'CreatedCollectionCount', []
)
Return value¶
'u32'
DestroyedCollectionCount¶
Storage of the count of deleted collections.
Python¶
result = substrate.query(
'Common', 'DestroyedCollectionCount', []
)
Return value¶
'u32'
DummyStorageValue¶
Not used by code, exists only to provide some types to metadata.
Python¶
result = substrate.query(
'Common', 'DummyStorageValue', []
)
Return value¶
(
{'alive': 'u32', 'created': 'u32', 'destroyed': 'u32'},
'u32',
'u32',
{'collection': 'u32', 'token': 'u32'},
"[({'properties': ['scale_info::289'], 'owner': (None, 'scale_info::266'), 'pieces': 'u128'}, {'owner': 'AccountId', 'mode': 'scale_info::264', 'name': ['u16'], 'description': ['u16'], 'token_prefix': 'Bytes', 'sponsorship': 'scale_info::574', 'limits': 'scale_info::270', 'permissions': 'scale_info::275', 'token_property_permissions': ['scale_info::284'], 'properties': ['scale_info::289'], 'read_only': 'bool', 'flags': 'scale_info::594'}, {'proof_size': 'u64', 'compact_proof_size': 'u64', 'compressed_proof_size': 'u64', 'results': ['scale_info::597'], 'key_values': ['scale_info::602']}); 0]",
)
IsAdmin¶
List of collection admins.
Python¶
result = substrate.query(
'Common', 'IsAdmin', [
'u32',
{
'Ethereum': '[u8; 20]',
'Substrate': 'AccountId',
},
]
)
Return value¶
'bool'
Constants¶
CollectionCreationPrice¶
Set price to create a collection.
Value¶
2000000000000000000
Python¶
constant = substrate.get_constant('Common', 'CollectionCreationPrice')
ContractAddress¶
Address under which the CollectionHelper contract would be available.
Value¶
'0x6c4e9fe1ae37a41e93cee429e8e1881abdcbb54f'
Python¶
constant = substrate.get_constant('Common', 'ContractAddress')
collection_admins_limit¶
Maximum admins per collection.
Value¶
5
Python¶
constant = substrate.get_constant('Common', 'collection_admins_limit')
Errors¶
AccountTokenLimitExceeded¶
Account token limit exceeded per collection
AddressIsNotEthMirror¶
Only spending from eth mirror could be approved
AddressIsZero¶
Can't transfer tokens to ethereum zero address
AddressNotInAllowlist¶
Address is not in allow list.
ApprovedValueTooLow¶
Requested value is more than the approved
CantApproveMoreThanOwned¶
Tried to approve more than owned
CantDestroyNotEmptyCollection¶
Destroying only empty collections is allowed
CollectionAdminCountExceeded¶
Exceeded max admin count
CollectionDescriptionLimitExceeded¶
Collection description can not be longer than 255 char.
CollectionFieldSizeExceeded¶
Tried to store more data than allowed in collection field
CollectionIsExternal¶
Tried to access an external collection with an internal API
CollectionIsInternal¶
Tried to access an internal collection with an external API
CollectionLimitBoundsExceeded¶
Collection limit bounds per collection exceeded
CollectionNameLimitExceeded¶
Collection name can not be longer than 63 char.
CollectionNotFound¶
This collection does not exist.
CollectionTokenLimitExceeded¶
Collection token limit exceeded
CollectionTokenPrefixLimitExceeded¶
Token prefix can not be longer than 15 char.
ConfirmSponsorshipFail¶
This address is not set as sponsor, use setCollectionSponsor first.
EmptyPropertyKey¶
Empty property keys are forbidden
FungibleItemsHaveNoId¶
Fungible tokens hold no ID, and the default value of TokenId for a fungible collection is 0.
InvalidCharacterInPropertyKey¶
Only ASCII letters, digits, and symbols _
, -
, and .
are allowed
MetadataFlagFrozen¶
Metadata flag frozen
MustBeTokenOwner¶
Sender parameter and item owner must be equal.
NoPermission¶
No permission to perform action
NoSpaceForProperty¶
Tried to store more property data than allowed
NotFungibleDataUsedToMintFungibleCollectionToken¶
Not Fungible item data used to mint in Fungible collection.
NotSufficientFounds¶
Insufficient funds to perform an action
OwnerPermissionsCantBeReverted¶
Tried to enable permissions which are only permitted to be disabled
PropertyKeyIsTooLong¶
Property key is too long
PropertyLimitReached¶
Tried to store more property keys than allowed
PublicMintingNotAllowed¶
Collection is not in mint mode.
SourceCollectionIsNotAllowedToNest¶
Only tokens from specific collections may nest tokens under this one
TokenNotFound¶
Item does not exist
TokenValueTooLow¶
Item is balance not enough
TotalCollectionsLimitExceeded¶
Total collections bound exceeded.
TransferNotAllowed¶
Collection settings not allowing items transferring
UnsupportedOperation¶
The operation is not supported
UserIsNotAllowedToNest¶
User does not satisfy the nesting rule
UserIsNotCollectionAdmin¶
The user is not an administrator.