@token
Resolve a token symbol to its contract address on the current chain.
Returns: address
Syntax
Section titled “Syntax”@token(tokenSymbolOrAddress)Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
tokenSymbolOrAddress |
token-symbol |
Token symbol (e.g. DAI) or address |
Examples
Section titled “Examples”# Resolve a token symbolset $dai @token(DAI)
# Resolve the native tokenset $native @token(XDAI)See Also
Section titled “See Also”- @token.amount — convert human amounts to base units
- @token.balance — query token balance