Skip to main content
Archived documentation for @eco-incorp/sauce@1.0.0. Install this release with npm install --save-exact @eco-incorp/sauce@1.0.0. Links to guides outside this tab open current documentation.
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