Skip to main content

cheatcodes

Standalone Functions

reset

reset();

Takes no parameters.

get_chain_id

get_chain_id();

Takes no parameters.

get_version

get_version();

Takes no parameters.

get_contract_address

get_contract_address();

Takes no parameters.

set_contract_address

set_contract_address(address);

Parameters

NameType
addressAztecAddress

get_block_number

get_block_number();

Takes no parameters.

advance_blocks_by

advance_blocks_by(blocks);

Parameters

NameType
blocksu32

get_private_context_inputs

get_private_context_inputs(historical_block_number);

Parameters

NameType
historical_block_numberu32

get_public_context_inputs

get_public_context_inputs();

Takes no parameters.

deploy

deploy(path, initializer, args, public_keys_hash);

Parameters

NameType
pathstr<N>
initializerstr<M>
args[Field]
public_keys_hashField

direct_storage_write

direct_storage_write(contract_address, storage_slot, fields);

Parameters

NameType
contract_addressAztecAddress
storage_slotField
fields[Field; N]

create_account

create_account();

Takes no parameters.

add_account

add_account(secret, partial_address);

Parameters

NameType
secretField
partial_addressPartialAddress

derive_keys

derive_keys(secret);

Parameters

NameType
secretField

set_msg_sender

set_msg_sender(msg_sender);

Parameters

NameType
msg_senderAztecAddress

get_msg_sender

get_msg_sender();

Takes no parameters.

get_side_effects_counter

get_side_effects_counter();

Takes no parameters.

add_authwit

add_authwit(address, message_hash);

Parameters

NameType
addressAztecAddress
message_hashField

assert_public_call_fails

assert_public_call_fails(target_address, function_selector, args);

Parameters

NameType
target_addressAztecAddress
function_selectorFunctionSelector
args[Field]

assert_private_call_fails

assert_private_call_fails(target_address, function_selector, argsHash, sideEffectsCounter, isStaticCall, isDelegateCall);

Parameters

NameType
target_addressAztecAddress
function_selectorFunctionSelector
argsHashField
sideEffectsCounterField
isStaticCallbool
isDelegateCallbool

add_nullifiers

add_nullifiers(contractAddress, nullifiers);

Parameters

NameType
contractAddressAztecAddress
nullifiers[Field]

add_note_hashes

add_note_hashes(contractAddress, inner_note_hashes);

Parameters

NameType
contractAddressAztecAddress
inner_note_hashes[Field]

get_function_selector

get_function_selector();

Takes no parameters.

set_fn_selector

set_fn_selector(selector);

Parameters

NameType
selectorFunctionSelector

oracle_reset

oracle_reset();

Takes no parameters.

oracle_get_chain_id

oracle_get_chain_id();

Takes no parameters.

oracle_get_version

oracle_get_version();

Takes no parameters.

oracle_get_contract_address

oracle_get_contract_address();

Takes no parameters.

oracle_set_contract_address

oracle_set_contract_address(address);

Parameters

NameType
addressAztecAddress

oracle_get_block_number

oracle_get_block_number();

Takes no parameters.

oracle_advance_blocks_by

oracle_advance_blocks_by(blocks);

Parameters

NameType
blocksu32

oracle_get_private_context_inputs

oracle_get_private_context_inputs(historical_block_number);

Parameters

NameType
historical_block_numberu32

oracle_get_public_context_inputs

oracle_get_public_context_inputs();

Takes no parameters.

oracle_deploy

oracle_deploy(path, initializer, args, public_keys_hash);

Parameters

NameType
pathstr<N>
initializerstr<M>
args[Field]
public_keys_hashField

direct_storage_write_oracle

direct_storage_write_oracle(_contract_address, _storage_slot, _values);

Parameters

NameType
_contract_addressAztecAddress
_storage_slotField
_values[Field; N]

oracle_create_account

oracle_create_account();

Takes no parameters.

oracle_add_account

oracle_add_account(secret, partial_address);

Parameters

NameType
secretField
partial_addressPartialAddress

oracle_derive_keys

oracle_derive_keys(secret);

Parameters

NameType
secretField

oracle_get_msg_sender

oracle_get_msg_sender();

Takes no parameters.

oracle_set_msg_sender

oracle_set_msg_sender(msg_sender);

Parameters

NameType
msg_senderAztecAddress

oracle_get_side_effects_counter

oracle_get_side_effects_counter();

Takes no parameters.

orable_add_authwit

orable_add_authwit(address, message_hash);

Parameters

NameType
addressAztecAddress
message_hashField

oracle_assert_public_call_fails

oracle_assert_public_call_fails(target_address, function_selector, args);

Parameters

NameType
target_addressAztecAddress
function_selectorFunctionSelector
args[Field]

oracle_assert_private_call_fails

oracle_assert_private_call_fails(target_address, function_selector, argsHash, sideEffectsCounter, isStaticCall, isDelegateCall);

Parameters

NameType
target_addressAztecAddress
function_selectorFunctionSelector
argsHashField
sideEffectsCounterField
isStaticCallbool
isDelegateCallbool

oracle_add_nullifiers

oracle_add_nullifiers(contractAddress, nullifiers);

Parameters

NameType
contractAddressAztecAddress
nullifiers[Field]

oracle_add_note_hashes

oracle_add_note_hashes(contractAddress, inner_note_hashes);

Parameters

NameType
contractAddressAztecAddress
inner_note_hashes[Field]

oracle_get_function_selector

oracle_get_function_selector();

Takes no parameters.

oracle_set_function_selector

oracle_set_function_selector(selector);

Parameters

NameType
selectorFunctionSelector