Skip to content

fix: add fail-fast error handling to deployment script#337

Merged
OxDev-max merged 2 commits into
OpenLedger-Foundation:mainfrom
Inkman007:feature/deploy-script-error-handling
Jun 28, 2026
Merged

fix: add fail-fast error handling to deployment script#337
OxDev-max merged 2 commits into
OpenLedger-Foundation:mainfrom
Inkman007:feature/deploy-script-error-handling

Conversation

@Inkman007

Copy link
Copy Markdown
Contributor

Prevent cascading failures from silent errors in deploy_contract() and invoke() and correct the contract deployment order to respect constructor dependencies.

Changes:

  • deploy_contract(): validate WASM file exists before calling stellar CLI, capture stdout into a variable, abort with a named error if the deploy command fails or returns an empty contract ID
  • invoke(): abort with contract-id + function name on any stellar CLI error
  • Reorder deployment section: access_control → invoice_nft → risk_registry → treasury → financing_pool → marketplace (matches constructor requirements: marketplace.initialize() needs invoice_nft, financing_pool, and treasury already live)
  • Echo all progress messages to stderr so captured contract IDs are clean
  • Pre-flight WASM existence check with actionable 'make build' hint

Closes #216

Prevent cascading failures from silent errors in deploy_contract() and
invoke() and correct the contract deployment order to respect constructor
dependencies.

Changes:
- deploy_contract(): validate WASM file exists before calling stellar CLI,
  capture stdout into a variable, abort with a named error if the deploy
  command fails or returns an empty contract ID
- invoke(): abort with contract-id + function name on any stellar CLI error
- Reorder deployment section: access_control → invoice_nft → risk_registry
  → treasury → financing_pool → marketplace (matches constructor requirements:
  marketplace.initialize() needs invoice_nft, financing_pool, and treasury
  already live)
- Echo all progress messages to stderr so captured contract IDs are clean
- Pre-flight WASM existence check with actionable 'make build' hint

Closes OpenLedger-Foundation#216
@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

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

@OxDev-max OxDev-max merged commit fc808d8 into OpenLedger-Foundation:main Jun 28, 2026
1 check failed
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.

Harden scripts/deploy.sh with error handling and fail-fast dependency ordering

2 participants