Contract fe8291020e7e519e36399f9e6c30bf37c4af3dbc8a62b24a92b449b6191dcb44

← Back to Index 📥 Download WASM

Meta

rssdkver 27.0.2#45d378a6cb4a026d23fc7286b6ee3add9c9dd0b9
rsver 1.97.1

Instances

  • CDESHUSFW5J4O5RZOVO5JHIMV3I3BSRJKBPASLAKS6GC2XJ2VG4SWD6C

Interface

Pull native XLM from the payer through the configured native XLM SAC.

fn pay(env: soroban_sdk::Env, invoice_id: u64) -> Result<(), soroban_sdk::Error>
fn admin(env: soroban_sdk::Env) -> Result
fn cancel(env: soroban_sdk::Env, invoice_id: u64) -> Result<(), soroban_sdk::Error>

A payer may recover a paid invoice before it is settled to the school.

fn refund(env: soroban_sdk::Env, invoice_id: u64) -> Result<(), soroban_sdk::Error>

native_xlm_sac is the official native-XLM SAC address for the target network.

fn initialize(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    native_xlm_sac: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>
fn get_invoice(
    env: soroban_sdk::Env,
    invoice_id: u64,
) -> Result

The admin confirms the external school/anchor settlement and releases the held XLM to the school in the same invocation.

fn mark_settled(
    env: soroban_sdk::Env,
    invoice_id: u64,
) -> Result<(), soroban_sdk::Error>

The school creates an invoice for a payer. The contract only accepts native XLM SAC transfers in pay.

fn create_invoice(
    env: soroban_sdk::Env,
    invoice_id: u64,
    payer: soroban_sdk::Address,
    school: soroban_sdk::Address,
    amount: i128,
    due_ledger: u32,
) -> Result<(), soroban_sdk::Error>
fn native_xlm_sac(
    env: soroban_sdk::Env,
) -> Result

Imports

WebAssembly Text (WAT) ▶