API ReferenceTokens and balancesInterface
Token
An ERC-20 token: its address, name, symbol, decimals, and logo when one is available.
Properties
address
address: `0x${string}`;ERC-20 contract address, EIP-55 checksummed. Every SDK read that returns a Token normalises the
address through viem’s getAddress, whatever casing the chain, the subgraph, or the caller
supplied, so two tokens for one contract always carry the same string. Addresses from outside the
SDK may be lowercase or mixed-case, so checksum them or compare case-insensitively when joining. Use
this as the identifier when passing the token to other SDK calls (tokenAddress, collateralToken,
creditedToken).
decimals
decimals: number;Number of token decimals. Every bigint amount the SDK accepts or returns for this token is in
smallest units, so display values are amount / 10 ** decimals (1 USDC = 1_000_000n).
metadata?
optional metadata?: TokenMetadata;Display metadata: currently logoUrl, the HTTPS URL of the token’s logo. Present only when Anvil’s
token logo set has an entry for this address.
name
name: string;Full token name (e.g. "USD Coin").
symbol
symbol: string;Token ticker (e.g. "USDC").