docs/feat: treasury hold docs, backend env validation, address schema check, mainnet dry-run - #285
Merged
Merged
Conversation
…upstream main Resolves conflicts between feat/all-four-tasks and the four task commits: - docs/api-reference.md: keep upstream's full endpoint catalog; add GET /api/treasury/on-hold-settlements, POST /api/treasury/release-hold, and POST /api/treasury/escalate-hold with request/response examples, parameter tables, and error tables. Also add GET /health/rpc. - docs/contract-interaction-guide.md: keep upstream's soroban-cli and API examples; add hold_settlement, release_hold, and raise_dispute treasury entrypoints with CLI and API usage. - scripts/deploy_mainnet.sh: keep upstream's validate_env.sh sourcing; add --dry-run flag that prints planned actions with zero network calls. - scripts/export_deployed_addresses.sh: use upstream version which already includes full schema validation (superset of our additions).
|
@augustinemartins 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! 🚀 |
4 tasks
levoski1
pushed a commit
that referenced
this pull request
Jul 26, 2026
Add a short CONTRIBUTING.md section that helps contributors pick
between the canonical COMEBACKHERE-{contracts,backend,frontend} trees
and the older mirrored top-level {contracts,backend,frontend} trees.
The canonical trees are preferred because they have dedicated CI
workflows; the mirrored trees are still valid PR targets but lack
their own independent cargo/npm test runs and are referenced from
docs like docs/error-codes.md.
Link out to a new ARCHITECTURE.md for the full directory layout, the
CI checkout behaviour, and the gap in coverage on the mirrored trees.
Closes #285
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four independent improvements across documentation, tooling, and scripts.
Commit 1 —
docs: document on hold and escalate hold endpointsFiles:
docs/api-reference.md(created),docs/contract-interaction-guide.md(created)The backend routes
/api/treasury/on-hold-settlements,/api/treasury/release-hold, and/api/treasury/escalate-holdwere missing from the API reference. This commit:docs/api-reference.mdwith full documentation for all treasury endpoints, including the three missing ones. Each entry includes request/response JSON examples, parameter tables, and error-response tables.docs/contract-interaction-guide.mddocumenting thehold_settlement,release_hold, andraise_disputecontract entrypoints (parameters, emitted events, error codes), with bidirectional cross-links between the API reference and the contract guide.Commit 2 —
feat: extend env validation script for ts backendFiles:
scripts/validate_backend_env.sh(created),docs/dev-environment.md(updated)The existing environment validation was scoped only to contract deployment variables. This commit:
scripts/validate_backend_env.shwhich validatesMONGO_URI,REDIS_URL, andWEBHOOK_SECRET(required) and the three contract IDs (optional, enforced withSTRICT=1). Error-reporting style matches the existing deployment scripts.WEBHOOK_SECRETlength (must be ≥ 32 chars).docs/dev-environment.mdwith a validation step in the Backend setup section, including a variable reference table.Commit 3 —
feat: validate exported addresses against schemaFiles:
scripts/export_deployed_addresses.sh(updated)artifacts/addresses.jsonis gitignored and consumed by other tooling. A broken export could silently produce a malformed file. This commit adds a Python-based schema validation step immediately after the write:networkstring and a non-emptycontractsarray.nameandaddressstring fields.invoice,treasury,compliance) are present.[schema-validation] FAIL: <reason>to stderr and exits 1 on any violation.Commit 4 —
feat: add dry run mode to mainnet deploy scriptFiles:
scripts/deploy_mainnet.sh(updated)The mainnet deploy script previously only printed a refusal message. This commit adds a
--dry-runflag:--dry-runprints network config, signing authority, contract addresses, and a numbered 9-step planned action list — formatted to paste directly into a deployment-checklist PR.docs/MAINNET_DEPLOYMENT.md.What was tested
--dry-runexits 0 with full output; no-arg exits 1; unknown arg exits 1Closes #268
Closes #269
Closes #270
Closes #271