sauce tx compiles a program and prints the unsigned transaction that runs it on a Pot, for a wallet or signer of your choice to sign.
Synopsis
Description
sauce tx compiles the file (a .sauce.ts program or an actions document) and prints the cook unsigned, as JSON: { chainId, to, data, value }, where to is the Pot and data is Pot.cook(engine, program ++ arguments). It never takes a key and signs nothing.
The value is --value, else the Kitchen’s execution fee read from the chain. Reading the fee also reads the Pot.
- A Pot with no code yet. The command prints a plan instead,
{ chainId, pot, transactions }:Kitchen.deployPotfirst (markeddeploysPot; any account may send it), then the cook. Send them in that order. - Gas. Each transaction of a plan carries a
gaslimit the command simulated: the cook’s is estimated as if the transactions before it had landed, with 30% room. When the cook would revert on the chain as it is (an unfunded Pot), the transactions carry nogas, and stderr says why. - Batches. Each transaction is in the shape a wallet’s send call takes (
valueandgasin hex), andsendCallsholds all of them as one batch, for a wallet that sends a batch. --fund TOKEN:amountplans a plain transfer of each token from the owner into the Pot before the cook. With an endpoint, an EVM Pot that has no code yet is deployed first, so the transfer comes after the deployment. With--offlinethe command cannot check whether the Pot is deployed, and the plan has no deployment step: deploy the Pot first.ETH:<amount>adds to the cook’s value instead. Sent as one batch, a smart wallet deploys, funds and cooks with one approval, or nothing happens. Funding a Pot covers the amount syntax.--format castprints each transaction as acast sendline with placeholders.
cook() is onlyOwner). On Arc and Arc Testnet, stderr also says that a transaction is included only with a maxFeePerGas of at least 20 gwei, the chain’s minimum base fee; the printed transactions carry no fee fields.
On Solana it prints { chain, via, feePayer, pot, fee, maxExecutionFee, createsPot, transaction }: the Kitchen’s cook as a base64 transaction signed by no one, for --owner to sign, or with --via engine the engine’s own paid cook, with no Pot. A Pot not created yet is created by the same transaction, ahead of the cook (createsPot). The command reads the cluster for the blockhash and the fee. Solana covers the account forms and the plan a cook too large for one transaction becomes.
sauce tx prints a transaction only on a supported chain: Ethereum, Base, Arc and Solana, and the testnets Arc Testnet, Base Sepolia, Ethereum Sepolia, Solana Devnet and Solana Testnet. On a preview chain it is refused before anything is read, with a message that names the supported chains and how to request the refused one.
Prerequisites
On an EVM chain, the release’s engine must be deployed on the chain for the cook to run.sauce pot --chain <chain> --owner <address> reports whether it is.
Options
EVM chains only
Solana only
Low-level options
--help lists these apart, with the note “a program’s inputs are main’s parameters, given with —args”.
Output
stdout carries the JSON (there is no--json flag: JSON is the default format), or the cast send lines with --format cast. stderr carries the Pot and its owner, the conditions for the transactions to land, and notes on gas and balances.
Exit codes:
0 when the transaction or plan is printed, 1 on a preview chain or a compile failure, 2 for a usage error.
Examples
The examples build the cook ofpay.sauce.ts on Base for the arbitrary owner 0x1111…1111, whose Pot has no code on Base. Calldata is cut short, and the Kitchen’s address is shown as <kitchen address> (see deployments).
Build the plan for a Pot with no code
gas:
--fund, below, plans the transfer after the deployment and before the cook. With --offline the command cannot check whether the Pot is deployed, so the plan has no deployment step: deploy the Pot first. The note quoted above says the Pot’s address takes tokens before it is deployed; follow this paragraph instead.
Fund the Pot in the same batch
0x1bf56 (114518): 88091 used, with 30% room.
Build offline
Refuse a preview chain
1.
Next steps
sauce send: broadcast what your signer signed.sauce run: compile, sign and send in one command.sauce simulate: the same cook, simulated.- External wallets: signing outside the
saucecommand. - Funding a Pot:
--fundand the amount syntax.
