Skip to content

OrmlNFT


Storage functions


Classes

Python

result = substrate.query(
    'OrmlNFT', 'Classes', ['u32']
)

Return value

{
    'data': {
        'attributes': 'scale_info::354',
        'deposit': 'u128',
        'properties': 'u8',
    },
    'metadata': 'Bytes',
    'owner': 'AccountId',
    'total_issuance': 'u64',
}

NextClassId

Python

result = substrate.query(
    'OrmlNFT', 'NextClassId', []
)

Return value

'u32'

NextTokenId

Python

result = substrate.query(
    'OrmlNFT', 'NextTokenId', ['u32']
)

Return value

'u64'

Tokens

Python

result = substrate.query(
    'OrmlNFT', 'Tokens', ['u32', 'u64']
)

Return value

{'data': {'attributes': 'scale_info::354', 'deposit': 'u128'}, 'metadata': 'Bytes', 'owner': 'AccountId'}

TokensByOwner

Python

result = substrate.query(
    'OrmlNFT', 'TokensByOwner', ['AccountId', 'u32', 'u64']
)

Return value

()

Errors


CannotDestroyClass


ClassNotFound


MaxMetadataExceeded


NoAvailableClassId


NoAvailableTokenId


NoPermission


TokenNotFound