Struct CallPrivateOptions
pub struct CallPrivateOptions<let N: u32, let T: u32>
{ /* private fields */ }
Implementations
impl<let N: u32, let T: u32> CallPrivateOptions<N, T>
pub fn with_additional_scopes<let N_2: u32>(
self,
additional_scopes: [AztecAddress; N_2],
) -> CallPrivateOptions<N_2, T>
Grants access to secrets of additional accounts.
By default only the secrets that belong to the from account can be accessed: this function lets contracts
retrieve private information from other accounts during execution.
Example usage includes accounts withdrawing from an escrow, which may require accessing the escrow's own notes and secrets.
pub fn with_authorized_utility_call_targets<let T_2: u32>(
self,
targets: [AztecAddress; T_2],
) -> CallPrivateOptions<N, 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.
pub fn with_gas_limits(self, gas_limits: Gas) -> Self
Sets the gas limits for the transaction.
If not set, defaults to the maximum the protocol allows.
pub fn with_teardown_gas_limits(self, teardown_gas_limits: Gas) -> Self
Sets the teardown gas limits for the transaction.
If not set, defaults to 1/8 of the protocol maximum.
pub fn with_max_fees_per_gas(self, max_fees_per_gas: GasFees) -> Self
Sets the maximum fees per gas unit the sender is willing to pay.
If not set, defaults to zero.
pub fn with_max_priority_fees_per_gas(self, max_priority_fees_per_gas: GasFees) -> Self
Sets the maximum priority fees per gas unit.
If not set, defaults to zero.
pub fn with_gas_settings(self, gas_settings: GasSettings) -> Self
Convenience method to set all four gas settings fields at once.
Equivalent to calling with_gas_limits,
with_teardown_gas_limits,
with_max_fees_per_gas, and
with_max_priority_fees_per_gas individually.
impl CallPrivateOptions<0, 0>
pub fn new() -> Self
Creates default CallPrivateOptions.
The default values are the same as if using TestEnvironment::call_private instead of
TestEnvironment::call_private_opts.
Configuration for
TestEnvironment::call_private_opts.Constructed by calling
CallPrivateOptions::newand then chaining methods setting each value: