or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

index.md
tile.json

tessl/npm-uniswap--default-token-list

The official default token list used by the Uniswap decentralized exchange interface

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/@uniswap/default-token-list@13.45.x

To install, run

npx @tessl/cli install tessl/npm-uniswap--default-token-list@13.45.0

index.mddocs/

Uniswap Default Token List

The Uniswap Default Token List is an npm package that provides the official default token list used by the Uniswap decentralized exchange interface. It contains comprehensive token metadata including addresses, symbols, names, decimals, and logo URIs for tokens across multiple blockchain networks including Ethereum mainnet, Arbitrum, Polygon, Optimism, Base, Avalanche, and other EVM-compatible chains.

Package Information

  • Package Name: @uniswap/default-token-list
  • Package Type: npm
  • Language: JavaScript
  • Installation: npm install @uniswap/default-token-list

Core Imports

Access the pre-built token list JSON (main package export):

const tokenList = require("@uniswap/default-token-list");

ES modules:

import tokenList from "@uniswap/default-token-list";

Note: The published package only includes the pre-built JSON file. The buildList function is not available in the published package - it exists only in the source code for generating the token list during the build process.

Basic Usage

const tokenList = require("@uniswap/default-token-list");

console.log("Token list name:", tokenList.name);
console.log("Version:", tokenList.version);
console.log("Total tokens:", tokenList.tokens.length);

// Find tokens on Ethereum mainnet
const mainnetTokens = tokenList.tokens.filter(token => token.chainId === 1);
console.log("Mainnet tokens:", mainnetTokens.length);

// Find a specific token by symbol
const wethToken = tokenList.tokens.find(
  token => token.symbol === "WETH" && token.chainId === 1
);
console.log("WETH address:", wethToken?.address);

Architecture

The package follows a build-time generation pattern:

  • Source Structure: Individual token files per network in src/tokens/*.json
  • Build System: Node.js script (src/buildList.js) that combines token files
  • Cross-chain Mapping: Uses @uniswap/token-list-bridge-utils for bridge information
  • Published Artifact: Single JSON file (build/uniswap-default.tokenlist.json)
  • Package Export: Direct JSON import as main entry point

The published npm package contains only the pre-built token list JSON - the source code and build system are not included in the published package.

Capabilities

Pre-built Token List Access

Direct access to the complete Uniswap default token list with all network tokens and metadata.

/**
 * Pre-built token list JSON data (main package export)
 * Available as: require("@uniswap/default-token-list")
 */
const tokenList: TokenList;

Token List Generation (Source Only)

The source code includes a build function for generating the token list, but this is not available in the published package.

/**
 * Builds the complete Uniswap default token list (source code only)
 * Located at: src/buildList.js
 * @returns TokenList object (synchronous)
 */
function buildList(): TokenList;

Note: This function is only available in the source repository and is used during the build process. It is not included in the published npm package.

Types

interface TokenList {
  /** Name of the token list */
  name: string;
  /** ISO timestamp when the list was generated */
  timestamp: string;
  /** Semantic version object */
  version: {
    major: number;
    minor: number;
    patch: number;
  };
  /** Token classification tags (currently empty) */
  tags: Record<string, any>;
  /** IPFS URL for the list logo */
  logoURI: string;
  /** Keywords describing the list */
  keywords: string[];
  /** Array of all tokens in the list */
  tokens: Token[];
}

interface Token {
  /** Full token name (e.g., "Wrapped Ether") */
  name: string;
  /** Checksummed contract address */
  address: string;
  /** Token symbol (e.g., "WETH") */
  symbol: string;
  /** Number of decimal places (0-18) */
  decimals: number;
  /** Blockchain network ID */
  chainId: number;
  /** URL to token logo image */
  logoURI: string;
  /** Additional metadata including bridge information */
  extensions?: {
    bridgeInfo?: Record<string, {
      tokenAddress: string;
    }>;
  };
}

Network Coverage

The token list includes tokens from the following blockchain networks:

  • Ethereum Mainnet (chainId: 1)
  • Polygon (chainId: 137)
  • Optimism (chainId: 10)
  • Arbitrum (chainId: 42161)
  • Base (chainId: 8453)
  • Avalanche (chainId: 43114)
  • BNB Chain (chainId: 56)
  • Celo (chainId: 42220)
  • Blast (chainId: 81457)
  • zkSync Era (chainId: 324)
  • Worldchain (chainId: 480)
  • Zora (chainId: 7777777)
  • Unichain (chainId: 1301)
  • Sepolia Testnet (chainId: 11155111)
  • Goerli Testnet (chainId: 5)
  • Mumbai Testnet (chainId: 80001)
  • Deprecated Testnets: Ropsten (3), Rinkeby (4), Kovan (42)

Data Structure

Token List Structure

The token list follows the Uniswap token list specification:

  • name: Always "Uniswap Labs Default"
  • timestamp: ISO string of when the list was generated
  • version: Semantic version matching package.json
  • logoURI: IPFS URL for the Uniswap logo
  • keywords: ["uniswap", "default"]
  • tokens: Sorted array of all tokens (by chainId, then symbol)

Token Metadata

Each token contains:

  • Core properties: name, address, symbol, decimals, chainId
  • Visual: logoURI pointing to token logo image
  • Cross-chain: extensions.bridgeInfo mapping chainIds to bridge addresses

Bridge Information

Many tokens include bridge information in the extensions.bridgeInfo field, mapping chain IDs to the corresponding token addresses on those chains:

{
  "extensions": {
    "bridgeInfo": {
      "10": { "tokenAddress": "0x4200000000000000000000000000000000000006" },
      "137": { "tokenAddress": "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619" }
    }
  }
}

Common Use Cases

Finding Tokens by Chain

const tokenList = require("@uniswap/default-token-list");

// Get all Polygon tokens
const polygonTokens = tokenList.tokens.filter(token => token.chainId === 137);

// Get all tokens with bridge info to Arbitrum
const bridgeableToArbitrum = tokenList.tokens.filter(
  token => token.extensions?.bridgeInfo?.["42161"]
);

Token Lookup by Symbol

const tokenList = require("@uniswap/default-token-list");

// Find USDC on multiple chains
const usdcTokens = tokenList.tokens.filter(token => token.symbol === "USDC");

// Find specific token by symbol and chain
const usdcOnPolygon = tokenList.tokens.find(
  token => token.symbol === "USDC" && token.chainId === 137
);

Address Validation

const tokenList = require("@uniswap/default-token-list");

// Check if an address is in the default list
function isDefaultToken(address, chainId) {
  return tokenList.tokens.some(
    token => token.address.toLowerCase() === address.toLowerCase() && 
             token.chainId === chainId
  );
}

// Get token metadata by address
function getTokenByAddress(address, chainId) {
  return tokenList.tokens.find(
    token => token.address.toLowerCase() === address.toLowerCase() && 
             token.chainId === chainId
  );
}

Build Process (Source Repository)

The source repository includes a build system that:

  1. Loads individual token files from src/tokens/*.json
  2. Combines them into a single token list
  3. Sorts tokens by chainId, then by symbol
  4. Applies cross-chain bridge mapping using @uniswap/token-list-bridge-utils
  5. Outputs to build/uniswap-default.tokenlist.json

Note: This build process is only available in the source repository. The published npm package contains only the pre-built JSON output.

Dependencies

The published package has no runtime dependencies - it exports only static JSON data.

Source repository dependencies:

  • @uniswap/token-list-bridge-utils: Provides chainify() function for cross-chain token mapping during build
  • Development dependencies: Validation and testing tools including AJV schema validation

Validation

The token list is validated against multiple criteria:

  • Uniswap token list schema compliance
  • No duplicate addresses per chain
  • No duplicate symbols (with approved exceptions: "ust", "sol", "jup")
  • No duplicate names (with approved exceptions: "solana", "jupiter")
  • Valid checksummed addresses
  • Decimal values between 0-18
  • Version format matching package.json