Initialize the factory with the simple_account WASM hash. This hash is used to deploy new account instances.
fn __constructor(env: soroban_sdk::Env, wasm_hash: soroban_sdk::BytesN<32>)
Create a new simple_account contract for the given owner public key.
No authorization required - anyone can deploy a contract for any public key. This is safe because:
owner_bytes - The 32-byte ed25519 public key that will own the new contractThe address of the newly deployed contract account (C...)
fn create(
env: soroban_sdk::Env,
owner_bytes: soroban_sdk::BytesN<32>,
) -> soroban_sdk::Address
Get the WASM hash used by this factory.
fn wasm_hash(env: soroban_sdk::Env) -> soroban_sdk::BytesN<32>
Compute the deterministic contract address for a signer without deploying. Useful for checking if a contract already exists or for UI display.
signer_bytes - The 32-byte ed25519 public keyThe contract address that would be created for this signer
fn get_address(
env: soroban_sdk::Env,
signer_bytes: soroban_sdk::BytesN<32>,
) -> soroban_sdk::Address