Uniques¶
Calls¶
approve_transfer¶
See [Pallet::approve_transfer
].
Attributes¶
Name | Type |
---|---|
collection | T::CollectionId |
item | T::ItemId |
delegate | AccountIdLookupOf<T> |
Python¶
call = substrate.compose_call(
'Uniques', 'approve_transfer', {
'collection': 'u128',
'delegate': 'AccountId',
'item': 'u128',
}
)
burn¶
See [Pallet::burn
].
Attributes¶
Name | Type |
---|---|
collection | T::CollectionId |
item | T::ItemId |
check_owner | Option<AccountIdLookupOf<T>> |
Python¶
call = substrate.compose_call(
'Uniques', 'burn', {
'check_owner': (None, 'AccountId'),
'collection': 'u128',
'item': 'u128',
}
)
buy_item¶
See [Pallet::buy_item
].
Attributes¶
Name | Type |
---|---|
collection | T::CollectionId |
item | T::ItemId |
bid_price | ItemPrice<T, I> |
Python¶
call = substrate.compose_call(
'Uniques', 'buy_item', {
'bid_price': 'u128',
'collection': 'u128',
'item': 'u128',
}
)
cancel_approval¶
See [Pallet::cancel_approval
].
Attributes¶
Name | Type |
---|---|
collection | T::CollectionId |
item | T::ItemId |
maybe_check_delegate | Option<AccountIdLookupOf<T>> |
Python¶
call = substrate.compose_call(
'Uniques', 'cancel_approval', {
'collection': 'u128',
'item': 'u128',
'maybe_check_delegate': (
None,
'AccountId',
),
}
)
clear_attribute¶
See [Pallet::clear_attribute
].
Attributes¶
Name | Type |
---|---|
collection | T::CollectionId |
maybe_item | Option<T::ItemId> |
key | BoundedVec<u8, T::KeyLimit> |
Python¶
call = substrate.compose_call(
'Uniques', 'clear_attribute', {
'collection': 'u128',
'key': 'Bytes',
'maybe_item': (None, 'u128'),
}
)
clear_collection_metadata¶
See [Pallet::clear_collection_metadata
].
Attributes¶
Name | Type |
---|---|
collection | T::CollectionId |
Python¶
call = substrate.compose_call(
'Uniques', 'clear_collection_metadata', {'collection': 'u128'}
)
clear_metadata¶
See [Pallet::clear_metadata
].
Attributes¶
Name | Type |
---|---|
collection | T::CollectionId |
item | T::ItemId |
Python¶
call = substrate.compose_call(
'Uniques', 'clear_metadata', {'collection': 'u128', 'item': 'u128'}
)
create¶
See [Pallet::create
].
Attributes¶
Name | Type |
---|---|
collection | T::CollectionId |
admin | AccountIdLookupOf<T> |
Python¶
call = substrate.compose_call(
'Uniques', 'create', {
'admin': 'AccountId',
'collection': 'u128',
}
)
destroy¶
See [Pallet::destroy
].
Attributes¶
Name | Type |
---|---|
collection | T::CollectionId |
witness | DestroyWitness |
Python¶
call = substrate.compose_call(
'Uniques', 'destroy', {
'collection': 'u128',
'witness': {
'attributes': 'u32',
'item_metadatas': 'u32',
'items': 'u32',
},
}
)
force_create¶
See [Pallet::force_create
].
Attributes¶
Name | Type |
---|---|
collection | T::CollectionId |
owner | AccountIdLookupOf<T> |
free_holding | bool |
Python¶
call = substrate.compose_call(
'Uniques', 'force_create', {
'collection': 'u128',
'free_holding': 'bool',
'owner': 'AccountId',
}
)
force_item_status¶
See [Pallet::force_item_status
].
Attributes¶
Name | Type |
---|---|
collection | T::CollectionId |
owner | AccountIdLookupOf<T> |
issuer | AccountIdLookupOf<T> |
admin | AccountIdLookupOf<T> |
freezer | AccountIdLookupOf<T> |
free_holding | bool |
is_frozen | bool |
Python¶
call = substrate.compose_call(
'Uniques', 'force_item_status', {
'admin': 'AccountId',
'collection': 'u128',
'free_holding': 'bool',
'freezer': 'AccountId',
'is_frozen': 'bool',
'issuer': 'AccountId',
'owner': 'AccountId',
}
)
freeze¶
See [Pallet::freeze
].
Attributes¶
Name | Type |
---|---|
collection | T::CollectionId |
item | T::ItemId |
Python¶
call = substrate.compose_call(
'Uniques', 'freeze', {'collection': 'u128', 'item': 'u128'}
)
freeze_collection¶
See [Pallet::freeze_collection
].
Attributes¶
Name | Type |
---|---|
collection | T::CollectionId |
Python¶
call = substrate.compose_call(
'Uniques', 'freeze_collection', {'collection': 'u128'}
)
mint¶
See [Pallet::mint
].
Attributes¶
Name | Type |
---|---|
collection | T::CollectionId |
item | T::ItemId |
owner | AccountIdLookupOf<T> |
Python¶
call = substrate.compose_call(
'Uniques', 'mint', {
'collection': 'u128',
'item': 'u128',
'owner': 'AccountId',
}
)
redeposit¶
See [Pallet::redeposit
].
Attributes¶
Name | Type |
---|---|
collection | T::CollectionId |
items | Vec<T::ItemId> |
Python¶
call = substrate.compose_call(
'Uniques', 'redeposit', {
'collection': 'u128',
'items': ['u128'],
}
)
set_accept_ownership¶
See [Pallet::set_accept_ownership
].
Attributes¶
Name | Type |
---|---|
maybe_collection | Option<T::CollectionId> |
Python¶
call = substrate.compose_call(
'Uniques', 'set_accept_ownership', {'maybe_collection': (None, 'u128')}
)
set_attribute¶
See [Pallet::set_attribute
].
Attributes¶
Name | Type |
---|---|
collection | T::CollectionId |
maybe_item | Option<T::ItemId> |
key | BoundedVec<u8, T::KeyLimit> |
value | BoundedVec<u8, T::ValueLimit> |
Python¶
call = substrate.compose_call(
'Uniques', 'set_attribute', {
'collection': 'u128',
'key': 'Bytes',
'maybe_item': (None, 'u128'),
'value': 'Bytes',
}
)
set_collection_max_supply¶
See [Pallet::set_collection_max_supply
].
Attributes¶
Name | Type |
---|---|
collection | T::CollectionId |
max_supply | u32 |
Python¶
call = substrate.compose_call(
'Uniques', 'set_collection_max_supply', {
'collection': 'u128',
'max_supply': 'u32',
}
)
set_collection_metadata¶
See [Pallet::set_collection_metadata
].
Attributes¶
Name | Type |
---|---|
collection | T::CollectionId |
data | BoundedVec<u8, T::StringLimit> |
is_frozen | bool |
Python¶
call = substrate.compose_call(
'Uniques', 'set_collection_metadata', {
'collection': 'u128',
'data': 'Bytes',
'is_frozen': 'bool',
}
)
set_metadata¶
See [Pallet::set_metadata
].
Attributes¶
Name | Type |
---|---|
collection | T::CollectionId |
item | T::ItemId |
data | BoundedVec<u8, T::StringLimit> |
is_frozen | bool |
Python¶
call = substrate.compose_call(
'Uniques', 'set_metadata', {
'collection': 'u128',
'data': 'Bytes',
'is_frozen': 'bool',
'item': 'u128',
}
)
set_price¶
See [Pallet::set_price
].
Attributes¶
Name | Type |
---|---|
collection | T::CollectionId |
item | T::ItemId |
price | Option<ItemPrice<T, I>> |
whitelisted_buyer | Option<AccountIdLookupOf<T>> |
Python¶
call = substrate.compose_call(
'Uniques', 'set_price', {
'collection': 'u128',
'item': 'u128',
'price': (None, 'u128'),
'whitelisted_buyer': (
None,
'AccountId',
),
}
)
set_team¶
See [Pallet::set_team
].
Attributes¶
Name | Type |
---|---|
collection | T::CollectionId |
issuer | AccountIdLookupOf<T> |
admin | AccountIdLookupOf<T> |
freezer | AccountIdLookupOf<T> |
Python¶
call = substrate.compose_call(
'Uniques', 'set_team', {
'admin': 'AccountId',
'collection': 'u128',
'freezer': 'AccountId',
'issuer': 'AccountId',
}
)
thaw¶
See [Pallet::thaw
].
Attributes¶
Name | Type |
---|---|
collection | T::CollectionId |
item | T::ItemId |
Python¶
call = substrate.compose_call(
'Uniques', 'thaw', {'collection': 'u128', 'item': 'u128'}
)
thaw_collection¶
See [Pallet::thaw_collection
].
Attributes¶
Name | Type |
---|---|
collection | T::CollectionId |
Python¶
call = substrate.compose_call(
'Uniques', 'thaw_collection', {'collection': 'u128'}
)
transfer¶
See [Pallet::transfer
].
Attributes¶
Name | Type |
---|---|
collection | T::CollectionId |
item | T::ItemId |
dest | AccountIdLookupOf<T> |
Python¶
call = substrate.compose_call(
'Uniques', 'transfer', {
'collection': 'u128',
'dest': 'AccountId',
'item': 'u128',
}
)
transfer_ownership¶
See [Pallet::transfer_ownership
].
Attributes¶
Name | Type |
---|---|
collection | T::CollectionId |
owner | AccountIdLookupOf<T> |
Python¶
call = substrate.compose_call(
'Uniques', 'transfer_ownership', {
'collection': 'u128',
'owner': 'AccountId',
}
)
Events¶
ApprovalCancelled¶
An approval for a delegate
account to transfer the item
of an item
collection
was cancelled by its owner
.
Attributes¶
Name | Type | Composition |
---|---|---|
collection | T::CollectionId |
u128 |
item | T::ItemId |
u128 |
owner | T::AccountId |
AccountId |
delegate | T::AccountId |
AccountId |
ApprovedTransfer¶
An item
of a collection
has been approved by the owner
for transfer by
a delegate
.
Attributes¶
Name | Type | Composition |
---|---|---|
collection | T::CollectionId |
u128 |
item | T::ItemId |
u128 |
owner | T::AccountId |
AccountId |
delegate | T::AccountId |
AccountId |
AttributeCleared¶
Attribute metadata has been cleared for a collection
or item
.
Attributes¶
Name | Type | Composition |
---|---|---|
collection | T::CollectionId |
u128 |
maybe_item | Option<T::ItemId> |
(None, 'u128') |
key | BoundedVec<u8, T::KeyLimit> |
Bytes |
AttributeSet¶
New attribute metadata has been set for a collection
or item
.
Attributes¶
Name | Type | Composition |
---|---|---|
collection | T::CollectionId |
u128 |
maybe_item | Option<T::ItemId> |
(None, 'u128') |
key | BoundedVec<u8, T::KeyLimit> |
Bytes |
value | BoundedVec<u8, T::ValueLimit> |
Bytes |
Burned¶
An item
was destroyed.
Attributes¶
Name | Type | Composition |
---|---|---|
collection | T::CollectionId |
u128 |
item | T::ItemId |
u128 |
owner | T::AccountId |
AccountId |
CollectionFrozen¶
Some collection
was frozen.
Attributes¶
Name | Type | Composition |
---|---|---|
collection | T::CollectionId |
u128 |
CollectionMaxSupplySet¶
Max supply has been set for a collection.
Attributes¶
Name | Type | Composition |
---|---|---|
collection | T::CollectionId |
u128 |
max_supply | u32 |
u32 |
CollectionMetadataCleared¶
Metadata has been cleared for a collection
.
Attributes¶
Name | Type | Composition |
---|---|---|
collection | T::CollectionId |
u128 |
CollectionMetadataSet¶
New metadata has been set for a collection
.
Attributes¶
Name | Type | Composition |
---|---|---|
collection | T::CollectionId |
u128 |
data | BoundedVec<u8, T::StringLimit> |
Bytes |
is_frozen | bool |
bool |
CollectionThawed¶
Some collection
was thawed.
Attributes¶
Name | Type | Composition |
---|---|---|
collection | T::CollectionId |
u128 |
Created¶
A collection
was created.
Attributes¶
Name | Type | Composition |
---|---|---|
collection | T::CollectionId |
u128 |
creator | T::AccountId |
AccountId |
owner | T::AccountId |
AccountId |
Destroyed¶
A collection
was destroyed.
Attributes¶
Name | Type | Composition |
---|---|---|
collection | T::CollectionId |
u128 |
ForceCreated¶
A collection
was force-created.
Attributes¶
Name | Type | Composition |
---|---|---|
collection | T::CollectionId |
u128 |
owner | T::AccountId |
AccountId |
Frozen¶
Some item
was frozen.
Attributes¶
Name | Type | Composition |
---|---|---|
collection | T::CollectionId |
u128 |
item | T::ItemId |
u128 |
Issued¶
An item
was issued.
Attributes¶
Name | Type | Composition |
---|---|---|
collection | T::CollectionId |
u128 |
item | T::ItemId |
u128 |
owner | T::AccountId |
AccountId |
ItemBought¶
An item was bought.
Attributes¶
Name | Type | Composition |
---|---|---|
collection | T::CollectionId |
u128 |
item | T::ItemId |
u128 |
price | ItemPrice<T, I> |
u128 |
seller | T::AccountId |
AccountId |
buyer | T::AccountId |
AccountId |
ItemPriceRemoved¶
The price for the instance was removed.
Attributes¶
Name | Type | Composition |
---|---|---|
collection | T::CollectionId |
u128 |
item | T::ItemId |
u128 |
ItemPriceSet¶
The price was set for the instance.
Attributes¶
Name | Type | Composition |
---|---|---|
collection | T::CollectionId |
u128 |
item | T::ItemId |
u128 |
price | ItemPrice<T, I> |
u128 |
whitelisted_buyer | Option<T::AccountId> |
(None, 'AccountId') |
ItemStatusChanged¶
A collection
has had its attributes changed by the Force
origin.
Attributes¶
Name | Type | Composition |
---|---|---|
collection | T::CollectionId |
u128 |
MetadataCleared¶
Metadata has been cleared for an item.
Attributes¶
Name | Type | Composition |
---|---|---|
collection | T::CollectionId |
u128 |
item | T::ItemId |
u128 |
MetadataSet¶
New metadata has been set for an item.
Attributes¶
Name | Type | Composition |
---|---|---|
collection | T::CollectionId |
u128 |
item | T::ItemId |
u128 |
data | BoundedVec<u8, T::StringLimit> |
Bytes |
is_frozen | bool |
bool |
OwnerChanged¶
The owner changed.
Attributes¶
Name | Type | Composition |
---|---|---|
collection | T::CollectionId |
u128 |
new_owner | T::AccountId |
AccountId |
OwnershipAcceptanceChanged¶
Ownership acceptance has changed for an account.
Attributes¶
Name | Type | Composition |
---|---|---|
who | T::AccountId |
AccountId |
maybe_collection | Option<T::CollectionId> |
(None, 'u128') |
Redeposited¶
Metadata has been cleared for an item.
Attributes¶
Name | Type | Composition |
---|---|---|
collection | T::CollectionId |
u128 |
successful_items | Vec<T::ItemId> |
['u128'] |
TeamChanged¶
The management team changed.
Attributes¶
Name | Type | Composition |
---|---|---|
collection | T::CollectionId |
u128 |
issuer | T::AccountId |
AccountId |
admin | T::AccountId |
AccountId |
freezer | T::AccountId |
AccountId |
Thawed¶
Some item
was thawed.
Attributes¶
Name | Type | Composition |
---|---|---|
collection | T::CollectionId |
u128 |
item | T::ItemId |
u128 |
Transferred¶
An item
was transferred.
Attributes¶
Name | Type | Composition |
---|---|---|
collection | T::CollectionId |
u128 |
item | T::ItemId |
u128 |
from | T::AccountId |
AccountId |
to | T::AccountId |
AccountId |
Storage functions¶
Account¶
The items held by any given account; set out this way so that items owned by a single account can be enumerated.
Python¶
result = substrate.query(
'Uniques', 'Account', ['AccountId', 'u128', 'u128']
)
Return value¶
()
Asset¶
The items in existence and their ownership details.
Python¶
result = substrate.query(
'Uniques', 'Asset', ['u128', 'u128']
)
Return value¶
{'approved': (None, 'AccountId'), 'deposit': 'u128', 'is_frozen': 'bool', 'owner': 'AccountId'}
Attribute¶
Attributes of a collection.
Python¶
result = substrate.query(
'Uniques', 'Attribute', ['u128', (None, 'u128'), 'Bytes']
)
Return value¶
('Bytes', 'u128')
Class¶
Details of a collection.
Python¶
result = substrate.query(
'Uniques', 'Class', ['u128']
)
Return value¶
{
'admin': 'AccountId',
'attributes': 'u32',
'free_holding': 'bool',
'freezer': 'AccountId',
'is_frozen': 'bool',
'issuer': 'AccountId',
'item_metadatas': 'u32',
'items': 'u32',
'owner': 'AccountId',
'total_deposit': 'u128',
}
ClassAccount¶
The collections owned by any given account; set out this way so that collections owned by a single account can be enumerated.
Python¶
result = substrate.query(
'Uniques', 'ClassAccount', ['AccountId', 'u128']
)
Return value¶
()
ClassMetadataOf¶
Metadata of a collection.
Python¶
result = substrate.query(
'Uniques', 'ClassMetadataOf', ['u128']
)
Return value¶
{'data': 'Bytes', 'deposit': 'u128', 'is_frozen': 'bool'}
CollectionMaxSupply¶
Keeps track of the number of items a collection might have.
Python¶
result = substrate.query(
'Uniques', 'CollectionMaxSupply', ['u128']
)
Return value¶
'u32'
InstanceMetadataOf¶
Metadata of an item.
Python¶
result = substrate.query(
'Uniques', 'InstanceMetadataOf', ['u128', 'u128']
)
Return value¶
{'data': 'Bytes', 'deposit': 'u128', 'is_frozen': 'bool'}
ItemPriceOf¶
Price of an asset instance.
Python¶
result = substrate.query(
'Uniques', 'ItemPriceOf', ['u128', 'u128']
)
Return value¶
('u128', (None, 'AccountId'))
OwnershipAcceptance¶
The collection, if any, of which an account is willing to take ownership.
Python¶
result = substrate.query(
'Uniques', 'OwnershipAcceptance', ['AccountId']
)
Return value¶
'u128'
Constants¶
AttributeDepositBase¶
The basic amount of funds that must be reserved when adding an attribute to an item.
Value¶
1000000000000
Python¶
constant = substrate.get_constant('Uniques', 'AttributeDepositBase')
CollectionDeposit¶
The basic amount of funds that must be reserved for collection.
Value¶
0
Python¶
constant = substrate.get_constant('Uniques', 'CollectionDeposit')
DepositPerByte¶
The additional funds that must be reserved for the number of bytes store in metadata, either "normal" metadata or attribute metadata.
Value¶
1000000000000
Python¶
constant = substrate.get_constant('Uniques', 'DepositPerByte')
ItemDeposit¶
The basic amount of funds that must be reserved for an item.
Value¶
0
Python¶
constant = substrate.get_constant('Uniques', 'ItemDeposit')
KeyLimit¶
The maximum length of an attribute key.
Value¶
256
Python¶
constant = substrate.get_constant('Uniques', 'KeyLimit')
MetadataDepositBase¶
The basic amount of funds that must be reserved when adding metadata to your item.
Value¶
1000000000000000
Python¶
constant = substrate.get_constant('Uniques', 'MetadataDepositBase')
StringLimit¶
The maximum length of data stored on-chain.
Value¶
72
Python¶
constant = substrate.get_constant('Uniques', 'StringLimit')
ValueLimit¶
The maximum length of an attribute value.
Value¶
1024
Python¶
constant = substrate.get_constant('Uniques', 'ValueLimit')
Errors¶
AlreadyExists¶
The item ID has already been used for an item.
BadWitness¶
Invalid witness data given.
BidTooLow¶
The provided bid is too low.
Frozen¶
The item or collection is frozen.
InUse¶
The item ID is already taken.
Locked¶
The item is locked.
MaxSupplyAlreadySet¶
The max supply has already been set.
MaxSupplyReached¶
All items have been minted.
MaxSupplyTooSmall¶
The provided max supply is less to the amount of items a collection already has.
NoDelegate¶
There is no delegate approved.
NoPermission¶
The signing account has no permission to do the operation.
NotForSale¶
Item is not for sale.
Unaccepted¶
The named owner has not signed ownership of the collection is acceptable.
Unapproved¶
No approval exists that would allow the transfer.
UnknownCollection¶
The given item ID is unknown.
UnknownItem¶
The given item ID is unknown.
WrongDelegate¶
The delegate turned out to be different to what was expected.
WrongOwner¶
The owner turned out to be different to what was expected.