Shared library exporting network, token, and address definitions used across the Across Protocol ecosystem.
# npm
npm install @across-protocol/constants
# yarn
yarn add @across-protocol/constantsimport { TOKEN_SYMBOLS_MAP } from "@across-protocol/constants";
// Access token metadata
const usdc = TOKEN_SYMBOLS_MAP.USDC;
console.log(usdc.decimals); // 6
console.log(usdc.addresses[1]); // Ethereum mainnet address| Module | Description |
|---|---|
networks |
Chain ID constants for testnets and mainnets, chain metadata |
tokens |
TOKEN_SYMBOLS_MAP — token name, symbol, decimals, per-chain addresses, coingeckoId |
# Build (CJS + ESM + TypeScript declarations)
yarn build
# Lint
yarn lint
# Auto-fix lint issues
yarn lint-fix- New network: Add chain ID constant to
src/networks.ts. - New token: Add entry to
TOKEN_SYMBOLS_MAPinsrc/tokens.ts. - Run
yarn lint-fix && yarn buildto verify.
Published to npm automatically via GitHub Actions on GitHub release. Supports pre-release versions for beta/canary tags.
AGPL-3.0-only