Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
WETH9 – Uniswap SDK
Skip to content

WETH9

The WETH9 mapping provides the Wrapped Ether (WETH) token addresses for supported chains.

Import

import { WETH9 } from '@uniswap/sdk-core-next'

Type

const WETH9: { [chainId: number]: Token }

Usage

import { WETH9 } from '@uniswap/sdk-core-next'
 
// Get WETH on Ethereum mainnet
const weth = WETH9[1]
 
console.log(weth.address) // '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'
console.log(weth.symbol)  // 'WETH'
console.log(weth.name)    // 'Wrapped Ether'
 
// Get WETH on Arbitrum
const arbWeth = WETH9[42161]
console.log(arbWeth.address) // '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1'

Supported Chains

ChainChain IDSymbolAddress
Ethereum1WETH0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Sepolia11155111WETH0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14
Optimism10WETH0x4200000000000000000000000000000000000006
Optimism Sepolia11155420WETH0x4200000000000000000000000000000000000006
Arbitrum42161WETH0x82aF49447D8a07e3bd95BD0d56f35241523fBab1
Arbitrum Sepolia421614WETH0x980B62Da83eFf3D4576C647993b0c1D7faf17c73
Base8453WETH0x4200000000000000000000000000000000000006
Base Sepolia84532WETH0x4200000000000000000000000000000000000006
BNB Chain56WBNB0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c
Polygon137WMATIC0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270
Avalanche43114WAVAX0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7
Zora7777777WETH0x4200000000000000000000000000000000000006
Blast81457WETH0x4300000000000000000000000000000000000004
zkSync Era324WETH0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91
World Chain480WETH0x4200000000000000000000000000000000000006
Unichain130WETH0x4200000000000000000000000000000000000006

Usage with Ether

The WETH9 mapping is used internally by the Ether class:

import { Ether } from '@uniswap/sdk-core-next'
 
const eth = Ether.onChain(1)
const weth = eth.wrapped // Uses WETH9[1] internally
 
// This is equivalent to:
import { WETH9 } from '@uniswap/sdk-core-next'
const weth2 = WETH9[1]
 
weth.equals(weth2) // true

Checking Support

import { WETH9 } from '@uniswap/sdk-core-next'
 
function isChainSupported(chainId: number): boolean {
  return WETH9[chainId] !== undefined
}
 
isChainSupported(1)     // true
isChainSupported(12345) // false