Skip to main content
@eco-incorp/sauce/verify checks an EVM settle payload: its program bytes against accepted program pins (by default, the settle program this package pins), and its argument tail (tokens, minOut, recipient) against the canonical encoding. It imports viem only, so it runs in a browser or an edge runtime without loading the compiler.
Generated from the type declarations of @eco-incorp/sauce.

decodeSettleCall

Function · @eco-incorp/sauce/verify Decodes one Pot.cook(address,bytes) call and returns the settle payload it carries, or null if the calldata is not a cook call or the program is not the settle payload. Never throws for a non-cook or non-settle input: a mismatched selector, malformed ABI or another program all return null. The detection is validateSettleProgram: the program matches an accepted program pin (by default, the settle program this package pins) and the argument tail is canonical, so a returned (tokens, minOut, recipient) is the unique byte encoding of those values. It does not check the call’s target: compare it against a Pot you trust.

extractEvmSettleFromCalls

Function · @eco-incorp/sauce/verify Reads the settle program out of a batch of EVM calls: returns the parameters of the first cook call whose program matches an accepted program pin (by default, the settle program this package pins; checked by validateSettleProgram), with that call’s index, or null if no call carries one. It finds the settle by content, not by position. Every call in a batch executes, and this examines only the first one that matches. A non-null result says the batch contains the pinned settle program with these parameters, not that the batch does nothing else: check callIndex against your expectation and inspect the other calls. Matching uses the cook selector and the program bytes only. Compare target against a Pot you trust, and engine against the engines you accept, case-insensitively: it is reported lower-cased.

DecodedSettleCall

Interface · @eco-incorp/sauce/verify

ExtractedEvmSettle

Interface · @eco-incorp/sauce/verify What extractEvmSettleFromCalls returns: the decoded settle call, the index of the call that carried it, and that call’s target.

CallLike

Interface · @eco-incorp/sauce/verify One EVM call. data, the cook calldata, is required; target, the Pot address, is carried into the result when present.