Construct the deployer with a provided administrator.
Deploys the contract on behalf of the Deployer contract.
This has to be authorized by the Deployers administrator.
fn deploy(
env: soroban_sdk::Env,
wasm_hash: soroban_sdk::BytesN<32>,
salt: soroban_sdk::BytesN<32>,
constructor_args: soroban_sdk::Vec,
) -> soroban_sdk::Address
Initialize the factory contract with an admin address. Can only be called once, must be called before deploy() can be used.
fn initialize(env: soroban_sdk::Env, admin: soroban_sdk::Address)
Calculate the deterministic address of a contract that will be deployed with the given salt. This uses the current contract address as the deployer.
NOTE: In Soroban, the deterministic address is calculated from ONLY:
The wasm_hash and constructor_args do NOT affect the address calculation. They only determine what code runs at that address and how it's initialized.
This function can be called at anytime, before or after the contract is deployed, because contract addresses are deterministic.
salt - The 32-byte salt used for deploymentAddress - The deterministic address of the contract that will be deployedfn calculate_address(
env: soroban_sdk::Env,
salt: soroban_sdk::BytesN<32>,
) -> soroban_sdk::Address