Struct PrivateContextOptions
pub struct PrivateContextOptions
{ /* private fields */ }
Implementations
impl PrivateContextOptions
pub fn new() -> Self
Creates a new PrivateContextOptions with default values, i.e. the same as if using
TestEnvironment::private_context instead of TestEnvironment::private_context_opts. Use
at_anchor_block_number and other methods to set the desired
configuration values.
pub fn at_anchor_block_number(&mut self, anchor_block_number: u32) -> Self
Sets the desired anchor block number to base the private context in. Only past block numbers can be specified.
If not set, defaults to the last block number.
pub fn at_contract_address(&mut self, contract_address: AztecAddress) -> Self
Sets the contract address in which the private context will execute, which will affect note and nullifier siloing, storage access, etc.
pub fn with_gas_limits(&mut 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(&mut 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(&mut 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(
&mut 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(&mut self, gas_settings: GasSettings) -> Self
Sets all gas settings 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.
Configuration values for
TestEnvironment::private_context_opts. Meant to be used by callingnewand then chaining methods setting each value, e.g.: