Struct CallPublicOptions
pub struct CallPublicOptions
{ /* private fields */ }
Implementations
impl CallPublicOptions
pub fn new() -> Self
Creates a new CallPublicOptions with default values, i.e. the same as if using
TestEnvironment::call_public without the _opts variant.
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
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.
Configuration values for
TestEnvironment::call_public_opts. Meant to be used by callingnewand then chaining methods setting each value, e.g.:Gas settings fields are not cross-validated - nonsense combinations (e.g.
teardown_gas_limitslarger thangas_limits) will be forwarded as-is and may be rejected by simulation.