Skip to content

feat: add contract client generation workflow for frontend (#81)#115

Merged
ritik4ever merged 1 commit intoritik4ever:mainfrom
cyber-excel10:feat/issue-81-contract-bindings-workflow
Mar 30, 2026
Merged

feat: add contract client generation workflow for frontend (#81)#115
ritik4ever merged 1 commit intoritik4ever:mainfrom
cyber-excel10:feat/issue-81-contract-bindings-workflow

Conversation

@cyber-excel10
Copy link
Copy Markdown
Contributor

Closes #81

Description

This PR implements the contract client generation workflow for StellarStream (issue #81) and restores the README.md file that was accidentally deleted.

What's included

Issue #81: Contract Client Generation Workflow

  • scripts/generate-contract-bindings.sh — Repeatable script to generate TypeScript bindings from deployed contract
  • docs/CONTRACT_BINDINGS.md — Comprehensive 231-line workflow guide covering:
    • Prerequisites and setup
    • Step-by-step generation process
    • Generated types and methods
    • Frontend integration points (contractClient.ts, api.ts, useFreighter.ts)
    • Regeneration workflow for contributors
    • CI/automation guidance
    • Troubleshooting section
  • npm run gen:bindings — Easy-to-use npm script
  • ✅ Updated .gitignore to exclude generated bindings folder
  • ✅ Updated README section 9 with scripts and docs references

README Restoration

  • Restored README.md from last committed version 429 lines
  • Includes all latest documentation updates
  • Added section 9 references to new contract bindings workflow
  • All sections verified and current

Acceptance Criteria (Issue #81)

  • A repeatable generation command exists (npm run gen:bindings)
  • Output location is documented (frontend/src/contracts/generated/)
  • Frontend integration points are identified:
    • frontend/src/services/contractClient.ts — wrapper service
    • frontend/src/services/api.ts — integration points
    • frontend/src/hooks/useFreighter.ts — wallet signing
  • Contributors can regenerate bindings without guesswork (full workflow documented)

Testing

# Verify script syntax
bash -n scripts/generate-contract-bindings.sh

# Test error handling (should show helpful message about missing CONTRACT_ID)
npm run gen:bindings

…r#81)

- Add generate-contract-bindings.sh script for TypeScript binding generation
- Document full workflow in docs/CONTRACT_BINDINGS.md (231 lines)
- Update README section 9 with scripts and docs references
- Configure .gitignore for generated bindings folder
- Add npm script: npm run gen:bindings
- Document frontend integration points (contractClient.ts, api.ts, useFreighter.ts)
- Include CI/automation guidance for regeneration
- All acceptance criteria met:
  ✅ Repeatable generation command exists
  ✅ Output location documented
  ✅ Frontend integration points identified
  ✅ Contributors can regenerate without guesswork
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 29, 2026

Someone 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
Copy link
Copy Markdown

drips-wave bot commented Mar 29, 2026

@cyber-excel10 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

@cyber-excel10
Copy link
Copy Markdown
Contributor Author

@ritik4ever Thank you for assigning me to this issue! I've completed the contract client generation workflow for issue #81.

Important Note

While working on this, I noticed that README.md was accidentally deleted in a recent PR. I've restored it and included the latest updates in this PR.

Could you please review:

  1. That the restored README.md aligns with the project's current state
  2. The new section 9 additions for the contract bindings workflow.

Thanks for the opportunity to contribute to StellarStream. I have learnt a lot from the few task assigned to me .

Looking forward to your feedback!

@ritik4ever ritik4ever merged commit 7302eb0 into ritik4ever:main Mar 30, 2026
1 of 3 checks passed
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.

Add Contract Client Generation Workflow For Frontend

2 participants