Skip to main content

Module testing

Module testing 

Source
Available on crate feature testing only.
Expand description

Provides test utilities for working with accounts and account IDs within the Miden network. This module is only available when the testing feature is enabled.

Modules§

account_component
account_id
account_interface
commonstd
executor
mock
mock_account
mock_account_code
note
note_transport
utils

Macros§

assert_execution_error
assert_transaction_executor_error

Structs§

MockChain
The MockChain simulates a simplified blockchain environment for testing purposes.
MockChainBuilder
A builder for a MockChain’s genesis block.
NoteBuilder
TransactionContext
Represents all needed data for executing a transaction, or arbitrary code.
TransactionContextBuilder
TransactionContextBuilder is a utility to construct TransactionContext for testing purposes. It allows users to build accounts, create notes, provide advice inputs, and execute code. The VM process can be inspected afterward.

Enums§

AccountState
Helper type for increased readability at call-sites. Indicates whether to build a new (nonce = ZERO) or existing account (nonce = ONE).
Auth
Specifies which authentication mechanism is desired for accounts
MockChainNote
Represents a note that is stored in the mock chain.
TxContextInput
Helper type to abstract over the inputs to MockChain::build_tx_context. See that method’s docs for details.