Skip to content

@token:totalSupply

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))

Read totalSupply() at assertion time. The symbol resolves to the token address at composition time; the native token has no total supply and fails at build time.