Skip to content

Toolbox-Lab/Prism

Prism

Rust 1.77 Next.js 16 TS 5 Docs

Prism is a diagnostic tool for Soroban that translates complex blockchain errors into clear, actionable insights. By resolving custom contract errors and providing interactive time-travel replays of historical transactions, Prism helps developers identify and fix root causes in seconds.

Features

  • Instant Error Decoding: Decodes Soroban host errors into plain English with suggested fixes.
  • Contract-Specific Resolution: Cross-references WASM metadata to resolve custom error codes (e.g., #3InsufficientBalance).
  • Execution Trace Replay: Replays transactions against historical ledger state for deep inspection.
  • Resource Profiling: Identifies budget hotspots and expensive host function calls.
  • Time-Travel Debugging: Supports breakpoints, step-through execution, and "what-if" re-simulation.
  • Multi-Interface Support: Available via Rust CLI, VS Code Extension, and a Web Application.

Architecture

Prism is organized as a modular monorepo:

  • Core Library (crates/core): The shared Rust engine for decoding, replaying, and debugging.
  • CLI (crates/cli): Powerful command-line interface for terminal-native diagnostics.
  • WASM (crates/wasm): Core logic compiled to WASM for client-side web integration.
  • Web App (apps/web): Interactive Next.js 16 dashboard for shareable debug sessions.
  • Server (apps/server): Async task processor and WebSocket server for trace streaming.

Tech Stack

  • Core Engine: Rust (edition 2021)
  • Blockchain: Stellar Soroban SDK (v21)
  • Web Frontend: Next.js 16, React 19, TypeScript 5
  • WASM Processing: wasmparser & wasm-pack
  • CLI Framework: Clap & Ratatui (TUI)

Quick Start

  1. Prerequisites:

    • Rust 1.77 or higher.
    • Node.js 20 or higher.
    • pnpm installed.
  2. Clone and Prepare:

    git clone https://github.com/prism-soroban/prism.git
    cd Prism
    pnpm install
  3. Build from Source:

    cargo build --release
  4. Run the CLI:

    ./target/release/prism decode <tx-hash>

Documentation

For full technical specifications, architecture deep-dives, and API references, visit our Live Documentation.

Get up and running in under 60 seconds. Complete guide to all Prism commands. Deep dive into the 3-tier diagnostic engine. Real-world walkthroughs and optimization tips.

Use Cases

Debugging Failed Transactions

Instantly understand why a mainnet transaction failed without redeploying or adding print statements.

Resource Optimization

Profile contract execution to identify expensive storage reads or CPU-heavy host function calls before deploying to mainnet.

Regression Testing

Export failed transactions as standalone test cases to ensure bugs are permanently resolved.

Contributing

We welcome contributions! Please see CONTRIBUTING.md for detailed guidelines.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Maintainers

Maintainer: Emrys02 =


Empowering Soroban developers with clear, actionable diagnostics.

About

Soroban transaction debugger

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors

Languages