Crate apollo_cw_multi_test

Source
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 deployements before testing them on a live blockchain.

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

Modules§

custom_handler
error

Structs§

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. If particular items wont be set, defaults would be used
AppResponse
BankKeeper
ContractWrapper
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
DistributionKeeper
FailingModule
MockAddressGenerator
Address generator that mimics the wasmd behavior.
Router
SimpleAddressGenerator
Default contract address generator used in WasmKeeper.
StakeKeeper
StakingInfo
StargateKeeper
StargateMsg
WasmKeeper
WasmSudo

Enums§

BankSudo
StakingSudo
SudoMsg
We use it to allow calling into modules from another module in sudo mode. Things like gov proposals belong here.

Constants§

QUERY_ALL_BALANCES_PATH
QUERY_BALANCE_PATH
QUERY_SUPPLY_PATH
QUERY_WASM_CODE_INFO_PATH
QUERY_WASM_CONTRACT_INFO_PATH
QUERY_WASM_CONTRACT_RAW_PATH
QUERY_WASM_CONTRACT_SMART_PATH

Traits§

AddressGenerator
Common address generator interface.
Bank
Contract
Interface to call into a Contract
CosmosRouter
Executor
Ibc
Module
Staking
Stargate
StargateMessageHandler
StargateQueryHandler
Wasm

Functions§

custom_app
Creates new default App implementation working with customized exec and query messages. Outside of App implementation to make type elision better.
next_block

Type Aliases§

BasicApp
Type alias for default build App to make its storing simpler in typical scenario
BasicAppBuilder
This is essential to create a custom app with custom handler. let mut app = BasicAppBuilder::<E, Q>::new_custom().with_custom(handler).build();