routes namespace compiles a SauceScript program for one chain by name and builds the calls that run it. routes.compileSauceProgram(chain, source, options?) compiles with the chain’s token symbols, protocol namespaces and @sauce/token in scope; routes.encodeEntryArguments(program, values) encodes main’s run-time arguments; routes.buildSauceEvmCall(params) builds one cook(engine, program) call on a Pot. The chain exports (Base, Solana, …), chain and Token are named exports of the root, and importing the package puts nothing on globalThis.
@eco-incorp/sauce.
routes.sourceGlobals
Function · @eco-incorp/sauce
Every name a program compiled for chain may use without declaring it.
routes.SourceChainName
Interface · @eco-incorp/sauce
routes.SourceContract
Interface · @eco-incorp/sauce
routes.SourceGlobals
Interface · @eco-incorp/sauce
routes.SourceInterface
Interface · @eco-incorp/sauce
A contract the registry knows only by its ABI - an interface, with no fixed address - which a
program binds to an address it gives: Erc4626.Vault.at(vault).totalAssets().
routes.SourceMethod
Interface · @eco-incorp/sauce
routes.SourceModule
Interface · @eco-incorp/sauce
routes.SourceNamespace
Interface · @eco-incorp/sauce
routes.SourceToken
Interface · @eco-incorp/sauce
routes.SourceVenue
Interface · @eco-incorp/sauce
A Solana venue a program swaps at by its namespace (Orca.Whirlpool.swap(pool, …)).
routes.rewriteTokenMembers
Function · @eco-incorp/sauce
Rewrites every <Sym>.<method>(...) call and every <holder>.<Sym> value-position read whose
<Sym> is in tokens (and not shadowed anywhere in source) - see the module doc for the
lowering and the disjointness argument. Purely textual surgery over the ORIGINAL source, driven by
parser ranges - never a re-print of the AST, so everything else (formatting, comments, unrelated
code) survives byte-for-byte. Prepend tokenImportLines(result) before compiling the result.
bound names what the compile binds beside the source (a define, a contract binding, an ambient
module’s export): a pot or self among them is the caller’s own holder, never the Pot.
routes.REWRITABLE_METHODS
Variable · @eco-incorp/sauce
Every method the SYMBOL syntax lowers: the writes, plus the one read it has always offered.
routes.tokenImportLines
Function · @eco-incorp/sauce
The import lines a rewritten source needs, for the caller to prepend. The order is fixed, so a
given program always gets the same text and so the same bytecode.
routes.SafeWrite
Type · @eco-incorp/sauce
routes.TokenImports
Interface · @eco-incorp/sauce
What a rewritten source now needs imported.
routes.TokenRewriteResult
Interface · @eco-incorp/sauce
routes.TokenSymbols
Type · @eco-incorp/sauce
The token symbols the rewrites recognise: the registry-resolved symbol -> address map, or a
bare set of symbols. Every rewrite emits the symbol itself, which the compile’s defines resolve,
so the two forms rewrite alike.
routes.SvmAccountExpression
Interface · @eco-incorp/sauce
An account expression for a person: what a program writes, the account, how it is derived.
