Expand description
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 deployments before testing them on a live blockchain.
To understand the design of this module, please refer to ../DESIGN.md
Modules§
- addons
- MultiTest add-ons
- custom_
handler - error
- queries
- wasm_
emulation
Structs§
- Accepting
Module - App
- Router is a persisted state. You can query this. Execution generally happens on the RouterCache, which then can be atomically committed or rolled back. We offer .execute() as a wrapper around cache, execute, commit/rollback process.
- AppBuilder
- Utility to build App in stages. When particular properties are not explicitly set, then default values are used.
- AppResponse
- Bank
Keeper - Contract
Data - Contract data includes information about contract,
equivalent of
ContractInfoinwasmdinterface. - Contract
Wrapper - Wraps the exported functions from a contract and provides the normalized format Place T4 and E4 at the end, as we just want default placeholders for most contracts that don’t have sudo
- Distribution
Keeper - Failing
Module - Prefixed
Storage - Readonly
Prefixed Storage - Router
- Simple
Address Generator - Default contract address generator used in WasmKeeper.
- Stake
Keeper - Staking
Info - Wasm
Keeper - Wasm
Sudo
Enums§
- Bank
Sudo - Staking
Sudo - SudoMsg
- We use it to allow calling into modules from another module in sudo mode. Things like gov proposals belong here.
Constants§
Traits§
- Address
Generator - Common address generator interface.
- Bank
- Checksum
Generator - Provides a custom interface for generating checksums for contract code. This is crucial for ensuring code integrity and is particularly useful in environments where code verification is a key part of the contract deployment process. This trait defines a method to calculate checksum based on the creator’s address and a unique code identifier.
- Contract
- Interface to call into a Contract.
- Cosmos
Router - Distribution
- Executor
- Gov
- Ibc
- Module
- Module interface.
- Staking
- Wasm
Functions§
- custom_
app - Creates new default
Appimplementation working with customized exec and query messages. Outside ofAppimplementation to make type elision better. - next_
block
Type Aliases§
- Basic
App - Type alias for default build
Appto make its storing simpler in typical scenario - Basic
AppBuilder - This is essential to create a custom app with custom module.
- GovAccepting
Module - GovFailing
Module - IbcAccepting
Module - IbcFailing
Module