Skip to content

Commit

Permalink
feat(ts-bindings)!: now powered by ContractClient (#1258)
Browse files Browse the repository at this point in the history
* feat(ts-bindings)!: now powered by ContractClient

Most logic in the TS Bindings has now been implemented in stellar-sdk as
a `ContractClient` that dynamically fetches the contract's XDR and
generates JS for each contract method at runtime. This means logic like
`AssembledTransaction` now lives entirely in stellar-sdk, and can be
relied on by each library generated by TS Bindings, rather than
duplicating this logic in each of these libraries. TS Bindings now has a
much smaller focus—basically, only to generate the types.

This shrinks the TS Bindings, importing and using this new
ContractClient logic.

* build: remove redundant TS tests

All tests that are being removed are now duplicates of tests that are in
stellar-sdk. So are the test-custom-types tests, but those ones actually
caught some edge cases, so maybe they're worth keeping.

* use result pattern in cmd/crates/soroban-spec-typescript/src/boilerplate.rs
  • Loading branch information
chadoh authored Mar 26, 2024
1 parent 5f367ed commit 58e4189
Show file tree
Hide file tree
Showing 39 changed files with 2,223 additions and 5,741 deletions.
11 changes: 1 addition & 10 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

complete:
if: always()
needs: [fmt, rust-analyzer-compat, build-and-test, publish-dry-run]
needs: [fmt, build-and-test, publish-dry-run]
runs-on: ubuntu-latest
steps:
- if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
Expand All @@ -26,15 +26,6 @@ jobs:
- run: rustup update
- run: cargo fmt --all --check

rust-analyzer-compat:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rustup update
- run: rustup +nightly component add rust-analyzer
- name: Check if rust-analyzer encounters any errors parsing project
run: rustup run nightly rust-analyzer analysis-stats . 2>&1 | (! grep '^\[ERROR')

build-and-test:
strategy:
fail-fast: false
Expand Down
8 changes: 7 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Loading

0 comments on commit 58e4189

Please sign in to comment.