Skip to content

Comments

feat: add REPL mode for interactive contract exploration#236

Merged
Timi16 merged 1 commit intoTimi16:mainfrom
ScriptedBro:feature/repl
Feb 23, 2026
Merged

feat: add REPL mode for interactive contract exploration#236
Timi16 merged 1 commit intoTimi16:mainfrom
ScriptedBro:feature/repl

Conversation

@ScriptedBro
Copy link
Contributor

Adds a repl mode for interactive contract exploration so users can call functions, inspect storage, and keep contract state alive across commands in a single session.

What changed

  • Wired REPL function calls to the real ContractExecutor (removed simulated call output)
  • Kept a persistent executor instance across REPL commands so state is preserved
  • Implemented host-backed storage snapshots for storage inspection output
  • Enabled REPL auth mocking for contracts that use require_auth() (e.g. token examples)
  • Added type-aware REPL argument handling using contract spec signatures
  • Added REPL address aliasing so inputs like Alice / Bob can be used for Address params
  • Preserved rustyline history behavior (history command + up-arrow navigation + persisted history)
  • Fixed false-positive storage alerts when no alert filters are configured

Acceptance Criteria

  • repl subcommand launches interactive session
  • Function calls work and show results
  • Storage inspectable at any time with storage
  • Command history navigable with up-arrow
  • Clean exit with exit or Ctrl+D

Validation

  • Built release binary: cargo build --release --bin soroban-debug
  • Verified interactive REPL launch and prompt
  • Verified token contract calls in REPL (initialize, mint) with persisted state
  • Ran tests:
    • cargo test repl:: --lib
    • cargo test inspector::storage:: --lib

Closes #209

Issue: #209

@Timi16 Timi16 merged commit 5714fa7 into Timi16:main Feb 23, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement REPL Mode for Interactive Contract Exploration

2 participants