Module ink_env::test [−][src]
Operations on the off-chain testing environment.
Structs
CallData | The raw ABI respecting input data to a call. |
ChainSpec | The chain specification. |
ContractTerminationResult | The result of a successful contract termination. |
DefaultAccounts | The default accounts. |
EmittedEvent | Record for an emitted event. |
Functions
advance_block | Advances the chain by a single block. |
assert_contract_termination | Tests if a contract terminates successfully after |
count_used_storage_cells | Returns the amount of storage cells used by the account |
default_accounts | Returns the default accounts for testing purposes: Alice, Bob, Charlie, Django, Eve and Frank. |
get_account_balance | Returns the balance of the account. |
get_contract_rent_allowance | Returns the rent allowance of the contract account. |
get_contract_storage_rw | Returns the total number of reads and writes of the contract’s storage. |
get_current_contract_account_id | Returns the account id of the currently executing contract. |
initialize_or_reset_as_default | Initializes the whole off-chain environment. |
pop_execution_context | Pops the top contract execution context. |
push_execution_context | Pushes a contract execution context. |
recorded_events | Returns the recorded emitted events in order. |
recorded_printlns | Returns the contents of the past performed environmental |
register_chain_extension | Registers a new chain extension. |
run_test | Runs the given closure test function with the default configuartion for the off-chain environment. |
set_account_balance | Sets the balance of the account to the given balance. |
set_block_entropy | Set the entropy hash of the current block. |
set_clear_storage_disabled | Set to true to disable clearing storage |
set_contract_rent_allowance | Sets the rent allowance of the contract account to the given rent allowance. |
update_chain_spec | Update the ChainSpec for the test environment |