Skip to main content

TestEnvironment

Methods

new

TestEnvironment::new();

Takes no parameters.

block_number

TestEnvironment::block_number(self);

Parameters

NameType
self

contract_address

TestEnvironment::contract_address(self);

Parameters

NameType
self

impersonate

TestEnvironment::impersonate(self, address);

Parameters

NameType
self
addressAztecAddress

advance_block_to

TestEnvironment::advance_block_to(&mut self, block_number);

Parameters

NameType
&mut self
block_numberu32

advance_block_by

TestEnvironment::advance_block_by(&mut self, blocks);

Parameters

NameType
&mut self
blocksu32

public

TestEnvironment::public(self);

Parameters

NameType
self

private

TestEnvironment::private(&mut self);

Parameters

NameType
&mut self

unkonstrained

unconstrained is a key word, so we mis-spell purposefully here, like we do with contrakt

TestEnvironment::unkonstrained(self);

Parameters

NameType
self

private_at

TestEnvironment::private_at(&mut self, historical_block_number);

Parameters

NameType
&mut self
historical_block_numberu32

create_account

TestEnvironment::create_account(self);

Parameters

NameType
self

create_account_contract

TestEnvironment::create_account_contract(&mut self, secret);

Parameters

NameType
&mut self
secretField

deploy

TestEnvironment::deploy(self, path);

Parameters

NameType
self
pathstr<N>

call_private

TestEnvironment::call_private(self, call_interface);

Parameters

NameType
self
call_interfaceC

call_private_void

TestEnvironment::call_private_void(self, call_interface);

Parameters

NameType
self
call_interfaceC

call_public

TestEnvironment::call_public(self, call_interface);

Parameters

NameType
self
call_interfaceC

assert_public_call_fails

TestEnvironment::assert_public_call_fails(self, call_interface);

Parameters

NameType
self
call_interfaceC

assert_private_call_fails

TestEnvironment::assert_private_call_fails(self, call_interface);

Parameters

NameType
self
call_interfaceC

store_note_in_cache

TestEnvironment::store_note_in_cache(self, note, storage_slot, contract_address);

Parameters

NameType
self
note&mut Note
storage_slotField
contract_addressAztecAddress