For the complete documentation index, see llms.txt.
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.

Equivalent to using deploy instead of deploy_opts. Use the with_salt, with_secret and with_immutables_hash 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.

pub fn with_immutables_hash(&mut self, immutables_hash: Field) -> Self

Sets the instance's immutables hash. The immutables hash affects the resulting contract address: the same contract deployed with different immutables hashes will have different addresses.