#multi #test #cosmwasm #cw

dev cw-multi-test

Test helpers for multi-contract interactions

42 releases

0.16.2 Dec 16, 2022
0.16.1 Nov 23, 2022
0.16.0 Oct 17, 2022
0.14.0 Jul 28, 2022
0.4.0 Dec 22, 2020

#1361 in Magic Beans

Download history 2183/week @ 2022-10-13 2677/week @ 2022-10-20 2435/week @ 2022-10-27 2813/week @ 2022-11-03 2442/week @ 2022-11-10 3036/week @ 2022-11-17 2340/week @ 2022-11-24 2086/week @ 2022-12-01 3324/week @ 2022-12-08 2735/week @ 2022-12-15 1820/week @ 2022-12-22 1761/week @ 2022-12-29 2498/week @ 2023-01-05 2759/week @ 2023-01-12 2931/week @ 2023-01-19 2793/week @ 2023-01-26

11,261 downloads per month
Used in 58 crates (54 directly)

Apache-2.0

320KB
8K SLoC

Multi Test: Test helpers for multi-contract interactions

Warning: Alpha Software Designed for internal use only.

This is used for testing cw-plus contracts, we have no API stability currently. We are working on refactoring it and will expose a more refined version for use in other contracts. (Ideally in cw-plus 0.9 or 0.10).

Use at your own risk

Let us run unit tests with contracts calling contracts, and calling in and out of bank.

This only works with contracts and bank currently. We are working on refactoring to make it more extensible for more handlers, including custom messages/queries as well as IBC.


lib.rs:

Multitest is a design to simulate a blockchain environment in pure Rust. This allows us to run unit tests that involve contract -> contract, and contract -> bank interactions. This is not intended to be a full blockchain app but to simulate the Cosmos SDK x/wasm module close enough to gain confidence in multi-contract deployements before testing them on a live blockchain.

To understand the design of this module, please refer to ../DESIGN.md

Dependencies

~5–7MB
~144K SLoC