Skip to content

NftTransfer


Events


ItemRestored

Item has been restored back from its NFT representation [collection_id, item_id, owner]

Attributes

Name Type Composition
collection_id T::CollectionId u32
item_id T::ItemId scale_info::12
owner T::AccountId AccountId

ItemStored

Item has been stored as an NFT [collection_id, item_id, owner]

Attributes

Name Type Composition
collection_id T::CollectionId u32
item_id T::ItemId scale_info::12
owner T::AccountId AccountId

Storage functions


NftStatuses

Python

result = substrate.query(
    'NftTransfer', 'NftStatuses', ['u32', 'scale_info::12']
)

Return value

('Stored', 'Uploaded')

Constants


KeyLimit

The maximum length of an attribute key.

Value

32

Python

constant = substrate.get_constant('NftTransfer', 'KeyLimit')

PalletId

The NFT-transfer's pallet id, used for deriving its sovereign account ID.

Value

'0x616a2f6e66747472'

Python

constant = substrate.get_constant('NftTransfer', 'PalletId')

ValueLimit

The maximum length of an attribute value.

Value

64

Python

constant = substrate.get_constant('NftTransfer', 'ValueLimit')

Errors


DuplicateItemCode

Item code must be different to attribute codes.


EmptyIpfsUrl

IPFS URL must not be an empty string.


ItemRestoreFailure

The process of restoring an NFT into an item has failed.


NftNotOwned

The given NFT is not owned by the requester.


NftOutsideOfChain

The given NFT is currently outside of the chain, transfer it back before attempting a restore.


UnknownClaim

The given claim doesn't exist.


UnknownItem

The given NFT item doesn't exist.