@token:totalSupply
Total supply of a token, in base units.
Returns: number
Syntax
Section titled “Syntax”@token:totalSupply(tokenSymbol)Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
tokenSymbol | token-symbol | Token symbol (e.g. DAI) or address |
Examples
Section titled “Examples”# Query the total supply of a tokenset $supply @token:totalSupply(DAI)
# Print the total supply in human-readable formprint @token:format(DAI @token:totalSupply(DAI))See Also
Section titled “See Also”@balance- @token:format
On-chain face (@totalSupply!)
Section titled “On-chain face (@totalSupply!)”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.