stellar / js-stellar-sdk

Main Stellar client library for the JavaScript language.
https://stellar.github.io/js-stellar-sdk/
Apache License 2.0
628 stars 311 forks source link

Use `soroban contract init` to generate contracts for `e2e tests` #980

Open chadoh opened 4 months ago

chadoh commented 4 months ago

Is your feature request related to a problem? Please describe. Right now, the test/e2e/wasms directory has built binary files copy-pasted from stellar-cli.

Describe the solution you'd like Let's use a script with soroban contract init to copy in contracts from soroban-examples, then build those. We will need to use off-the-shelf soroban-examples, though, which means we will need to modify some of these tests. The test-wasms directory in stellar-cli contains somewhat-modified examples contracts, such as a hello_world contract with increment behavior. We will need to change the tests that expect this to instead test the two separate contracts. (Or, honestly, if you look over the tests and decide we don't need both, then we can remove some tests.)

Describe alternatives you've considered We could add soroban-examples as a git submodule.

BlaineHeffron commented 3 months ago

https://github.com/stellar/js-stellar-sdk/pull/995