Tokens
Pre-configured Token instances for major tokens on every chain PancakeSwap supports. Use these instead of constructing tokens manually to avoid address typos and ensure consistency.
Installation
npm install @pancakeswap/tokensQuick start
import { bscTokens, ethTokens, arbitrumTokens, baseTokens } from '@pancakeswap/tokens'
import { CurrencyAmount } from '@pancakeswap/swap-sdk-core'
// Access tokens directly
const cake = bscTokens.cake // CAKE on BSC
const usdt = bscTokens.usdt // USDT on BSC
const weth = ethTokens.weth // WETH on Ethereum
const usdc = baseTokens.usdc // USDC on Base
// Build an amount
const amount = CurrencyAmount.fromRawAmount(cake, 10n ** 18n) // 1 CAKEAvailable token lists
| Export | Chain |
|---|---|
bscTokens | BNB Smart Chain |
ethTokens | Ethereum |
arbitrumTokens | Arbitrum One |
baseTokens | Base |
zkSyncTokens | zkSync Era |
lineaTokens | Linea |
opBnbTokens | opBNB |
solanaTokens | Solana |
Testnet equivalents are also exported (e.g. bscTestnetTokens, sepoliaTestnetTokens).