Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Soroban integration

The Soroban adapter (crates/adapters/soroban) isolates everything about running scenarios against Confidential Token contracts rather than the in-memory double. It exists so scenarios can transition from local simulation to contract execution behind one vocabulary (spec §30).

What the adapter provides

  • A contract-surface vocabulary (crates/adapters/soroban/src/contracts.rs) describing the Confidential Token contract functions, their required arguments, and their event codes, so scenario operations map to contract calls deterministically.
  • Operation ↔ call translation (transactions.rs): register, deposit, merge, transfer (with proof reference), and withdraw each translate to a named contract call with the public arguments; the confidential amount stays on the witness side and never appears in a call’s public inputs.
  • Event interpretation (events.rs) mapping contract events to the same public observation keys the simulator reports (ct_register, ct_deposit, …), so assertions written for the double hold on-chain.
  • An isolation gate: without a configured client/contract set, scenarios skip rather than mis-execute (the harness targets Environment::Simulator; a Soroban-targeting run requires explicit capability/environment matching).

Honest status

The adapter is isolated and unit-tested; it is not yet wired to a live contract deployment. It provides the translation and event surface that a deployment client (local Soroban or Testnet) plugs into. Soroban execution is never part of ordinary CI.

Modes

ModeBackingStatus
LOCAL_SIMULATIONin-memory doubleimplemented, default CI
SIMULATOR_PLUS_PROVERdouble + fixture proverimplemented
LOCAL_SOROBANdeployed local contractsadapter ready, client not wired
TESTNETpublic test networkopt-in only (see testnet doc)

Boundary

No contract logic is implemented here. The adapter translates and observes; the contract is the source of truth, and the oracle expectations in scenarios stay independent of both.