Contract 47fdce86e8fb24ac4cade3b7b20af6102a33dd880059ef133c5850bb503a162f

← Back to Index 📥 Download WASM

Meta

cliver 25.1.0#a048a57a75762458b487052e0021ea704a926bee
rssdkver 25.1.1#94c2a3b3a5ded6b9cf9cef0c207bf8804f3eb294
rsver 1.90.0

Instances

  • CAFXXYGCJH6SUVJJMZW3IEFCUPUCXQUJYM5V3W5UL3E67KF2QSC64XBN
  • CAY3YZIDMZKX3KKIC5CNP6EA4QA5OKXJPNAAYEUSGKXJRHFZXJYHEIQR
  • CDMKFNMJC3MW4Q5GCKKPHZLXH2GGDUBWPAA4AOBQATP4X7CI3T2CQ5S2

Interface

Adds or removes an executor based on the active flag.

fn set_executor(env: soroban_sdk::Env, executor: soroban_sdk::BytesN<32>, active: bool)

Sets whether an executor is required for transactions.

fn set_executor_required(env: soroban_sdk::Env, required: bool)

Returns the list of all registered executors.

fn get_executors(env: soroban_sdk::Env) -> soroban_sdk::Vec>

Checks whether a given address is a registered executor.

fn is_executor(env: soroban_sdk::Env, executor: soroban_sdk::BytesN<32>) -> bool

Returns the total number of registered executors.

fn total_executors(env: soroban_sdk::Env) -> u32

Returns whether an executor signature is required.

fn executor_required(env: soroban_sdk::Env) -> bool
fn __check_auth(
    env: soroban_sdk::Env,
    signature_payload: soroban_sdk::BytesN<32>,
    auth_data: TransactionAuthData,
    auth_contexts: soroban_sdk::Vec,
) -> Result<(), soroban_sdk::Error>

Updates the seed used for EIP-712 digest construction and emits an event.

fn set_seed(env: soroban_sdk::Env, seed: soroban_sdk::BytesN<32>)

Dispatches external contract calls. All security verification happens in __check_auth. Each call's sub_invocations are pre-authorized via authorize_as_current_contract immediately before invoking, enabling deeper sub-invocations (e.g. token transfers).

fn execute_transaction(env: soroban_sdk::Env, calls: soroban_sdk::Vec)

Verifies a merkle root by checking expiry and validating EIP-712 signatures.

fn verify_merkle_root(
    env: soroban_sdk::Env,
    merkle_root: soroban_sdk::BytesN<32>,
    expiry: u64,
    signatures: soroban_sdk::Vec>,
)

Verifies a transaction's merkle proof against the given root using the current nonce.

fn verify_transaction_proof(
    env: soroban_sdk::Env,
    merkle_root: soroban_sdk::BytesN<32>,
    transaction: Transaction,
)

Encodes a leaf node by serializing version, onesig ID, contract address, nonce, and call, then double-hashing with keccak256.

fn encode_leaf(
    env: soroban_sdk::Env,
    nonce: u64,
    call: Call,
) -> soroban_sdk::BytesN<32>

Checks if the sender is authorized to execute a transaction (executor or signer when required).

fn can_execute_transaction(env: soroban_sdk::Env, sender: SenderKey) -> bool

Returns the unique identifier for this OneSig deployment.

fn onesig_id(env: soroban_sdk::Env) -> u64

Returns the current transaction nonce.

fn nonce(env: soroban_sdk::Env) -> u64

Returns the current seed used for EIP-712 digest construction.

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

Returns the contract version string.

fn version(env: soroban_sdk::Env) -> soroban_sdk::String

Returns the leaf encoding version used for merkle proof construction.

fn leaf_encoding_version(env: soroban_sdk::Env) -> u32

Constructor to initialize the OneSig contract with initial state

Arguments

  • onesig_id - Unique identifier for this OneSig deployment
  • seed - Initial seed value for merkle root verification
  • signers - Array of initial signer addresses (32 bytes each, Ethereum addresses padded)
  • threshold - Number of signatures required for transaction execution
  • executors - Array of initial executor public keys (BytesN<32>)
  • executor_required - Whether executor permission is required for transaction execution
fn __constructor(
    env: soroban_sdk::Env,
    onesig_id: u64,
    seed: soroban_sdk::BytesN<32>,
    signers: soroban_sdk::Vec>,
    threshold: u32,
    executors: soroban_sdk::Vec>,
    executor_required: bool,
)
fn authorizer(env: soroban_sdk::Env) -> Option

Adds or removes a signer from the multisig. Requires owner authorization.

fn set_signer(env: soroban_sdk::Env, signer: soroban_sdk::BytesN<20>, active: bool)

Sets the signature threshold (quorum). Requires owner authorization.

fn set_threshold(env: soroban_sdk::Env, threshold: u32)

Returns all registered signers.

fn get_signers(env: soroban_sdk::Env) -> soroban_sdk::Vec>

Returns the total number of registered signers.

fn total_signers(env: soroban_sdk::Env) -> u32

Checks if an address is a registered signer.

fn is_signer(env: soroban_sdk::Env, signer: soroban_sdk::BytesN<20>) -> bool

Returns the current signature threshold (quorum).

fn threshold(env: soroban_sdk::Env) -> u32

Verifies signatures against the configured threshold.

fn verify_signatures(
    env: soroban_sdk::Env,
    digest: soroban_sdk::BytesN<32>,
    signatures: soroban_sdk::Vec>,
)

Verifies signatures against a custom threshold.

fn verify_n_signatures(
    env: soroban_sdk::Env,
    digest: soroban_sdk::BytesN<32>,
    signatures: soroban_sdk::Vec>,
    threshold: u32,
)

Extends the instance TTL.

Arguments

  • threshold - The threshold to extend the TTL (if current TTL is below this, extend).
  • extend_to - The TTL to extend to.
fn extend_instance_ttl(env: soroban_sdk::Env, threshold: u32, extend_to: u32)

Sets TTL configs for instance and persistent storage.

  • None values remove the corresponding config (disables auto-extension for that type)
  • Validates that threshold <= extend_to <= MAX_TTL

Arguments

  • instance - TTL config for instance storage
  • persistent - TTL config for persistent storage

Panics

  • TtlConfigFrozen if configs are frozen
  • InvalidTtlConfig if validation fails
fn set_ttl_configs(
    env: soroban_sdk::Env,
    instance: Option,
    persistent: Option,
)

Returns the current TTL configs as (instance_config, persistent_config).

fn ttl_configs(env: soroban_sdk::Env) -> (Option, Option)

Permanently freezes TTL configs, preventing any future modifications.

This is irreversible and provides immutability guarantees to users. Emits TtlConfigsFrozen event.

Panics

  • TtlConfigAlreadyFrozen if already frozen
fn freeze_ttl_configs(env: soroban_sdk::Env)

Returns whether TTL configs are frozen.

fn is_ttl_configs_frozen(env: soroban_sdk::Env) -> bool

Imports

WebAssembly Text (WAT) ▶