Module ink_env::test

source ·
Expand description

Operations on the off-chain testing environment.


Prepend contract message call with value transfer. Used for tests in off-chain environment.


The raw ABI respecting input data to a call.
The default accounts.
Record for an emitted event.


Types implementing this trait can be used as chain extensions.


Advances the chain by a single block.
Tests if a contract terminates successfully after self.env().terminate() has been called.
Gets the currently set callee.
Returns the amount of storage cells used by the account account_id.
Returns the default accounts for testing purposes: Alice, Bob, Charlie, Django, Eve and Frank.
Returns the balance of the account.
Returns the total number of reads and writes of the contract’s storage.
Returns the contents of the past performed environmental debug messages in order.
Returns the recorded emitted events in order.
Registers a new chain extension.
Runs the given closure test function with the default configuration for the off-chain environment.
Sets the balance of the account to the given balance.
Sets the callee for the next call.
Sets a caller for the next call.
Set to true to disable clearing storage
Sets the value transferred from the caller to the callee as part of the call.
Transfers value from the caller account to the contract.