fn bump_ttl(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
) -> Result<(), FactoryError>
fn get_vault(
env: soroban_sdk::Env,
request_id: u64,
) -> Result
fn has_vault(env: soroban_sdk::Env, request_id: u64) -> bool
fn set_admin(
env: soroban_sdk::Env,
current_admin: soroban_sdk::Address,
new_admin: soroban_sdk::Address,
) -> Result<(), FactoryError>
Wire the cross-contract references and vault WASM hash. One-shot; callable only by the admin bound at construction.
fn initialize(
env: soroban_sdk::Env,
vault_wasm_hash: soroban_sdk::BytesN<32>,
settlement_engine: soroban_sdk::Address,
offer_book: soroban_sdk::Address,
) -> Result<(), ProtocolError>
fn deploy_vault(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
request_id: u64,
asset_token: soroban_sdk::Address,
max_capacity: i128,
min_capacity: i128,
deposit_deadline: u64,
share_name: soroban_sdk::String,
share_symbol: soroban_sdk::String,
borrower: soroban_sdk::Address,
) -> Result
Bind the admin to the deploying identity atomically with deployment (HAL-01).
Runs in the same operation as deploy, eliminating the deploy→configure window
an attacker could otherwise front-run.
fn __constructor(env: soroban_sdk::Env, admin: soroban_sdk::Address)
Cancel a pending upgrade proposal.
fn cancel_upgrade(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
) -> Result<(), ProtocolError>
Execute a previously proposed upgrade once the timelock has elapsed.
fn execute_upgrade(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
) -> Result<(), ProtocolError>
fn get_vault_count(env: soroban_sdk::Env) -> u64
Stage an upgrade to be executed after the timelock period (48 h).
fn propose_upgrade(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
new_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), ProtocolError>
fn get_vault_wasm_hash(env: soroban_sdk::Env) -> soroban_sdk::BytesN<32>
Cancel a pending vault WASM hash proposal before it is executed.
fn cancel_vault_wasm_hash(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
) -> Result<(), FactoryError>
Execute a previously proposed vault WASM hash once the timelock has elapsed.
fn execute_vault_wasm_hash(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
) -> Result<(), FactoryError>
HAL-10: stage a new vault WASM hash behind the same 48h timelock the factory applies
to its own code upgrades. The stored hash is the template every future deploy_vault
stamps out for funds-custodying vaults, so an instant overwrite would let a
compromised admin silently swap in backdoored vault code with zero notice — defeating
the notice-and-cancel guarantee. Two-phase (propose -> wait -> execute) plus a
cancel, all of which emit events, restores that guarantee.
fn propose_vault_wasm_hash(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
new_hash: soroban_sdk::BytesN<32>,
) -> Result<(), FactoryError>