API ReferenceTokens and balancesFunction
getToken()
function getToken(ctx, params): Promise<Token | undefined>;Fetches the Token uniquely identified by the provided parameters. Reads
name, symbol, decimals from any ERC-20 contract and attaches logo metadata when available.
Returns undefined when the address does not respond as an ERC-20 (empty symbol). Each call
performs a fresh read.
Parameters
| Parameter | Type | Description |
|---|---|---|
ctx | SDKContext | The SDK context. |
params | GetTokenParams | The request-specific parameters to uniquely identify the returned data. |
Returns
Promise<Token | undefined>
The token, if one is found.