> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Programmable Transactions

> Programmable Transactions let you program your route and orchestrate onchain actions: conditional routing and advanced order types that fit your goals. Powered by Sauce, Eco's runtime for the EVM and Solana: write transaction logic in SauceScript, a TypeScript subset, compile it to bytecode, and execute it atomically against live state in one transaction.

<Note>
  Sauce v1 is **closed access**. [Contact Eco](mailto:partners@eco.com) to integrate.
</Note>

**Programmable Transactions** let you program your route and orchestrate onchain actions: define conditional routing and advanced order types to fit your goals. They run on **Sauce**, Eco's runtime for the EVM and Solana. You write transaction logic in SauceScript, a TypeScript subset, compile it to bytecode, and execute it atomically against live state, all in one transaction.

Use the [Sauce SDK](/platform/sauce-sdk) to write and compile programs in your application.

## When to use Sauce

Use Sauce when later calls need to depend on state read during the same transaction. A program can query contracts, compare results, choose a branch and execute the selected calls. On the EVM, you send the program to an existing Pot rather than deploying a contract for each program.

For a fixed sequence of destination calls, start with [Routes destination calls](/routes/capabilities/destination-calls). Sauce adds conditions, loops and other runtime logic.

## What you get

| Property | What it means |
| - | - |
| **Programmability** | `if`/`else`, loops and recursion evaluated onchain against live state. |
| **Accessibility** | TypeScript in, bytecode out. Programs are SauceScript, a checked TypeScript subset, compiled locally in Node. |
| **Atomicity** | The whole program is one transaction. An unhandled failure reverts the transaction, including its token movements and approval changes. |
| **Composability with intents** | A program can be the destination of an [Eco intent](/concepts/intents), so a cross-chain transfer lands and executes your logic in the same fulfillment. |

## How it works

1. **Write** a program in SauceScript, or let the SDK's token, swap and deposit builders write it for you.
2. **Compile** it locally with the compiler that ships inside the SDK. The output is Sauce bytecode, not a contract.
3. **Execute** it through your **Pot**, an account minted by the **Kitchen**. `cook(engine, program)` runs the bytecode on the named engine and pays the Kitchen's current execution fee.
4. **Or package it as an intent.** `Base(program, options).reward(...)` compiles the program and builds an Eco intent whose destination fulfillment runs it.

Compilation runs locally and execution is an ordinary onchain call, so there is no backend to provision.

## Execution behavior

* **Atomic.** A program executes in one transaction on its target chain and reverts as a whole on an unhandled failure. Cross-chain intents coordinate separate transactions; a child intent that fails does not roll back a completed parent.
* **Pot ownership.** `cook` is owner-only. For direct intent routes, the owner is the destination Portal's Executor. Move assets into the Pot and return leftovers within the same fulfillment; do not leave funds or allowances in the shared Pot.
* **Execution fee.** Each cook pays the Kitchen's current fee in the chain's native token, in addition to network gas and any native value the program spends. Read `executionFee()` before building an EVM call. A fee increase can make a previously funded call revert.
* **Verifiable.** Bytecode is reproducible from source, and the SDK ships hash-pinned verification for its settlement program.

## Requirements and deployments

Use Node 24 or later with `@eco-incorp/sauce` 0.99.4 and compiler 2.3.0. Sauce v1 is closed access. See [architecture and deployments](/programmable-transactions/sauce/architecture-and-deployments) for the release addresses and chain-specific deployment information.

## Next steps

<CardGroup cols={3}>
  <Card title="Sauce SDK" icon="flask" href="/platform/sauce-sdk">
    Packages, requirements and integration paths.
  </Card>

  <Card title="Getting started" icon="play" href="/programmable-transactions/sauce/getting-started">
    Build, prepare the Pot, fund and execute, step by step.
  </Card>

  <Card title="Cookbook" icon="book-open" href="/cookbook/overview">
    Complete programs: best-pool swap, order split, settle, CCTP split.
  </Card>
</CardGroup>
