Skip to content

feat(contract): add --simulate-only option to deploy and upload commands - #2865

Closed
jdjioe5-cpu wants to merge 1 commit into
stellar:mainfrom
jdjioe5-cpu:feat/issue-1249-simulate-only
Closed

jdjioe5-cpu wants to merge 1 commit into
stellar:mainfrom
jdjioe5-cpu:feat/issue-1249-simulate-only

Conversation

@jdjioe5-cpu

Copy link
Copy Markdown

Summary

Closes #1249

This PR adds --simulate-only (with --is-view and --sim-only visible aliases) to stellar contract deploy (WASM and Stellar Asset Contract) and stellar contract upload (install).

What Changed

  • Added --simulate-only (--is-view, --sim-only) to deploy::wasm::Cmd, deploy::asset::Cmd, and upload::Cmd.
  • When provided, commands simulate transaction execution via RPC (simulate_and_assemble_transaction), emit simulation events/cost information, and return the predicted contract ID or WASM hash without signing, submitting to the network, or writing local contract alias bindings.
  • Added unit tests verifying --simulate-only, --is-view, and --sim-only CLI parsing in both upload and deploy commands.

Testing

  • Ran cargo test --package soroban-cli --lib commands::contract::upload (all passed).
  • Ran cargo test --package soroban-cli --lib commands::contract::deploy (all passed).
  • Ran cargo clippy --package soroban-cli --no-deps --lib -- -D warnings.

@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Oct 23, 2026
@github-project-automation github-project-automation Bot moved this from Backlog (Not Ready) to Done in DevX Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add is_view or similar "simulate-only" flag for deploy commands

2 participants