Contract f0a485779f0112659461678dd2d0e4ffeb4120d2e0afa9dc70c44b1be2d772cf

← Back to Index 📥 Download WASM

Meta

cliver 23.2.1#
rssdkver 22.0.8#f46e9e0610213bbb72285566f9dd960ff96d03d8
rsver 1.90.0

Instances

  • CAKKKEIMC2Q5DP3IJHQZAZATYUT7EPIOMNHXF2BHU7AULTN62SVCPUSQ

Interface

Initialize the factory with the simple_account WASM hash. This hash is used to deploy new account instances.

fn __constructor(env: soroban_sdk::Env, wasm_hash: soroban_sdk::BytesN<32>)

Create a new simple_account contract for the given owner public key.

No authorization required - anyone can deploy a contract for any public key. This is safe because:

  1. The contract address is deterministic (factory + salt)
  2. Only the private key holder can use the deployed contract
  3. Enables gasless onboarding (someone else can pay for deployment)

Arguments

  • owner_bytes - The 32-byte ed25519 public key that will own the new contract

Returns

The address of the newly deployed contract account (C...)

Panics

  • If a contract already exists for this owner (same salt)
fn create(
    env: soroban_sdk::Env,
    owner_bytes: soroban_sdk::BytesN<32>,
) -> soroban_sdk::Address

Get the WASM hash used by this factory.

fn wasm_hash(env: soroban_sdk::Env) -> soroban_sdk::BytesN<32>

Compute the deterministic contract address for a signer without deploying. Useful for checking if a contract already exists or for UI display.

Arguments

  • signer_bytes - The 32-byte ed25519 public key

Returns

The contract address that would be created for this signer

fn get_address(
    env: soroban_sdk::Env,
    signer_bytes: soroban_sdk::BytesN<32>,
) -> soroban_sdk::Address

Imports

WebAssembly Text (WAT) ▶