Contract 2a96b68b159c932e86b50e6e7b2582ceaf067226f36cc90f2e05e96824b81f68

← Back to Index 📥 Download WASM

Meta

cliver 26.0.0#60f7458e7ecffddf2f2d91dc6d0d2db4fab03ecc
rssdkver 25.3.1#e50d95af029c83196dd122f0154bac3f1302394b
rsver 1.95.0

Instances

  • CBXBBFCFVDGJANUAQUJG7I6YQ5YV7SSUM4QXB4ZCQYZ7VXAM4O3NIAUO

Interface

One-time setup. Binds the SobreContract wasm hash this factory deploys

  • the factory admin (the only address allowed to swap that wasm hash later). For the hackathon the admin is a single key; production should move this to a Stellar multisig or a governance contract.
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>

Imports

WebAssembly Text (WAT) ▶