Skip to content

feat: add gas diff, deploy execute, repl history, and inspect json#142

Merged
Nanle-code merged 2 commits into
Nanle-code:masterfrom
CMI-James-OD:codex/issue-33-13-30-16
May 28, 2026
Merged

feat: add gas diff, deploy execute, repl history, and inspect json#142
Nanle-code merged 2 commits into
Nanle-code:masterfrom
CMI-James-OD:codex/issue-33-13-30-16

Conversation

@CMI-James
Copy link
Copy Markdown
Contributor

Description

Implemented the four requested CLI enhancements in one grouped change set: gas diff comparison for WASM builds, optional deploy auto-execute with Stellar CLI detection, persistent REPL history controls, and JSON export support for contract inspection outputs.

Closes #124
Closes #104
Closes #121
Closes #107

Changes proposed

What were you told to do?

Implement Issues #124, #104, #121, and #107 in one PR by updating gas, deploy/info, shell/repl, and contract/inspect/soroban/docs behavior.

What did I do?

Gas Diff Command

  • Added starforge gas diff <OLD_WASM> <NEW_WASM> in src/commands/gas.rs.
  • Reused src/utils/profiler.rs timings to profile old/new analysis steps and total duration.
  • Printed side-by-side wasm size and estimated simulation cost deltas.

Deploy Execute + Stellar Detection

  • Added --execute flag in src/commands/deploy.rs with dry-run default behavior retained.
  • Added Stellar CLI PATH detection helper in src/commands/info.rs and surfaced status in starforge info.
  • Executed stellar contract deploy only when --execute is set and CLI exists; otherwise raised a clear error.

REPL History Persistence

  • Added configurable REPL history options in src/utils/repl.rs with persistence at ~/.starforge/repl_history.
  • Added --no-history opt-out and --history-max-lines in src/commands/shell.rs.
  • Enforced max history line trimming during load/save and session writes.

Inspect JSON Output + Docs

  • Added --json support to starforge contract inspect in src/commands/contract.rs.
  • Added serde serialization derives for inspect result structs in src/utils/soroban.rs.
  • Updated API_REFERENCE.md with new flags/commands and JSON schema docs for inspect outputs.

Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • This PR does not contain plagiarized content.
  • The title and description of the PR is clear and explains the approach.
  • I am making a pull request against the main branch (left side).
  • My commit messages styles matches our requested structure.
  • The implementation was reviewed and confirmed to work as intended.
  • I am only making changes to files I was requested to.

Screenshots / Validation Evidence

  • Ran formatting on touched Rust files with
    ustfmt.
  • Attempted cargo test --quiet; current upstream branch fails due pre-existing unrelated compile issues:
    • src/utils/mod.rs references missing module emplate
    • src/utils/templates.rs has an unclosed delimiter
  • Confirmed requested file diffs are isolated to issue scope.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 26, 2026

@CMI-James Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Nanle-code Nanle-code merged commit 987e638 into Nanle-code:master May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants