Skip to content

Properties

A token module declares its token through properties. The validator reads them when the token is created or attached, by calling the getter the compiler emits for each property.

PropertyTypeRead by the validator
namestringRequired. The token name.
symbolstringThe symbol; it is taken from the token SYMBOL declaration and does not need a property.
isTransferableboolSets the Transferable flag.
isFungibleboolSets the Fungible flag. An NFT token sets it to false.
isFiniteboolSets the Finite flag. A finite token also needs maxSupply.
isDivisibleboolSets the Divisible flag. An NFT token cannot be divisible.
isBurnableboolSets the Burnable flag.
isMintableboolSets the Mintable flag.
isStakable, isFiatboolSet the Stakable and Fiat flags.
maxSupplynumberThe maximum supply, read when the token is finite.
decimalsnumberThe number of decimals, 0 to 255. An NFT token uses 0.

At least one flag must be set. isFuel is reserved for KCAL and isSwappable cannot be set at creation.

The chain stores the Transferable and Burnable flags and does not check them. A token declared with isTransferable: false or isBurnable: false can still be transferred and burned. A rule on transfers or burns belongs in the token’s triggers; Triggers lists the operations that run them.

token EXP {
    property name: string = "Example";
    property isBurnable: bool = true;
    property isFinite: bool = true;
    property isFungible: bool = true;
    property isDivisible: bool = true;
    property isTransferable: bool = true;
    property maxSupply: number = 10000;
    property decimals: number = 8;
}

An NFT token can also declare description, imageURL, infoURL and royalties properties inside its nft submodules; see the NFT example on the Examples page.