@token:totalSupply
Fetch the 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))