Contract 6efaaec6bd80c0ba207bcff03d8ee47008e9e5c46170774ceb38a6b8f084e898

← Back to Index 📥 Download WASM

Meta

cliver 27.0.0#5a7c5fe76530bf4248477ac812fc757146b98cc4
rssdkver 26.1.0#175aa41306f383057a8cdfc84b68d931664fc34e
rsver 1.95.0

Instances

  • CD66SNBE7W4MI3TPCCE7XBDJYCSH6V6NRKNNMY2MZCM3MOQOFARY7MQA

Interface

Replaces the contract wasm in place, preserving contract id and all existing schedules. Without this, an SDK upgrade would strand state at the old contract id.

fn upgrade(
    env: soroban_sdk::Env,
    new_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), soroban_sdk::Error>

Remaining spendable amount in the period covering now.

fn available(
    env: soroban_sdk::Env,
    schedule_id: soroban_sdk::BytesN<32>,
) -> Result
fn get_spend(
    env: soroban_sdk::Env,
    schedule_id: soroban_sdk::BytesN<32>,
) -> Result
fn get_config(env: soroban_sdk::Env) -> Result

Emergency stop. Blocks execute_payment while leaving cancellation and reads available so payers can always exit.

fn set_paused(env: soroban_sdk::Env, paused: bool) -> Result<(), soroban_sdk::Error>
fn accept_admin(env: soroban_sdk::Env) -> Result<(), soroban_sdk::Error>
fn get_schedule(
    env: soroban_sdk::Env,
    schedule_id: soroban_sdk::BytesN<32>,
) -> Result
fn set_operator(
    env: soroban_sdk::Env,
    operator: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>
fn __constructor(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    operator: soroban_sdk::Address,
)

Step one of admin rotation. The new admin must call accept_admin, so a mistyped address can never lock the contract out of admin control.

fn propose_admin(
    env: soroban_sdk::Env,
    new_admin: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>

Callable by the payer at any time, or by the admin for incident response. Cancellation is permanent: the id can never be reused.

fn cancel_schedule(
    env: soroban_sdk::Env,
    schedule_id: soroban_sdk::BytesN<32>,
    caller: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>
fn create_schedule(
    env: soroban_sdk::Env,
    schedule_id: soroban_sdk::BytesN<32>,
    payer: soroban_sdk::Address,
    token: soroban_sdk::Address,
    vendor: soroban_sdk::Address,
    cap: i128,
    period_seconds: u64,
    start_timestamp: u64,
    end_timestamp: u64,
) -> Result<(), soroban_sdk::Error>
fn execute_payment(
    env: soroban_sdk::Env,
    schedule_id: soroban_sdk::BytesN<32>,
    amount: i128,
) -> Result<(), soroban_sdk::Error>

Anyone may pay to keep an idle schedule's entries from being archived.

fn extend_schedule(
    env: soroban_sdk::Env,
    schedule_id: soroban_sdk::BytesN<32>,
) -> Result<(), soroban_sdk::Error>

Imports

WebAssembly Text (WAT) ▶