Contract 9ce30ea1fe5c2dc5c9c49cf3462adb32e2c11d7dfadb15ef43a51ba56568de2b

← Back to Index 📥 Download WASM

Meta

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

Instances

  • CA7IBD266HIHFDUIBZLPIAITJUA3DVY4JAG6K3QMGBKLZCXXLP5E2F7A

Interface

Enforce the spending limit policy.

Validates that the transaction amount does not exceed the remaining spending limit, records the transaction amount and updates the spending history.

fn enforce(
    env: soroban_sdk::Env,
    context: Context,
    authenticated_signers: soroban_sdk::Vec,
    context_rule: ContextRule,
    smart_account: soroban_sdk::Address,
)

Install the spending limit policy for a smart account.

Stores the spending limit configuration for the given context rule.

fn install(
    env: soroban_sdk::Env,
    install_params: SpendingLimitAccountParams,
    context_rule: ContextRule,
    smart_account: soroban_sdk::Address,
)

Uninstall the spending limit policy for a smart account.

Removes the spending limit configuration and history for the given context rule.

fn uninstall(
    env: soroban_sdk::Env,
    context_rule: ContextRule,
    smart_account: soroban_sdk::Address,
)

Set a new spending limit for a smart account

fn set_spending_limit(
    env: soroban_sdk::Env,
    spending_limit: i128,
    context_rule: ContextRule,
    smart_account: soroban_sdk::Address,
)

Get the current spending limit data for a smart account

fn get_spending_limit_data(
    env: soroban_sdk::Env,
    context_rule_id: u32,
    smart_account: soroban_sdk::Address,
) -> SpendingLimitData

Imports

WebAssembly Text (WAT) ▶