Skip to content

ci(stellar): add ABI snapshot matching gate for contracts - #137

Open
odarome132 wants to merge 2 commits into
wraith-protocol:developfrom
odarome132:feat/abi-compat-ci-gate
Open

ci(stellar): add ABI snapshot matching gate for contracts#137
odarome132 wants to merge 2 commits into
wraith-protocol:developfrom
odarome132:feat/abi-compat-ci-gate

Conversation

@odarome132

Copy link
Copy Markdown

Closes #111

Summary
This adds a CI gate that extracts and commits Soroban contract ABIs as JSON snapshots. If a PR silently changes an ABI (functions, inputs, outputs)
without intentionally updating the snapshot, CI will fail the build, preventing downstream breakages for indexers and SDKs.
What Changed:
• Added stellar/abi/update.sh to extract ABIs into stellar/abi/*.json
• Commited initial ABI snapshots for all 4 stellar contracts
• Added stellar/abi/README.md to explain how contributors can intentionally update snapshots
• Updated .github/workflows/ci.yml to run the update script and fail if git diff --exit-code abi/ detects changes

Key Design Decisions & Discrepancies:
• Discrepancy Note: The issue description requested using stellar contract inspect to extract JSON. However, inspect is deprecated and does not support
JSON output natively. I used the replacement command stellar contract info interface --output json-formatted to cleanly fulfill the requirement.
• Dependencies: Bumped ethnum inside the stellar/Cargo.lock. Without this bump, the wasm32-unknown-unknown build fails on the latest Rust compiler due to
a known TryFromIntError size issue.
• CI Performance: Used the official stellar/actions/setup-cli@main action to install the stellar-cli instantly rather than waiting 10+ minutes for a
cargo install.

Acceptance Criteria:

[✓] Snapshot lands committed for all four contracts
[✓] PR that changes a signature without updating snapshot fails CI
[✓] stellar/abi/README.md explains the flow

Testing:

• Existing rust tests pass (cargo test --workspace)
• Adding a dummy function to stealth-announcer locally correctly triggered a CI failure via git diff.

Security Note:
No secrets are introduced. The Wasm build is reproducible and local to the runner.

@drips-wave

drips-wave Bot commented Jul 24, 2026

Copy link
Copy Markdown

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

@truthixify

Copy link
Copy Markdown
Contributor

CI hasn't fired here yet. Push an empty commit or rebase on develop so the workflow picks it up.

@truthixify

Copy link
Copy Markdown
Contributor

Conflicts against develop. Rebase, force-push, and CI will kick off.

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.

Contract ABI compatibility CI gate

2 participants