forked from hyperledger-solang/solang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Followup regarding subxt test (hyperledger-solang#1381)
- Loading branch information
Showing
5 changed files
with
34 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Solang `subxt` integration test suite | ||
|
||
This directroy contains integration tests against a real node using `subxt`. | ||
|
||
## How to execute the tests | ||
|
||
The test cases requires compiled versions of the contracts from the `substrate` integration test suite inside the `./outputs` dir. To compile everything, run: | ||
|
||
```bash | ||
parallel solang compile -v --target substrate --release -o ./contracts/ ::: ../substrate/*.sol ../substrate/test/*.sol | ||
``` | ||
|
||
Make sure to start a [solang-substrate-ci node](https://github.com/hyperledger/solang-substrate-ci) or a [substrate-contracts-node](https://github.com/paritytech/substrate-contracts-node) on the test host. | ||
|
||
Run only one test at the time against the node by setting the `RUST_TEST_THREADS=1` env var or by passing `-- --test-threads=1 ` to `cargo test`. | ||
|
||
```bash | ||
# Execute all test cases | ||
cargo test -- --test-threads=1 | ||
``` | ||
|
||
## How to upgrade the node metadata | ||
A version upgrade of the node likely requires new metadata. The metadata from a local node can be acquired using [subxt](https://crates.io/crates/subxt) like so: | ||
|
||
```bash | ||
subxt metadata --url ws://127.0.0.1:9944 -f bytes > metadata.scale | ||
``` |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters