Skip to main content

TestEnvironment

Methods

new

TestEnvironment::new();

Takes no parameters.

_new

TestEnvironment::_new();

Takes no parameters.

pending_block_number

TestEnvironment::pending_block_number(_self);

Parameters

NameType
_selfSelf

pending_timestamp

TestEnvironment::pending_timestamp(_self);

Parameters

NameType
_selfSelf

block_number

TestEnvironment::block_number(self);

Parameters

NameType
selfSelf

committed_block_number

TestEnvironment::committed_block_number(self);

Parameters

NameType
selfSelf

committed_timestamp

TestEnvironment::committed_timestamp(self);

Parameters

NameType
selfSelf

contract_address

TestEnvironment::contract_address(_self);

Parameters

NameType
_selfSelf

impersonate

TestEnvironment::impersonate(_self, address);

Parameters

NameType
_selfSelf
addressAztecAddress

advance_block_to

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

Parameters

NameType
&mut self
block_numberu32

advance_timestamp_to

TestEnvironment::advance_timestamp_to(&mut self, timestamp);

Parameters

NameType
&mut self
timestampu64

advance_block_by

TestEnvironment::advance_block_by(_self, blocks);

Parameters

NameType
_self&mut Self
blocksu32

advance_timestamp_by

TestEnvironment::advance_timestamp_by(_self, duration);

Parameters

NameType
_self&mut Self
durationu64

public

TestEnvironment::public(_self);

Parameters

NameType
_selfSelf

public_with_args_hash

TestEnvironment::public_with_args_hash(_self, args);

Parameters

NameType
_selfSelf
args[Field]

private

TestEnvironment::private(&mut self);

Parameters

NameType
&mut self

utility

TestEnvironment::utility(_self);

Parameters

NameType
_selfSelf

private_at

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

Parameters

NameType
&mut self
historical_block_numberu32

private_at_timestamp

TestEnvironment::private_at_timestamp(_self, historical_timestamp, );

Parameters

NameType
_self&mut Self
historical_timestampu64

create_account

TestEnvironment::create_account(_self, secret);

Parameters

NameType
_selfSelf
secretField

create_account_contract

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

Parameters

NameType
&mut self
secretField

deploy

TestEnvironment::deploy(_self, path, name, );

Parameters

NameType
_selfSelf
pathstr<N>
namestr<M>

deploy_self

TestEnvironment::deploy_self(_self, name);

Parameters

NameType
_selfSelf
namestr<M>

deploy_with_public_keys

TestEnvironment::deploy_with_public_keys(_self, path, name, secret, );

Parameters

NameType
_selfSelf
pathstr<N>
namestr<M>
secretField

deploy_self_with_public_keys

TestEnvironment::deploy_self_with_public_keys(_self, name, secret, );

Parameters

NameType
_selfSelf
namestr<M>
secretField

assert_public_call_fails

TestEnvironment::assert_public_call_fails(_self, call_interface);

Parameters

NameType
_selfSelf
call_interfaceC

assert_private_call_fails

TestEnvironment::assert_private_call_fails(_self, call_interface);

Parameters

NameType
_selfSelf
call_interfaceC

call_private

TestEnvironment::call_private(_self, from, call_interface, T, N>, );

Parameters

NameType
_selfSelf
fromAztecAddress
call_interfacePrivateCallInterface<M
T
N>

call_private_void

TestEnvironment::call_private_void(_self, from, call_interface, T, N>, );

Parameters

NameType
_selfSelf
fromAztecAddress
call_interfacePrivateVoidCallInterface<M
T
N>

simulate_utility

TestEnvironment::simulate_utility(_self, call_interface, T, N>, );

Parameters

NameType
_selfSelf
call_interfaceUtilityCallInterface<M
T
N>

simulate_void_utility

TestEnvironment::simulate_void_utility(_self, call_interface, T, N>, );

Parameters

NameType
_selfSelf
call_interfaceUtilityCallInterface<M
T
N>

call_public

TestEnvironment::call_public(_self, from, call_interface, T, N>, );

Parameters

NameType
_selfSelf
fromAztecAddress
call_interfacePublicCallInterface<M
T
N>

call_public_void

TestEnvironment::call_public_void(_self, from, call_interface, T, N>, );

Parameters

NameType
_selfSelf
fromAztecAddress
call_interfacePublicVoidCallInterface<M
T
N>

call_private_test

TestEnvironment::call_private_test(_self, from, call_interface, );

Parameters

NameType
_selfSelf
fromAztecAddress
call_interfaceX

simulate_utility_test

TestEnvironment::simulate_utility_test(_self, call_interface, );

Parameters

NameType
_selfSelf
call_interfaceX

call_public_test

TestEnvironment::call_public_test(_self, from, call_interface, );

Parameters

NameType
_selfSelf
fromAztecAddress
call_interfaceX

add_note

TestEnvironment::add_note(_self, note, storage_slot, contract_address, );

Parameters

NameType
_selfSelf
noteNote
storage_slotField
contract_addressAztecAddress