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.chainContracts

Function · @eco-incorp/sauce Builds the whole lazy tree for one resolved chain.

contracts.on

Function · @eco-incorp/sauce Chain-ref front door: contracts.on('base').Uniswap.UniversalRouter.execute(...) - for a caller resolving the chain at run time rather than importing the Base accessor.

contracts.AddressOnlyContract

Type · @eco-incorp/sauce A contract the registry has an address for and no ABI: .address and .available, no methods.

contracts.Contract

Type · @eco-incorp/sauce A contract with an ABI: its accessor properties and its methods.

contracts.ContractAccessor

Type · @eco-incorp/sauce One leaf’s own properties: a (protocol, contract) on a specific chain. Its methods are separate (ContractMethods): Contract is the two together. A type rather than an interface, so a contract typed from its ABI is assignable to the untyped Contract.

contracts.ContractMethod

Type · @eco-incorp/sauce One ABI method: takes the ABI’s arguments and returns the call, typed from the ABI.

contracts.ContractMethods

Type · @eco-incorp/sauce Every function of TAbi, by its ABI name. An untyped ABI has an index of unknown instead.

contracts.InterfaceContract

Type · @eco-incorp/sauce An ABI with no fixed address: bind a deployment with .at(address) to call it.

contracts.makeContractCall

Function · @eco-incorp/sauce

contracts.ContractCall

Type · @eco-incorp/sauce A call to one registry method, typed from the method’s ABI where the accessor knows it (Base.UniswapV3.QuoterV2.quoteExactInputSingle(...)). Every call has read; a state-changing one also has simulate and write. Untyped (ContractCall), it carries all three, and simulate/write on a view or pure method throw.

contracts.ContractCallBase

Interface · @eco-incorp/sauce Every field of a call, whatever its method’s mutability.

contracts.EncodeOptions

Interface · @eco-incorp/sauce

contracts.ReadActions

Interface · @eco-incorp/sauce

contracts.ReadResult

Type · @eco-incorp/sauce What read resolves to: the method’s ABI outputs, decoded by viem.

contracts.SauceScriptOptions

Interface · @eco-incorp/sauce

contracts.SimulateOptions

Interface · @eco-incorp/sauce

contracts.SimulateResult

Type · @eco-incorp/sauce What simulate resolves to: viem’s { result, request }, result decoded from the outputs.

contracts.WriteActions

Interface · @eco-incorp/sauce

contracts.WriteOptions

Interface · @eco-incorp/sauce

contracts.ContractNameOf

Type · @eco-incorp/sauce Every contract literally linked under protocol P, e.g. ContractNameOf<"uniswap-v4"> = “PoolManager” | “UniversalRouter” | “PositionManager”.

contracts.FamilyContracts

Type · @eco-incorp/sauce Contract names safely exposed on family alias F - a strict ALLOWLIST: a name owned by exactly ONE family member passes through; a name owned by two or more (e.g. “Factory” under “Uniswap”, present in both uniswap-v2 and uniswap-v3) resolves its own mapped-type branch to never and is dropped from the union entirely. Fail-closed by construction, not by enumerating known-bad names.

contracts.FamilyKey

Type · @eco-incorp/sauce Every family alias key actually present in the starter set, e.g. “Uniswap” | “Aave” | “Compound” | …

contracts.FamilyOf

Type · @eco-incorp/sauce The PascalCase family alias a protocol slug belongs to, or never if it has none.

contracts.ProtocolNamespaceKey

Type · @eco-incorp/sauce PascalOf<ProtocolSlug> - the CANONICAL namespace key, e.g. “UniswapV4”. Always unambiguous.

contracts.ProtocolSlug

Type · @eco-incorp/sauce The literal protocol-slug union underlying the starter set, e.g. “uniswap-v4” | … | “erc4626”.

contracts.buildDescriptor

Function · @eco-incorp/sauce Assembles one full ContractDescriptor from a link entry plus the protocol’s already-resolved data. deployments defaults to the protocol’s catalog deployments; returns is the contracts the ABI’s methods return, by signature (RETURNED_CONTRACTS). Methods, addresses and coverage are computed when first read: the registry holds about 300 contracts, and a program names a few.

contracts.buildMethods

Function · @eco-incorp/sauce ABI -> ordered DescriptorMethod[] (no name-collapse: an overloaded name appears once per overload, which the linkage test holds to distinct argument counts).

contracts.buildPerChainAddress

Function · @eco-incorp/sauce role key -> sparse, EIP-55-checksummed per-chain address map, over canonical EVM chains (a Solana program id under the same role is no EVM contract). undefined roleKey (kind:“interface”) -> {}. chains narrows it to the deployments one ABI binding covers.

contracts.deriveChainSlugs

Function · @eco-incorp/sauce Sparse per-chain address map -> the chain slugs it resolves to, id-ascending. Fails closed (throws) on an id the canonical registry doesn’t know - see test invariant #6.

contracts.deriveContractName

Function · @eco-incorp/sauce An ABI export’s contract name: the export without its trailing “ABI” and without the protocol’s own prefix - its display name squashed (“Uniswap V4”), or its slug’s PascalCase (“arrakis” for “Arrakis Finance”) - e.g. “UniswapV4UniversalRouterABI” under “Uniswap V4” is “UniversalRouter”. A prefix is stripped only where a word follows it. This names the registry’s interfaces, and a role bound to different ABIs on different chains; every other contract is named after its role key (see links.ts). scripts/gen-source-globals.mjs applies the same rule.