Skip to main content
The contracts namespace describes protocol contracts as descriptors (ABI, methods, per-chain addresses) and exposes them as typed accessors route bodies can call.
This page covers sdk/dist/descriptors/types.d.ts, sdk/dist/descriptors/links.d.ts, sdk/dist/descriptors/registry.d.ts.
Generated from the type declarations shipped in @eco-incorp/sauce 0.99.4. Each entry shows the package authors’ JSDoc and declaration for this SDK version. For runtime compatibility and deployed addresses, see architecture and deployments.

contracts.ContractDescriptor

Interface · sdk/dist/descriptors/types.d.ts

contracts.ContractCoverage

Interface · sdk/dist/descriptors/types.d.ts

contracts.ContractKind

Type · sdk/dist/descriptors/types.d.ts What KIND of thing a descriptor represents. Not a boolean: the vendored registry data genuinely contains three structurally different shapes sharing one addresses.ts/abis.ts file pair per protocol.

contracts.DescriptorMethod

Interface · sdk/dist/descriptors/types.d.ts

contracts.ResolvedContract

Interface · sdk/dist/descriptors/types.d.ts

contracts.StateMutability

Type · sdk/dist/descriptors/types.d.ts
Interface · sdk/dist/descriptors/links.d.ts THE CRUX: role-key <-> ABI-export <-> human-contract-name linkage. addresses.ts keys per-chain addresses by a free-form role string (“factory”, “swapRouter02”, …) and abis.ts exports <Name>ABI arrays - nothing in the existing registry data connects the two, or names the resulting contract for a human/accessor tree. That link genuinely isn’t derivable end to end from the data (see the name-normalization measurement below), so it is hand-authored here, one entry per descriptor, and cross-checked against the live vendored data by test/descriptors-linkage.test.ts - a role key or ABI export that stops existing fails that suite immediately rather than silently producing a stale/hole descriptor. SCOPE (v1): a STARTER SET of 15 protocols with clean, unambiguous linkage - NOT an attempt to auto-link all ~128 registry protocols. Excluded, with reasons that are data, not taste:
  • curve, lido, compound-v2, benqi, moonwell, venus, silo, layerbank: role key <-> ABI export name mismatches that need a human judgment call (lido.stETH vs LidoABI; curve.threePool is a StableSwap INSTANCE, not a role naming a single ABI-typed contract).
  • every bridge (l1-side / l2-side role pairs are a per-chain-SIDE axis this model has no slot for yet).
  • maker / alchemix / olympus / tokemak / stargate and similar: role keys are majority plain ERC20 token addresses, not protocol contracts.
contract is the human display name. When omitted it is DERIVED (never invented) by deriveContractName in derive.ts: abiExport minus its trailing “ABI” minus the protocol-name prefix. Only entries that would otherwise collide, or that have no abiExport to derive from, carry an explicit override - see the comments below.

contracts.ContractLinkEntry

Type · sdk/dist/descriptors/links.d.ts
Variable · sdk/dist/descriptors/links.d.ts

contracts.DESCRIPTORS

Variable · sdk/dist/descriptors/registry.d.ts The whole flat registry, built once at module load. Stable order: as declared in CONTRACT_LINKS.

contracts.byChain

Variable · sdk/dist/descriptors/registry.d.ts REVERSE INDEX: chain slug -> descriptors with an address on that chain (kind:“interface” descriptors are always excluded - see listInterfaces).

contracts.byProtocol

Variable · sdk/dist/descriptors/registry.d.ts protocol slug (normalized) -> its descriptors, in DESCRIPTORS order.

contracts.byProtocolAndContract

Variable · sdk/dist/descriptors/registry.d.ts protocol slug (normalized) -> contract name (normalized) -> descriptor.