Skip to content

Fungible


Storage functions


Allowance

Storage for assets delegated to a limited extent to other users.

Python

result = substrate.query(
    'Fungible', 'Allowance', [
    'u32',
    {
        'Ethereum': '[u8; 20]',
        'Substrate': 'AccountId',
    },
    {
        'Ethereum': '[u8; 20]',
        'Substrate': 'AccountId',
    },
]
)

Return value

'u128'

Balance

Amount of tokens owned by an account inside a collection.

Python

result = substrate.query(
    'Fungible', 'Balance', [
    'u32',
    {
        'Ethereum': '[u8; 20]',
        'Substrate': 'AccountId',
    },
]
)

Return value

'u128'

TotalSupply

Total amount of fungible tokens inside a collection.

Python

result = substrate.query(
    'Fungible', 'TotalSupply', ['u32']
)

Return value

'u128'

Errors


FungibleDisallowsNesting

Fungible token does not support nesting.


FungibleItemsDontHaveData

Tried to set data for fungible item.


FungibleTokensAreAlwaysValid

Only a fungible collection could be possibly broken; any fungible token is valid.


SettingAllowanceForAllNotAllowed

Setting allowance for all is not allowed.


SettingPropertiesNotAllowed

Setting item properties is not allowed.