Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ts-bindings): Client.deploy with constructor args #1745

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

chadoh
Copy link
Contributor

@chadoh chadoh commented Nov 19, 2024

What

  • allow omiting --contract-id flag to stellar contract bindings typescript command, passing only --wasm instead
  • if no --contract-id is included, then the contract will not be
    fetched from a network, so no network information is logged in this
    case
  • this means it's possible to create TS Bindings libraries for contracts
    that have not yet been deployed, which makes it useful to add types
    for Client.deploy to the generated TS Bindings
  • add fixture example of test_constructor from test-wasms

Why

Fixes #1562

Known limitations

stellar contract bindings typescript should probably also support --wasm-hash. I will do this in a follow-up PR.

@chadoh chadoh force-pushed the feat/ts-bindings/constructor-args branch 5 times, most recently from 5bc1b9d to 61a99d7 Compare November 20, 2024 21:30
@chadoh chadoh force-pushed the feat/ts-bindings/constructor-args branch 3 times, most recently from bb00731 to e924f39 Compare November 21, 2024 20:25
@chadoh chadoh marked this pull request as ready for review November 21, 2024 20:26
- allow omiting `--contract-id` flag to `stellar contract bindings
  typescript` command, passing only `--wasm` instead
- if no `--contract-id` is included, then the contract will not be
  fetched from a network, so no network information is logged in this
  case
- this means it's possible to create TS Bindings libraries for contracts
  that have not yet been deployed, which makes it useful to add types
  for `Client.deploy` to the generated TS Bindings
- add fixture example of `test_constructor` from test-wasms
@chadoh chadoh force-pushed the feat/ts-bindings/constructor-args branch from e924f39 to 7c29f05 Compare December 3, 2024 18:46
Copy link

socket-security bot commented Dec 3, 2024

Removed dependencies detected. Learn more about Socket for GitHub ↗︎

🚮 Removed packages: npm/[email protected]

View full report↗︎

Copy link
Contributor

@Shaptic Shaptic left a comment

Choose a reason for hiding this comment

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

Generated TypeScript LGTM 🤙 can't speak to the rest of it, though.

@chadoh chadoh enabled auto-merge (squash) December 6, 2024 21:43
@chadoh chadoh merged commit ba4687c into main Dec 9, 2024
31 checks passed
@chadoh chadoh deleted the feat/ts-bindings/constructor-args branch December 9, 2024 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

CAP-58: Add support to deploy with/without params to typescript bindings
5 participants