68 releases (8 stable)

3.0.0-ibc-alpha.0 Jul 10, 2024
2.2.0 Nov 7, 2024
2.1.1 Aug 20, 2024
2.1.0 Jul 5, 2024
0.4.0 Dec 22, 2020

#4 in #cosmwasm

Download history 5150/week @ 2024-08-30 4667/week @ 2024-09-06 4573/week @ 2024-09-13 6503/week @ 2024-09-20 6000/week @ 2024-09-27 4259/week @ 2024-10-04 4111/week @ 2024-10-11 4484/week @ 2024-10-18 5131/week @ 2024-10-25 5428/week @ 2024-11-01 3560/week @ 2024-11-08 4815/week @ 2024-11-15 4347/week @ 2024-11-22 7927/week @ 2024-11-29 10392/week @ 2024-12-06 7231/week @ 2024-12-13

30,632 downloads per month
Used in 172 crates (159 directly)

Apache-2.0

540KB
12K SLoC

CosmWasm MultiTest

cw-multi-test on crates.io docs codecov license

Testing tools for multi-contract interactions

Introduction

CosmWasm MultiTest is a suite of testing tools designed for facilitating multi-contract interactions within the CosmWasm ecosystem. Its primary focus is on providing developers with a robust framework for simulating complex contract interactions and bank operations.

Library Capabilities

CosmWasm MultiTest enables comprehensive unit testing, including scenarios where contracts call other contracts and interact with several modules like bank and staking. Its current implementation effectively handles these interactions, providing a realistic testing environment for contract developers. The team is committed to extending CosmWasm MultiTest's capabilities, making it a versatile tool for various blockchain interaction tests.

Feature flags

CosmWasm MultiTest library provides several feature flags that can be enabled like shown below:

[dev-dependencies]
cw-multi-test = { version = "2.1.0", features = ["staking", "stargate", "cosmwasm_2_0"] }

Since version 2.1.0, CosmWasm MultiTest has no default features enabled. The table below summarizes all available features:

Feature Description
backtrace Enables backtrace feature in anyhow dependency.
staking Enables staking feature in cosmwasm-std dependency.
stargate Enables stargate feature in cosmwasm-std dependency.
cosmwasm_1_1 Enables cosmwasm_1_1 feature in cosmwasm-std dependency.
cosmwasm_1_2 Enables cosmwasm_1_1 in MultiTest and cosmwasm_1_2 feature in cosmwasm-std dependency.
cosmwasm_1_3 Enables cosmwasm_1_2 in MultiTest and cosmwasm_1_3 feature in cosmwasm-std dependency.
cosmwasm_1_4 Enables cosmwasm_1_3 in MultiTest and cosmwasm_1_4 feature in cosmwasm-std dependency.
cosmwasm_2_0 Enables cosmwasm_1_4 in MultiTest and cosmwasm_2_0 feature in cosmwasm-std dependency.

IBC support

This is the alpha version of IBC support in CosmWasm MultiTest, generously contributed by Abstract.

Conclusion

CosmWasm MultiTest stands as a vital development tool in the CosmWasm ecosystem, especially for developers engaged in building complex decentralized applications. As the framework evolves, it is poised to become an even more integral part of the CosmWasm development toolkit. Users are encouraged to stay updated with its progress and contribute to its development.

License

Licensed under Apache License, Version 2.0 (see LICENSE and NOTICE).

Any contribution intentionally submitted for inclusion in this crate by you, shall be licensed as above, without any additional terms or conditions.

Dependencies

~5–12MB
~161K SLoC