feat(cli): add check-status command to ping deployed contracts - #822
Closed
davidugorji wants to merge 1 commit into
Closed
feat(cli): add check-status command to ping deployed contracts#822davidugorji wants to merge 1 commit into
davidugorji wants to merge 1 commit into
Conversation
Adds a `bc-forge check-status` command that pings every contract declared under `contracts` in .bc-forge.json and reports per-contract reachability and latency. Each contract is probed by reading its instance ledger entry via getLedgerEntries. An entry proves the contract is deployed and served by the RPC node, so the check needs no contract-specific method and works uniformly across token, wrapper and any future contract. Four distinct statuses are reported rather than a single pass/fail, so an operator can tell the failure modes apart: - responsive instance entry returned, with measured latency - not_deployed RPC answered but holds no instance for that id - unreachable the RPC call itself failed - invalid contract id is malformed or absent from the config Contract ids are validated locally before any network call, so a typo in the config is reported immediately instead of as a spurious RPC failure. The command exits non-zero when any contract is not responsive, making it usable as a deployment gate in CI. The clock is injected so latency assertions in tests are deterministic. Closes BCPathway#699
davidugorji
force-pushed
the
feat/699-cli-check-status
branch
from
August 26, 2026 15:24
b47b57f to
398c314
Compare
|
@davidugorji 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! 🚀 |
Contributor
Author
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.
Implements the
check-statusCLI utility.Pings every contract declared under
contractsin.bc-forge.jsonby reading its instance ledger entry, and reports per-contract reachability and latency. Distinct verdicts (responsive,not_deployed,unreachable,invalid) separate the failure modes; exits non-zero when any contract is not responsive so it can gate a deployment.Verification:
tscclean, 10/10 unit tests pass, and the command was run live against Soroban testnet RPC.Closes #699