Contract 405a8be1ae35cb0da5fd565ffdaf35cb3ce3064661cb7284b4cadd24603d82df

← Back to Index 📥 Download WASM

Meta

rssdkver 25.3.1#e50d95af029c83196dd122f0154bac3f1302394b
rsver 1.91.0

Interface

fn add_voter(
    env: soroban_sdk::Env,
    voter: soroban_sdk::Address,
) -> Result<(), UpgradeError>

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
fn remove_voter(
    env: soroban_sdk::Env,
    voter: soroban_sdk::Address,
) -> Result<(), UpgradeError>

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,
    rpid: soroban_sdk::String,
    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.

Verifies:

  • passkey proof over the wallet-creation challenge
  • each BLS public key proof over the same challenge
  • nonce freshness through the creation challenge flow

Effects:

  • deploys wallet using the current approved wallet wasm hash
  • stores the nonce as used
  • emits wallet creation event
fn create_wallet(
    env: soroban_sdk::Env,
    passkey: soroban_sdk::BytesN<65>,
    passkey_sig: PasskeySignature,
    bls_keys_pop: soroban_sdk::Vec,
    nonce: soroban_sdk::BytesN<32>,
    network: soroban_sdk::Symbol,
    external_wallet: Option,
) -> 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)

Returns the deterministic wallet-creation proof challenge.

The challenge is derived from the configured RP ID hash, network, and nonce. It is used off-chain by the passkey and BLS signers so all parties sign the same wallet-creation intent.

fn get_pop_challenge(
    env: soroban_sdk::Env,
    nonce: soroban_sdk::BytesN<32>,
    network: soroban_sdk::Symbol,
) -> Result, WalletError>

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)

Return the currently approved wallet version hash.

Notes:

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

Update the social router dependency used by the factory.

Auth:

  • Admin only.

Effects:

  • Replaces the social router address used for future wallet deployments.
  • Emits a social router update event.
fn update_social_router(env: soroban_sdk::Env, social_router: soroban_sdk::Address)

Returns the currently configured protocol dependency contracts.

SECURITY:

  • Serves as the canonical source of approved protocol dependencies.
  • Returns only factory-configured addresses and does not accept caller input.
  • Fails if any required dependency is missing to prevent partial configuration.

Returns:

  • Registry contract address.
  • Fee manager contract address.
  • Social router contract address.
fn get_protocol_dependencies(
    env: soroban_sdk::Env,
) -> Result

Imports

WebAssembly Text (WAT) ▶