Upgrade factory contract WASM — requires admin authorization
fn upgrade(
env: soroban_sdk::Env,
new_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), FactoryError>
Get agent contract address by domain node
fn get_agent(
env: soroban_sdk::Env,
domain_node: soroban_sdk::BytesN<32>,
) -> Option
Update admin address — requires current admin authorization
fn set_admin(
env: soroban_sdk::Env,
new_admin: soroban_sdk::Address,
) -> Result<(), FactoryError>
Initialize the factory with admin and the AgentSmartAccount WASM hash
fn initialize(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
account_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), FactoryError>
Deploy a deterministic AgentSmartAccount for a domain node
fn deploy_agent(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
domain_node: soroban_sdk::BytesN<32>,
master_key: soroban_sdk::BytesN<32>,
session_key: soroban_sdk::BytesN<32>,
policy: SessionPolicy,
) -> Result
Deploy a deterministic AgentSmartAccount and atomically fund gas and/or trading capital
fn deploy_and_fund(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
domain_node: soroban_sdk::BytesN<32>,
master_key: soroban_sdk::BytesN<32>,
session_key: soroban_sdk::BytesN<32>,
policy: SessionPolicy,
gas_token: Option,
gas_amount: i128,
trading_token: Option,
trading_amount: i128,
) -> Result
Get domain node by agent contract address
fn get_domain_node(
env: soroban_sdk::Env,
agent: soroban_sdk::Address,
) -> Option>
Total deployed agents count
fn get_total_deployed(env: soroban_sdk::Env) -> u32
Get active Account WASM hash
fn get_account_wasm_hash(
env: soroban_sdk::Env,
) -> Result, FactoryError>
Predict deterministic agent address for a domain node
fn predict_agent_address(
env: soroban_sdk::Env,
domain_node: soroban_sdk::BytesN<32>,
) -> soroban_sdk::Address
Set Account WASM hash — requires admin authorization
fn set_account_wasm_hash(
env: soroban_sdk::Env,
new_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), FactoryError>