Skip to content

@token:format

Format a base-unit token amount as a human-readable string with the token symbol.

Returns: string

@token:format(tokenSymbolOrAddress amount)
NameTypeDescription
tokenSymbolOrAddresstoken-symbolToken symbol (e.g. DAI) or address
amountnumberAmount in base units
# Format a base-unit amount as a human-readable string
print @token:format(DAI 500000000000000000)
# Print a holder's balance in human-readable form
print @token:format(DAI @token:balance(DAI @token(DAI)))