Skip to content

@token.totalSupply

Fetch the total supply of a token in base units.

Returns: number

@token.totalSupply(tokenSymbol)
NameTypeDescription
tokenSymboltoken-symbolToken symbol (e.g. DAI) or address
# Query the total supply of a token
set $supply @token.totalSupply(DAI)
# Print the total supply in human-readable form
print @token.format(DAI @token.totalSupply(DAI))