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

Modified all test-data wasm contracts, added new functionality, messages, queries and added integration tests #525

Merged
merged 16 commits into from
Jun 20, 2023
Merged
21 changes: 19 additions & 2 deletions integration-tests/modules/testdata/wasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
The folder contains the source code for the wasm contracts used for the tests.
For the tests simplification we use the prebuilt wasm artifacts.

# Build
# For a production-ready (compressed) build:

* Make sure you have `docker` (for optimized builds)
* Rebuild the optimized contracts for tests
* Open the folder with the contract to rebuild
Expand All @@ -12,5 +13,21 @@ For the tests simplification we use the prebuilt wasm artifacts.
docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/rust-optimizer:0.12.6
cosmwasm/rust-optimizer:0.12.13
```
The optimized contracts are generated in the artifacts/ directory.
Docs can be generated using `cargo doc --no-deps`

## Contracts

| Name | Description |
| -------------------------------------- | ----------------------- |
| [`bank-send`](./bank-send) | Simple bank transfer |
| [`simple-state`](./simple-state) | Simple state interaction |
| [`ft`](./ft) | AssetFT custom module interaction |
| [`nft`](./nft) | AssetNFT custom module interaction |

Bank-send and simple-state are here to to showcase and test the simple functionality of a CosmWasm contract. On the other side, the ft and nft contracts are useful to understand how to interact with Coreum Custom Modules. The messages and queries that we use to interact with the modules are defined in the [Coreum WASM SDK](https://github.com/CoreumFoundation/coreum-wasm-sdk) and is also available as a crate. Inside the FT and NFT contracts we detail more about these interactions.



Loading