feat: add 192-soroban-contract-code-inspection example - #253
Merged
Dantama022 merged 2 commits intoAug 30, 2026
Merged
Conversation
- Add src/examples/192-soroban-contract-code-inspection.ts - Read-only inspection of Soroban contract instance and code ledger entries - Validates contract ID format before any RPC calls - Retrieves contract instance entry and extracts code hash - Retrieves contract-code entry with last-modified and TTL metadata - Optionally hashes a supplied WASM file and compares against deployed hash - Reports match / mismatch / unable_to_verify / not_supplied - Preserves raw ledger-entry XDR for both instance and code entries - Handles missing instance, missing code, built-in executables, and RPC failures - Supports JSON output via param or JSON_OUTPUT env var - Add tests/soroban-contract-code-inspection.test.ts - Unit tests for all exported helpers and core inspection logic - Covers hash comparison states, missing entries, RPC errors, XDR capture - Verifies catalog registration and README documentation - Register example in src/runner/catalog.ts with interactive params - Add exclusion entry in src/validation/validation.config.json - Update README.md catalog with entry 54
|
@Olisachukwuma1 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! 🚀 |
Dantama022
pushed a commit
that referenced
this pull request
Aug 30, 2026
Adds four runnable read-only examples, each with helper-level tests, runner registration, validation exclusions, and README catalog entries. - 169-asset-holder-distribution (ISSUE-169): pages every trustline for an issued asset, aggregates supply statistics (total, average, median, largest), ranks holders, and reports configurable top-N concentration. Distinguishes authorized from unauthorized balances, counts zero-balance trustlines separately, and reports mid-stream pagination failures rather than presenting a partial set as complete. - 170-account-balance-liability-analysis (ISSUE-170): analyses balances, trustline limits, and buying/selling liabilities, deriving available amounts and limit headroom. Ledger-reported and derived values are kept visually separate. Flags near-limit trustlines and unauthorized lines. - 171-account-activity-profile (ISSUE-171): combines account metadata, transaction, operation, and payment history into one descriptive profile with fee aggregation and operation-type grouping. Each Horizon section records its own status so partial failures are reported instead of surfacing as silent zeros. - 172-horizon-request-tracing (ISSUE-172): a reusable tracing wrapper recording per-request timing, HTTP status, attempt counts, and slow-request detection, with min/max/average/median latency aggregation. Diagnostics are sanitized (secret seeds, JWTs, token query params) before logging. Also repairs three files left syntactically broken by the merge in #253, which prevented the project from typechecking on main: - src/runner/catalog.ts: restored the missing brace on the 192 entry and un-swapped the params blocks of entries 67 and 192. - src/validation/validation.config.json: restored the object boundary between the 192 and 66 exclusions, which made the file invalid JSON. Verified: all four examples run against Horizon Testnet in both text and JSON modes; 103 new tests pass; no new typecheck or lint errors. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VtubmgtuY97zQVrDu3PSKb
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
Describe the changes introduced by this Pull Request.
Related Issue
Closes #
Type of Change
Changes Made
Testing
npm run run-example <name>)npm run lint)npm run typecheck)CLI Output
Paste successful execution logs from your terminal here.
closes #252