sauce verify checks that a payload, a cook or a transaction carries the settle program the package ships, and prints the parameters it was given.
Synopsis
Description
The settle program ships in the package as@eco-incorp/sauce/recipes/settle.sauce.ts. On an EVM chain it sweeps the Pot’s entire balance of each listed token to one recipient, after checking that the balance of the first token is at least minOut (0 turns that floor off). Verification covers the same checks in TypeScript.
The command takes one of:
- a settle payload: the program followed by its ABI-encoded arguments;
Pot.cookcalldata that carries a settle payload;- a transaction hash, with
--chain: the transaction is fetched, and its cook is checked.
validateSettleProgram:
- the program must hash to the current pin, the 410-byte settle program the pinned compiler produces, or to a
--pinyou add; - the arguments must be the one canonical encoding;
- a cook must name the released engine, or an
--engineyou add.
minOut and recipient. A rejection exits 1 with its code: one of the SDK’s SettleFailureCode values, such as PROGRAM_HASH or PROGRAM_TRUNCATED, or UNKNOWN_ENGINE.
On Solana, give --chain solana and a transaction signature. A Solana settle has its floor and its split between the two token programs compiled into it, so give them with --min-out and --spl-count. The engine invocation the cook made is checked by the SDK’s verifySvmSettleExecution against the settle recompiled for those values. A rejection is NO_SETTLE or NOT_GENUINE. The command checks a cook through the Kitchen; a settle cooked with --via engine is not one it checks.
Other pins. A payload with another hash or length is a different program and is rejected unless you accept it explicitly with --pin <hash:bytes>. Accept another pin only for a program you have decided to accept.
Verification identifies the program and decodes its arguments. It does not check the chain, the Pot the cook targets, or any other call in the same transaction or batch; those remain yours to check.
Options
Output
With--json, a valid settle prints:
A rejection prints
rejected (<CODE>): <reason> and exits 1. Exit code 2 is a usage error.
Examples
Verify a payload
This script builds a settle payload for 1 USDC on Base:settle-payload.mts
Verify a cook
sauce tx built this cook from the settle program the package ships, with --args '["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"]' 1000000 0x1111111111111111111111111111111111111111 on Base:
Read a rejection
A cook of any other program is rejected. This is the cook ofpay.sauce.ts from sauce inspect:
1.
Accept a historical settle program
A payload built with the settle program of compiler 2.5 is rejected by default:SETTLE_WIRE, given as its hash and its length in bytes, the same payload verifies:
Next steps
- Verification in TypeScript:
validateSettleProgram, historical pins and Solana account checks. sauce inspect: decode any cook, not only a settle.- Security considerations: what a verified program does and does not establish.
