Expand description
Mock blockchain utilities. These can only be used inside tests and are not available for a wasm32 target.
Structs§
- Mocked
Blockchain - Mocked blockchain that can be used in the tests for the smart contracts.
It implements
BlockchainInterface
by redirecting calls toVMLogic
. It unwraps errors ofVMLogic
to cause panic during the unit tests similarly to how errors ofVMLogic
would cause the termination of guest program execution. Unit tests can even assert the expected error message. - Receipt
Enums§
Functions§
- test_
vm_ config - with_
mocked_ blockchain - Perform function on a mutable reference to the
MockedBlockchain
. This can only be used inside tests.