getDefaultToken

Get the default token for a given chain and symbol

Example

import { getDefaultToken } from "thirdweb/react";
import { ethereum } from "thirdweb/chains";
const token = getDefaultToken(ethereum, "USDC");
function getDefaultToken(
chain: Readonly<ChainOptions & { rpc: string }>,
symbol:
| "WETH"
| "USDT"
| "USDC"
| "WBTC"
| "WMATIC"
| "WBNB"
| "BUSD"
| "WFTM"
| "WAVAX",
): undefined | TokenInfo;

Parameters

The chain to get the token for

Type

let chain: Readonly<ChainOptions & { rpc: string }>;

The symbol of the token to get

Type

let symbol:
| "WETH"
| "USDT"
| "USDC"
| "WBTC"
| "WMATIC"
| "WBNB"
| "BUSD"
| "WFTM"
| "WAVAX";

Returns

let returnType: undefined | TokenInfo;

The default token for the given chain and symbol