Contract 23584ce7c6c7cfc116d106d5127d55eceb170d9e878879de1e2dff0356b8fbc2

← Back to Index 📥 Download WASM

Meta

cliver 25.1.0#a048a57a75762458b487052e0021ea704a926bee
rssdkver 23.0.2#a97daf8b07cdf24e9bd45e344db51a21b9ea77d3
rsver 1.89.0

Instances

  • CBWE3RCNVIXXKMJSAGYLUTPJ2FA4LEJH7SAS4OC7MQUXX6ATSWO3SJNI

Interface

Initialize the contract with owner and token addresses

fn init(
    env: soroban_sdk::Env,
    owner_pubkey: soroban_sdk::Address,
    native_asset: soroban_sdk::Address,
    usdc_asset: soroban_sdk::Address,
    eurc_asset: soroban_sdk::Address,
) -> Result<(), ContractError>

Purchase a nanosubscription using the provided route quote

fn buy(
    env: soroban_sdk::Env,
    route_quote: soroban_sdk::Bytes,
    route_quote_signature: soroban_sdk::BytesN<64>,
    requested_start_time: i64,
    buyer: soroban_sdk::Address,
) -> Result<(), ContractError>

Withdraw accumulated fees to a specified recipient

fn withdraw_fees(
    env: soroban_sdk::Env,
    recipient: soroban_sdk::Address,
    amount: i128,
    currency: u32,
) -> Result<(), ContractError>

Update the fee percentage (in basis points)

fn update_fee_percentage(
    env: soroban_sdk::Env,
    new_fee_bps: u32,
) -> Result<(), ContractError>

Upgrade the contract's WASM to a new hash. Only callable by the owner, and only while updates are still enabled.

fn update_contract(
    env: soroban_sdk::Env,
    new_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), ContractError>

Permanently disable any further contract WASM upgrades. Only callable by the owner. This action is irreversible.

fn disable_updates(env: soroban_sdk::Env) -> Result<(), ContractError>

Whether contract WASM upgrades are still permitted (view function).

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

Get current configuration (view function)

fn get_config(
    env: soroban_sdk::Env,
) -> (
    soroban_sdk::Address,
    soroban_sdk::Address,
    soroban_sdk::Address,
    soroban_sdk::Address,
    u32,
)

Imports

WebAssembly Text (WAT) ▶