Skip to content

@token:amount

Convert a human-readable token amount to its base unit (applying decimals).

Returns: number

@token:amount(tokenSymbolOrAddress amount)
NameTypeDescription
tokenSymbolOrAddresstoken-symbolToken symbol (e.g. DAI) or address
amountnumberHuman-readable amount
# Convert 100 DAI to base units
set $amount @token:amount(DAI 100)