Enter app

Preview Mode

The contract between this build and the reader.

Four guarantees

  • No write can be constructed, signed or broadcast
  • No figure requiring a chain, indexer or market is displayed as a value
  • Every derived figure states that it is estimated and what it derives from
  • Every empty surface states which dependency is missing

How writes are blocked

ts
// 1. The adapter selection cannot reach the live implementation
const wantsLive = PROTOCOL.mode === "live" && FLAGS.contracts;  // false

// 2. The preview adapter's write methods return a typed rejection
async wrap(): Promise<TxResult> {
  return previewRejection("Wrapping", "wrap");
}

// 3. Even the live adapter guards on the same flag
private guard(action: string): TxResult | null {
  if (!FLAGS.contracts) return { ok: false, code: "NOT_DEPLOYED", ... };
  return null;
}