Contract f098608ca253699421e098cd0931371c9284e6eface55995bb194569e1b9e73c

← Back to Index 📥 Download WASM

Meta

rssdkver 23.2.1#ab415a33cc1f6bdce20ac4a12f0ddbe41a648949
rsver 1.91.1

Instances

  • CALU4GKY7XXXFAI3YI3KW7D3BKDXO3IBKBXY5R7FUR2P5XCGNTVQLW7V
  • CB2BZ5T2BF6PKRDI5MTBX7KCLZKCXN4BGIPYJXRPMXKDS3J7POL5IE2K

Interface

Deploys a new SmartWallet for the given EVM address.

The wallet will be deployed at a deterministic address based on the EVM address. If a wallet already exists at that address, this will fail.

Arguments

  • owner_evm_address - The 20-byte Ethereum address that will own the wallet

Returns

The address of the deployed SmartWallet

fn deploy(
    env: soroban_sdk::Env,
    owner_evm_address: soroban_sdk::BytesN<20>,
) -> soroban_sdk::Address

Returns the configured policy address.

Panics

Panics with FactoryError::PolicyNotSet if policy is not configured.

fn get_policy(env: soroban_sdk::Env) -> soroban_sdk::Address

Returns the configured verifier address.

Panics

Panics with FactoryError::VerifierNotSet if verifier is not configured.

fn get_verifier(env: soroban_sdk::Env) -> soroban_sdk::Address

Initializes the factory with the necessary configuration.

Arguments

  • wallet_wasm_hash - The WASM hash of the SmartWallet contract
  • secp256k1_verifier - Address of the deployed Secp256k1Verifier
  • defindex_policy - Address of the deployed DeFindexPolicy
  • default_wasm_hashes - Default allowed WASM hashes for new wallets
fn __constructor(
    env: soroban_sdk::Env,
    wallet_wasm_hash: soroban_sdk::BytesN<32>,
    secp256k1_verifier: soroban_sdk::Address,
    defindex_policy: soroban_sdk::Address,
    default_wasm_hashes: soroban_sdk::Vec>,
)

Calculates the deterministic address for a wallet based on EVM address.

This can be called before deployment to know where the wallet will be. Useful for pre-funding the wallet address before deployment.

Arguments

  • owner_evm_address - The 20-byte Ethereum address

Returns

The Stellar address where the wallet will be deployed

fn calculate_address(
    env: soroban_sdk::Env,
    owner_evm_address: soroban_sdk::BytesN<20>,
) -> soroban_sdk::Address

Deploys a wallet with custom configuration.

Allows specifying custom verifier, policy, and WASM hashes instead of using the factory defaults.

Arguments

  • owner_evm_address - The 20-byte Ethereum address
  • secp256k1_verifier - Custom verifier address
  • defindex_policy - Custom policy address
  • wasm_hashes - Custom allowed WASM hashes
fn deploy_with_config(
    env: soroban_sdk::Env,
    owner_evm_address: soroban_sdk::BytesN<20>,
    secp256k1_verifier: soroban_sdk::Address,
    defindex_policy: soroban_sdk::Address,
    wasm_hashes: soroban_sdk::Vec>,
) -> soroban_sdk::Address

Returns the configured wallet WASM hash.

Panics

Panics with FactoryError::NotInitialized if factory is not initialized.

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

Returns the default WASM hashes

fn get_default_wasm_hashes(
    env: soroban_sdk::Env,
) -> soroban_sdk::Vec>

Imports

WebAssembly Text (WAT) ▶