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

Reference: sushi/evm Currency

The EVM currency module provides concrete currency classes for EVM chains.

Exports

ExportPurpose
EvmTokenEVM ERC-20-like token class.
EvmNativeEVM native asset class.
EvmCurrencyEVM token/native union.
EvmAddress, EvmTxHashEVM address/hash types.
isEvmAddressAddress type guard.
EvmTokenOriginOptional token origin metadata.
serializedEvmTokenSchema, serializedEvmNativeSchema, serializedEvmCurrencySchemaZod schemas.
deserializeEvmCurrencyDeserialize an EVM currency.
getEvmCurrencyAddressGet the EVM address for a currency.
unwrapEvmTokenUnwrap wrapped/native representation where applicable.

Token

import { EvmToken } from 'sushi/evm'
 
const USDC = new EvmToken({
  chainId: 1,
  address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
  symbol: 'USDC',
  name: 'USD Coin',
  decimals: 6,
})
MemberPurpose
originOptional bridge/origin metadata.
sortsBefore(other)Deterministic token sorting for pool math. Throws for different chains or same address.
wrap()Returns itself.
toJSON() / fromJSON()Serialization roundtrip.

Native

import { EvmNative } from 'sushi/evm'
 
const eth = EvmNative.fromChainId(1)
const weth = eth.wrap()

EVM addresses are validated with viem and normalized by the constructor.