aztec-nr - noir_aztec::test::helpers::test_environment

Struct ExecuteUtilityOptions

pub struct ExecuteUtilityOptions<let T: u32>
{ /* private fields */ }

Configuration for TestEnvironment::execute_utility_opts.

Constructed by calling ExecuteUtilityOptions::new and then chaining methods:

env.execute_utility_opts(
    ExecuteUtilityOptions::new().with_authorized_utility_call_targets([target]),
    SomeContract::at(addr).some_utility_function(),
);

Implementations

impl<let T: u32> ExecuteUtilityOptions<T>

pub fn with_authorized_utility_call_targets<let T_2: u32>( _self: Self, targets: [AztecAddress; T_2], ) -> ExecuteUtilityOptions<T_2>

Authorizes cross-contract utility calls to the given target contracts during this call.

By default, cross-contract utility calls are denied. This method lets the test author specify which target contracts are allowed to be called via utility functions during execution.

impl ExecuteUtilityOptions<0>

pub fn new() -> Self

Creates default ExecuteUtilityOptions.