Skip to content

feat: add CI gate for contract ABI compatibility - #131

Open
Cerome360 wants to merge 1 commit into
wraith-protocol:developfrom
Cerome360:feat/abi-ci-gate
Open

feat: add CI gate for contract ABI compatibility#131
Cerome360 wants to merge 1 commit into
wraith-protocol:developfrom
Cerome360:feat/abi-ci-gate

Conversation

@Cerome360

Copy link
Copy Markdown

Closes #111

Summary

This PR adds a CI workflow step to prevent accidental and silent changes to contract ABIs, which can break downstream indexers and SDKs.

What Changed

  • Added a new bash script stellar/scripts/generate-abis.sh to extract the ABI for the four main smart contracts using stellar contract inspect.
  • Added the abi:snapshot script to stellar/package.json for easy updates.
  • Captured the initial valid ABI snapshots for stealth_announcer, stealth_registry, stealth_sender, and wraith_names under stellar/abi/.
  • Updated .github/workflows/ci.yml to generate the ABIs during the stellar CI job and fail if they differ from the committed snapshots using git diff --exit-code abi/.
  • Included a README in stellar/abi/ to instruct contributors on how to intentionally update the ABI.

Design Decisions & Notes

  • Used stellar contract inspect as specified by the issue.
  • Security Note: The ABI generator reads local artifacts and operates purely in CI, with no reliance on external client inputs or secrets.

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

@truthixify

Copy link
Copy Markdown
Contributor

Rebase against develop so the updated CI workflow picks up this branch. Right now no full CI run has fired yet.

@truthixify

Copy link
Copy Markdown
Contributor

Conflicts against develop from the recent merge batch. Rebase and force-push.

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