Skip to main content
The contracts namespace describes each registry protocol’s contracts: per-chain addresses, each bound to the ABI the registry checked against the deployed code. contracts.on(chain) returns typed accessors (contracts.on("base").Uniswap.UniversalRouter) whose methods build ContractCall objects you run with your own viem client.
Generated from the type declarations of @eco-incorp/sauce.

contracts.addressOn

Function · @eco-incorp/sauce The sparse-map accessor, bigint-aware - never index perChainAddress by a raw chain id directly.

contracts.contractsOnChain

Function · @eco-incorp/sauce REVERSE INDEX: every returned descriptor is guaranteed to have an address on chain. kind:“interface” descriptors never appear here (reach them via listInterfaces()).

contracts.describeContract

Function · @eco-incorp/sauce THE thin resolver: (chain, protocol, contract) -> address + abi + methods for that chain, or undefined.

contracts.descriptorChains

Function · @eco-incorp/sauce Resolved CanonicalChain records (not raw slugs) for every chain this descriptor has an address on.

contracts.getDescriptor

Function · @eco-incorp/sauce Chain-free lookup: the descriptor is the chain-INDEPENDENT object; ResolvedContract (describeContract) is its chain-bound view.

contracts.listContracts

Function · @eco-incorp/sauce Forward index: protocol (slug, or normalized ProtocolInfo.name) -> its descriptors.

contracts.listDescriptors

Function · @eco-incorp/sauce The whole flat registry, stable order.

contracts.listInterfaces

Function · @eco-incorp/sauce kind:“interface” descriptors (erc20, erc4626 in the starter set): ABI + methods, no fixed address.

contracts.methodOf

Function · @eco-incorp/sauce Name-keyed method lookup. An overloaded name’s overloads take different numbers of arguments (the linkage test holds every descriptor to that), so arity names exactly one of them. Without it, the first overload the ABI declares is returned.

contracts.protocolsOnChain

Function · @eco-incorp/sauce The protocols with a contract that has an address on chain, each once, as ProtocolInfo records in registry order; an unknown chain returns an empty list. It reads the contracts registry’s descriptors, where getProtocolsByChain(chainId) reads the protocol catalog.

contracts.requireContract

Function · @eco-incorp/sauce Throwing sibling of describeContract, mirroring requireChain’s “here is the known set” error style.

contracts.selectorOf

Function · @eco-incorp/sauce