API ReferenceTokens and balancesFunction
buildTokenLogoUrl()
function buildTokenLogoUrl(address, tokenAliases?): string;Builds the canonical logo URL for a token address. Applies the provided alias map (the configured
profile’s tokenAliases) so an environment’s fake-token addresses resolve to the mainnet asset path
in the AcronymFoundation/assets fork — the repo indexes logos by mainnet address. A no-op for any
address not in the map, and for no map at all.
This helper is the single source of truth for logo URL construction in the SDK and its consumers. Apps that need a synchronous URL (no HEAD check) should import and use this directly instead of constructing the URL themselves — otherwise the alias rewrite is silently skipped and staging builds fetch broken 404 URLs.
For the full (async) metadata resolution with a HEAD-check against the assets repo, call
getTokenMetadata instead, which wraps this helper.
Parameters
| Parameter | Type |
|---|---|
address | `0x${string}` |
tokenAliases? | Readonly<Record<`0x${string}`, `0x${string}`>> |
Returns
string