Skip to main content
Two registries. CANONICAL_CHAINS holds every chain a program can name, EVM chains and Solana, and is read by requireChain, resolveChain and the slug, id and alias lookups. The chains record, read by getChain, holds native-currency and explorer metadata for most EVM chains. The same exports come from the root and from @eco-incorp/sauce/chains.
Generated from the type declarations of @eco-incorp/sauce.

getChain

Function · @eco-incorp/sauce/chains, @eco-incorp/sauce

isTestnet

Function · @eco-incorp/sauce/chains, @eco-incorp/sauce Whether chain is a test network, whose coin and tokens have no value.

nativeCoinSymbol

Function · @eco-incorp/sauce/chains, @eco-incorp/sauce The symbol of chain’s native coin - ETH, SOL, AVAX, … - as chains records it, or for a canonical chain it does not carry, as the table above does. A program reads a holder’s balance of the coin as <holder>.balance (pot.balance); <holder>.<symbol> is refused, naming it, unless the symbol is also a token the chain registers (Arc’s USDC), which it then reads.

getAllChainIds

Function · @eco-incorp/sauce/chains, @eco-incorp/sauce

nativeErc20

Function · @eco-incorp/sauce/chains, @eco-incorp/sauce The ERC-20 that IS chainId’s native coin, or undefined on a chain whose native coin is separate from every token (ETH, POL, …). Where it is defined the chain has no canonical wrapped native (nothing needs wrapping), and the native balance and the token balance are one balance on two decimal scales - see NativeErc20.

nativeToErc20Amount

Function · @eco-incorp/sauce/chains, @eco-incorp/sauce Converts a native amount (wei) on chainId to its native ERC-20’s units, rounding down the way balanceOf reads it: on Arc, floor(wei / 1e12), so any amount below 1e12 wei reads as 0. Throws on a chain whose native coin is not an ERC-20.

chains

Variable · @eco-incorp/sauce/chains, @eco-incorp/sauce All supported EVM chains. No RPC endpoints: callers bring their own.