Contract 5886ea011f2ff7d928ce3cc8950457369e7666701d27a654eace29d084dd8a2d

← Back to Index 📥 Download WASM

Meta

rssdkver 23.0.2#a97daf8b07cdf24e9bd45e344db51a21b9ea77d3
rsver 1.89.0

Instances

  • CD4DA2Z7GNXUSE62YH5SDZIDEHHB225R66LWCH6QJVMXEZ322QCFJTOZ

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>

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) ▶