Skip to content

feat(ci): add contract bindings auto-regeneration after deploy (#788) - #828

Open
Kingsley4867 wants to merge 1 commit into
ritik4ever:mainfrom
Kingsley4867:feat/contract-bindings-auto-regeneration
Open

feat(ci): add contract bindings auto-regeneration after deploy (#788)#828
Kingsley4867 wants to merge 1 commit into
ritik4ever:mainfrom
Kingsley4867:feat/contract-bindings-auto-regeneration

Conversation

@Kingsley4867

@Kingsley4867 Kingsley4867 commented Jul 29, 2026

Copy link
Copy Markdown

Closes #788

What changed

  • Added automatic contract binding regeneration to the CI workflow after successful testnet deployments.
  • Configured the workflow to commit regenerated bindings and create a PR containing the updates.
  • Added a frontend TypeScript validation step to ensure generated bindings compile successfully before publishing.

Testing done

  • Verified the binding generation workflow executes after testnet deployment.
  • Confirmed regenerated bindings pass the frontend TypeScript compilation check.
  • Validated the CI workflow creates a PR with updated bindings when changes are detected.

Related issues

Closes #788

Checklist

  • I kept the change focused on the related issue.
  • I added or updated tests where useful.
  • I updated documentation where behavior changed.
  • I verified the app still builds or explained why verification was skipped.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

* **New Features**
  * Automated testnet contract deployments now run when relevant contract changes reach the main branch.
  * Contract bindings are automatically regenerated and submitted for review after deployment.
  * Generated bindings are validated with a frontend TypeScript compilation check.

* **Documentation**
  * Updated contract binding documentation to explain the automated regeneration and validation process.

* **Bug Fixes**
  * Binding generation can now recover the contract identifier from the project configuration when it is not provided directly.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

@kodinaka30-ship-it is attempting to deploy a commit to the ritik4ever's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

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

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Contract binding automation

Layer / File(s) Summary
Binding generation and validation contract
scripts/generate-contract-bindings.sh, docs/CONTRACT_BINDINGS.md
The script supports a contract ID file fallback and optional frontend TypeScript validation; documentation describes the automated CI flow.
Testnet deployment workflow
.github/workflows/contract-deploy.yml
A deployment workflow provisions tooling and credentials, deploys to testnet, regenerates bindings, validates TypeScript, and opens a pull request.
Smoke workflow binding integration
.github/workflows/contract-smoke.yml
The smoke workflow adds write permissions and post-deployment binding regeneration, TypeScript validation, and pull request creation.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers: emmzyemms

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly states the main change: automatic contract binding regeneration after deploy.
Linked Issues check ✅ Passed The PR runs binding generation after deploy, validates with TypeScript, and creates a PR with updated bindings.
Out of Scope Changes check ✅ Passed The added workflow, script, and docs changes all support the stated binding auto-regeneration flow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/contract-deploy.yml:
- Around line 73-76: Pin peter-evans/create-pull-request in the Create Pull
Request with Updated Bindings step to the vetted full commit SHA instead of the
mutable v6 tag in both .github/workflows/contract-deploy.yml lines 73-76 and
.github/workflows/contract-smoke.yml lines 72-75.
- Around line 35-39: Install the affected package’s locked Node dependencies
before binding generation and TypeScript checking: add the appropriate npm
install step before gen:bindings and npx tsc in both
.github/workflows/contract-deploy.yml (lines 35-39) and
.github/workflows/contract-smoke.yml (lines 56-60), using npm ci or the
repository’s required package-lock installation flow.

In `@scripts/generate-contract-bindings.sh`:
- Around line 84-95: Update the frontend TypeScript validation block guarded by
SKIP_TS_CHECK to fail explicitly when npx is unavailable, and invoke the tsc
command directly in the conditional so its failure reaches the existing failure
message instead of being terminated by set -e before $? is checked. Preserve the
current success and failure outputs and exit behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 710f25f2-656f-4dbc-a63a-fb2bdf90c2d0

📥 Commits

Reviewing files that changed from the base of the PR and between b3d32c1 and 204b2fe.

📒 Files selected for processing (4)
  • .github/workflows/contract-deploy.yml
  • .github/workflows/contract-smoke.yml
  • docs/CONTRACT_BINDINGS.md
  • scripts/generate-contract-bindings.sh

Comment thread .github/workflows/contract-deploy.yml
Comment thread .github/workflows/contract-deploy.yml
Comment thread scripts/generate-contract-bindings.sh
@ritik4ever

Copy link
Copy Markdown
Owner

Hi @Kingsley4867,

This PR could not be merged because it has merge conflicts with the target branch.

Please resolve the merge conflicts, push the updated changes, and the PR can be reviewed and merged.

Thank you!

@kodinaka30-ship-it

Copy link
Copy Markdown

Please take your time and check it well and approve as it's has been resolved and no conflicts with base branch

1 similar comment
@Kingsley4867

Copy link
Copy Markdown
Author

Please take your time and check it well and approve as it's has been resolved and no conflicts with base branch

@Kingsley4867

Kingsley4867 commented Aug 1, 2026

Copy link
Copy Markdown
Author

Hi @ritik4ever , just following up on my submitted PR. I'd appreciate it if you could review. If everything looks good, I'd be grateful if you could approve it and award the associated points. Thank you!

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.

[FEATURE] Add contract bindings auto-regeneration in CI after deploy

3 participants