Skip to main content
Archived documentation for @eco-incorp/sauce@0.99.16. Install this release with npm install --save-exact @eco-incorp/sauce@0.99.16. Links to guides outside this tab open current documentation.
@eco-incorp/sauce/testing runs programs on a local chain inside a test, in Node only. fork(chain, options) starts a copy of a real chain (an EVM chain at options.block) with the Sauce release, replaying a recorded state file, recording one, or reading the live chain; local(options?) starts an empty chain (Base unless options.chain names another, Solana included) with the Sauce release deployed and no Kitchen fee. An EVM chain runs on Foundryโ€™s anvil, which must be on PATH; Solana runs in LiteSVM.
Generated from the type declarations of @eco-incorp/sauce.

fork

Function ยท @eco-incorp/sauce/testing Forks Solana in LiteSVM, ready to cook: the released engine and Kitchen, ten test accounts each holding 1,000 SOL, account 0โ€™s Pot created. Every account a test names is read when it is first named: from the cluster (recording it), or from a recorded state file. Stop it with stop(); a recording is written then. Forks chain at options.block on a local anvil, ready to cook: the released stack (the chainโ€™s own, or deployed), and anvilโ€™s dev accounts as test accounts, account 0โ€™s Pot deployed. Replays a recorded state file, records one, or forks live (see ForkOptions.mode). Stop it with stop(); a recording is written then.

local

Function ยท @eco-incorp/sauce/testing An empty Solana chain in LiteSVM - no programs but the runtimeโ€™s own, no tokens but wrapped SOL - with the released engine and Kitchen at their program ids and no Kitchen fee. For programs that need nothing deployed; fork Solana for anything that calls a program or moves a token. An empty local chain - no protocols, no tokens - with the released stack deployed at its release addresses and no Kitchen fee, running as options.chain (Base by default). For programs that need nothing deployed; fork a chain for anything that calls a protocol.

SolanaChainRef

Type ยท @eco-incorp/sauce/testing Solana, by any name the registry knows it by.

ForkOptions

Interface ยท @eco-incorp/sauce/testing

LocalOptions

Interface ยท @eco-incorp/sauce/testing

ForkMode

Type ยท @eco-incorp/sauce/testing