Contract b9db3e469d5e6cd20b4a10c4174e29de5b63e503f1aeeb9f2f0836270169be33

← Back to Index 📥 Download WASM

Meta

cliver 27.1.0#8e402ea28202950b272fbabc34caad4d2f64fe87
rssdk_spec_shaking 2
rssdkver 26.1.0#175aa41306f383057a8cdfc84b68d931664fc34e
rsver 1.93.1

Instances

  • CA27BDC5WMKWSX5P7LRGKFXPIMBGDVIBUWXIGFGPHBTQXDD3FI5EQRRO
  • CA3PYN2PKNV26GKUOFLURPRG3NX5O3ZTSEXJRB4CQ2SG7TIOIFERHQUM
  • CAADK3MPS7YBXNP6C2E6RO5CZNF6CXWCM5RJU3PR2ICACDZHX6VMMWLI
  • CAJR5GFNM6ZL5HA6GGSCHC3HC3EX7JUPK5JBHMKWY4QMQ3TQ7PTQZ3LW
  • CAKIBY7RY3HX34HGL2II62IQ47RUJ7JZ2GHZIJCCEXGHVG63D5XG6DYI
  • CBNMMBHG2YKNNUDCBDMI6GTS4B5XLB5J6QKFEA56RZK3EAMWABZN57OF
  • CBRC32DHNFKSNLLN3JUATX5B6ZQRLDMWAB6BJQXVY5KJYWAE6QJRRLHB
  • CBVCRAAW3YZW32MIBDTVZWZ3R2FMXYQYBRMO6DRBOQKTEYMAF3DBTZ2R
  • CCZZ6EEETEPTT24X3IQQFCNMWRTWRQXDN46I4F5HRYCMO6BSXURTK3ST
  • CD6YMFDJOS2WKCUK4VI6P7GG3U3VFP63OUES5GMU22XDV2UEM7L4ZHQQ
  • CDA5KFEWIK73T5KVCCIS6ECUBZ33275UTHUPRVARVDG2XLUOOGNKGTMP
  • CDAZY77U7DBDU4EXQPRZB7EYL3BDIAAFMOI2NALHWEPYHYDFRUOCXMB6
  • CDVF64VHJOYEWSQ7ZM34VFBQFDBKQWL6ZTP5SYDDAUYPKE2MEHCD6AA3

Interface

Executes a function call on a target contract from within the smart account context.

Arguments

  • e - Access to the Soroban environment.
  • target - The address of the contract to call.
  • target_fn - The function name to invoke on the target contract.
  • target_args - Arguments to pass to the target function.

Notes

Defaults to requiring authorization from the smart account itself (e.current_contract_address().require_auth()) and then calling e.invoke_contract().

fn execute(
    env: soroban_sdk::Env,
    target: soroban_sdk::Address,
    target_fn: soroban_sdk::Symbol,
    target_args: soroban_sdk::Vec,
)
fn add_policy(
    env: soroban_sdk::Env,
    context_rule_id: u32,
    policy: soroban_sdk::Address,
    install_param: soroban_sdk::Val,
) -> u32

The recovery swap primitive — kept, but only on rule 0. Rule 1's signer set is immutable: the guardian must not brick recovery by adding a co-guardian (N-of-N), and an attacker who won rule 0 must not evict the guardian and make the takeover permanent.

fn add_signer(env: soroban_sdk::Env, context_rule_id: u32, signer: Signer) -> u32
fn __check_auth(
    env: soroban_sdk::Env,
    signature_payload: soroban_sdk::BytesN<32>,
    signatures: AuthPayload,
    auth_contexts: soroban_sdk::Vec,
) -> Result<(), SmartAccountError>

Deploy with the initial signer set (e.g. one External WebAuthn signer: verifier address + 65-byte P-256 public key) and an optional guardian.

  • signers/policies populate context rule 0 (Default, "owner") — a rule without policies requires ALL of its signers (strict N-of-N), so pass exactly the signers that must co-sign every action.
  • guardian, when present, gets its own context rule (CallContract(this wallet), "recovery") so it can authorize signer management for recovery without participating in rule 0. OZ rule matching is address-wide, but __check_auth below restricts what a non-owner rule may authorize to add_signer/remove_signer (CKL F14, narrowed by EAR-W5-2): the guardian cannot spend through rule 1 and cannot touch the rule topology, so guardian-key compromise is a visible, recoverable signer swap, not a silent drain or a permanent fleet-wide seizure.
  • A sweep shell passes the guardian as rule 0's only signer too; there the guardian is the owner and authorizes execute_batch via r
fn __constructor(
    env: soroban_sdk::Env,
    signers: soroban_sdk::Vec,
    policies: soroban_sdk::Map,
    guardian: Option,
)
fn execute_batch(env: soroban_sdk::Env, calls: soroban_sdk::Vec)

Retrieves the global registry ID for a policy.

Arguments

  • e - Access to the Soroban environment.
  • policy - The policy address to look up.

Errors

  • [SmartAccountError::PolicyNotFound] - When the policy is not registered in the global registry.
fn get_policy_id(env: soroban_sdk::Env, policy: soroban_sdk::Address) -> u32

Retrieves the global registry ID for a signer.

Arguments

  • e - Access to the Soroban environment.
  • signer - The signer to look up.

Errors

  • [SmartAccountError::SignerNotFound] - When the signer is not registered in the global registry.
fn get_signer_id(env: soroban_sdk::Env, signer: Signer) -> u32
fn remove_policy(env: soroban_sdk::Env, context_rule_id: u32, policy_id: u32)

See add_signer. Emptying rule 0 is prevented upstream by OZ (NoSignersAndPolicies — a policy-less rule keeps its last signer).

fn remove_signer(env: soroban_sdk::Env, context_rule_id: u32, signer_id: u32)
fn add_context_rule(
    env: soroban_sdk::Env,
    context_type: ContextRuleType,
    name: soroban_sdk::String,
    valid_until: Option,
    signers: soroban_sdk::Vec,
    policies: soroban_sdk::Map,
) -> ContextRule

Retrieves a context rule by its unique ID, returning the ContextRule containing all metadata, signers, and policies.

Arguments

  • e - Access to the Soroban environment.
  • context_rule_id - The unique identifier of the context rule to retrieve.

Errors

  • [SmartAccountError::ContextRuleNotFound] - When no context rule exists with the given ID.
fn get_context_rule(env: soroban_sdk::Env, context_rule_id: u32) -> ContextRule
fn remove_context_rule(env: soroban_sdk::Env, context_rule_id: u32)

Retrieves the number of all context rules, including expired rules. Defaults to 0.

Arguments

  • e - Access to the Soroban environment.
fn get_context_rules_count(env: soroban_sdk::Env) -> u32
fn update_context_rule_name(
    env: soroban_sdk::Env,
    context_rule_id: u32,
    name: soroban_sdk::String,
) -> ContextRule
fn update_context_rule_valid_until(
    env: soroban_sdk::Env,
    context_rule_id: u32,
    valid_until: Option,
) -> ContextRule

Imports

WebAssembly Text (WAT) ▶