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

Struct DeployOptions

pub struct DeployOptions
{ /* private fields */ }

Configuration values for TestEnvironment::deploy_opts. Meant to be used by calling new and then chaining methods setting each value, e.g.:

env.deploy_opts(DeployOptions::new().with_salt(42).with_secret(100), "MyContract").without_initializer();

Implementations

impl DeployOptions

pub fn new() -> Self

Creates a new DeployOptions with default values, i.e. the same as if using the deploy method instead of deploy_opts. Use the with_salt and with_secret methods to set the desired configuration values.

pub fn with_salt(&mut self, salt: Field) -> Self

Sets the deployment salt. The salt affects the resulting contract address: the same contract deployed with different salts will have different addresses.

pub fn with_secret(&mut self, secret: Field) -> Self

Sets the secret used for key derivation. The secret affects the contract's public keys and therefore its address: the same contract deployed with different secrets will have different addresses.