Contract 238c71bef9d26a5e0d3ab46a89ce820ea7a17e3bbcc0669027476c4b79fd4164

← Back to Index 📥 Download WASM

Meta

rssdkver 25.3.1#e50d95af029c83196dd122f0154bac3f1302394b
rsver 1.91.0

Interface

Add a voter to the governance voter set.

Auth:

  • Admin only.

Effects:

  • Grants the address voting rights for future proposals.
  • Emits a voter-added event.
fn add_voter(env: soroban_sdk::Env, voter: soroban_sdk::Address)

Cast a vote for the currently active proposal.

Auth:

  • The provided voter address must authorize the call.

Effects:

  • Records the voter’s approval for the supplied proposal hash.
fn cast_vote(
    env: soroban_sdk::Env,
    voter: soroban_sdk::Address,
    wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), UpgradeError>

Return the current admin address.

Notes:

  • Read-only helper for configuration inspection.
fn get_admin(env: soroban_sdk::Env) -> Option

Return the configured registry contract address.

Notes:

  • Read-only helper for dependency inspection.
fn get_registry(env: soroban_sdk::Env) -> Option

Remove a voter from the governance voter set.

Auth:

  • Admin only.
fn remove_voter(env: soroban_sdk::Env, voter: soroban_sdk::Address)

Update the factory admin address.

Auth:

  • Current admin authorization required.

Effects:

  • Replaces the account that controls privileged factory actions.
  • Emits an admin update event.
fn update_admin(env: soroban_sdk::Env, new_admin: soroban_sdk::Address)

Initialize the factory and its core dependencies.

Auth:

  • Intended to run once during contract setup.

Effects:

  • Stores admin and dependency contract addresses.
  • Stores the initial approved wallet wasm hash.
  • Adds the initial admin as a governance voter.

Notes:

  • Re-initialization is blocked once admin state exists.
  • New wallets deployed after this point inherit the configured dependencies.
fn __constructor(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    registry: soroban_sdk::Address,
    social_router: soroban_sdk::Address,
    fee_manager: soroban_sdk::Address,
    wasm: soroban_sdk::BytesN<32>,
) -> Result<(), UpgradeError>

Execute a passed upgrade proposal.

Auth:

  • Admin authorization required to trigger execution.

Effects:

  • Applies the approved governance outcome.
  • Returns the wasm hash that was applied or activated.
fn apply_upgrade(
    env: soroban_sdk::Env,
) -> Result, UpgradeError>

Deploy and initialize a new wallet instance.

Effects:

  • Creates a new wallet using the currently approved wallet version.
  • Passes wallet auth material into the deployment flow.
  • Emits a wallet creation event after successful deployment.
fn create_wallet(
    env: soroban_sdk::Env,
    passkey: soroban_sdk::BytesN<77>,
    bls_keys: soroban_sdk::Vec>,
) -> Result

Cancel the currently active proposal.

Auth:

  • Admin only.

Effects:

  • Clears the active proposal state before execution.
fn cancel_proposal(env: soroban_sdk::Env) -> Result<(), UpgradeError>

Return the configured fee manager contract address.

Notes:

  • Read-only helper for dependency inspection.
fn get_fee_manager(env: soroban_sdk::Env) -> Option

Create a new upgrade proposal.

Auth:

  • Admin only.

Effects:

  • Starts a new proposal for upgrade governance.
  • Stores the proposed target hash for voting/execution flow.
fn propose_upgrade(
    env: soroban_sdk::Env,
    proposal_type: soroban_sdk::String,
    new_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), UpgradeError>

Update the registry dependency used by the factory.

Auth:

  • Admin only.

Effects:

  • Replaces the registry address used for future wallet deployments.
  • Emits a registry update event.
fn update_registry(env: soroban_sdk::Env, registry: soroban_sdk::Address)

Return the currently approved wallet version hash.

Notes:

  • Read-only helper used to inspect deployment version state.
fn get_wallet_version(env: soroban_sdk::Env) -> Option>

Update the fee manager dependency used by the factory.

Auth:

  • Admin only.

Effects:

  • Replaces the fee manager address used for future wallet deployments.
  • Emits a fee manager update event.
fn update_fee_manager(env: soroban_sdk::Env, fee_manager: soroban_sdk::Address)

Imports

WebAssembly Text (WAT) ▶