One-time setup. Binds the SobreContract wasm hash this factory deploys
fn init(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
sobre_wasm: soroban_sdk::BytesN<32>,
)
Deploy a new SobreContract instance and call its constructor with the caller as admin. Returns the freshly deployed contract address. The factory's own address is supplied as the last constructor arg so the new instance knows where to ask for its current wasm hash on upgrade.
fn create_sobre(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
payment_token: soroban_sdk::Address,
percents: soroban_sdk::Vec,
envelope_names: soroban_sdk::Vec,
wallet_name: soroban_sdk::String,
admin_name: soroban_sdk::String,
admin_emoji: soroban_sdk::String,
) -> soroban_sdk::Address
Admin-only. Swap the SobreContract wasm hash future create_sobre
calls and existing per-instance upgrade() calls will pick up. Same
factory address, same AdminSobres directory, new code for new + opted-in
instances.
fn set_sobre_wasm(env: soroban_sdk::Env, new_wasm: soroban_sdk::BytesN<32>)
View. Lists every Sobre this address has created via this factory.
fn sobres_of_admin(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
) -> soroban_sdk::Vec
View. The wasm hash a fresh create_sobre would deploy right now, and
the hash an existing SobreContract's upgrade() will read.
fn current_sobre_wasm(env: soroban_sdk::Env) -> soroban_sdk::BytesN<32>