Add a `--js-stellar-sdk-version` option to `soroban contract bindings typescript`

Open
#1,327 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, rust

Research direction

Start at the soroban contract bindings typescript command entry point and trace how the JavaScript SDK version is selected for generated bindings. Define the supported SDK-version range and option behavior, then verify that generated bindings target the requested version; the payload names no specific files or tests.

Written by the indexing model from the issue text.

Description

I think we should add a --js-stellar-sdk-version option to soroban contract bindings typescript.

When folks are generating contract bindings for their contract they're generating bindings that'll be used with a version of the js-stellar-sdk that they may already have imported into their application.

Today the version of CLI installed is tightly coupled to a version of the js-stellar-sdk, and upgrading one result in getting a version of the other.

It seems unreasonable to me that if a dev wants a latest CLI to get some new CLI feature, that they also need to go update the applications they use if they need to regenerate their bindings.

I think it's reasonable to limit the range of support. The CLI shouldn't be expected to support all versions of js-stellar-sdk going back to the beginning, but as part of addressing this issue a general rule can be decided on, such as support the last two major versions of the js-stellar-sdk.

cc @chadoh
cc @Shaptic @mollykarcher

Dominant language
Rust
Stars
123
Forks
141
Avg merge
2d 21h
Merged PRs (30d)
17

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from stellar/stellar-cli

All issues in stellar/stellar-cli

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.