Skip to content

feat(keeper): add --dry-run flag for local task simulation#126

Merged
ayomideadeniran merged 1 commit intoSoroLabs:mainfrom
jerrymusaga:feat/keeper-dry-run
Mar 29, 2026
Merged

feat(keeper): add --dry-run flag for local task simulation#126
ayomideadeniran merged 1 commit intoSoroLabs:mainfrom
jerrymusaga:feat/keeper-dry-run

Conversation

@jerrymusaga
Copy link
Copy Markdown
Contributor

Summary

  • Adds keeper/src/dryRun.js — a new executor that builds and simulates each task's execute() transaction via Soroban RPC (steps: build → simulate → assemble) then intentionally stops before signing or submitting. Logs estimated fees, task eligibility, and any contract-level errors.
  • Modifies keeper/index.js to parse --dry-run from process.argv and swap in dryRunTask instead of the live executor. Prints a clear startup banner when the flag is active.
  • Adds "dry-run": "node index.js --dry-run" to package.json scripts.
  • Updates QUICKSTART.md with a new Step 3 covering dry-run usage, sample log output, status code reference (DRY_RUN_SUCCESS, DRY_RUN_SIM_FAILED, DRY_RUN_ERROR), and common troubleshooting cases.

Closes #112

Test plan

  • Run npm run dry-run with a valid .env — confirm no transactions are submitted and simulation results are logged
  • Run with an unfunded account — confirm DRY_RUN_ERROR with "Account not found"
  • Run against a paused task — confirm DRY_RUN_SIM_FAILED with contract error
  • Run npm start (no flag) — confirm live behaviour is unchanged

🤖 Generated with Claude Code

Adds a dry-run mode to the keeper that builds and simulates each task's
execute() transaction against the Soroban RPC without signing, submitting,
or paying any fees. Useful for validating configuration and debugging task
eligibility before going live.

Changes:
- keeper/src/dryRun.js: new module that runs steps 1-3 of executeTask
  (build → simulate → assemble) and logs full execution details, then
  intentionally stops before sign/submit
- keeper/index.js: parse --dry-run from process.argv; swap executeTask
  for dryRunTask when the flag is present; log a clear startup banner
- keeper/package.json: add "dry-run" npm script (node index.js --dry-run)
- keeper/QUICKSTART.md: new Step 3 documenting dry-run usage, sample
  output, status codes, and common error explanations

Closes SoroLabs#112
@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 28, 2026

@jerrymusaga 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

@ayomideadeniran
Copy link
Copy Markdown
Contributor

Your pr is under review.

@jerrymusaga
Copy link
Copy Markdown
Contributor Author

Your pr is under review.

@ayomideadeniran okay sir

@ayomideadeniran ayomideadeniran merged commit c49f788 into SoroLabs:main Mar 29, 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

Development

Successfully merging this pull request may close these issues.

[DevExp] Implement a Local "Dry Run" Script for Keepers

2 participants