Contract c2b484e44bd4f2c303af30dd9607f14faf449ce27c9606b25b1d4cc8af955f22

← Back to Index 📥 Download WASM

Meta

rssdkver 21.7.7#5da789c50b18a4c2be53394138212fed56f0dfc4
rsver 1.97.1

Instances

  • CA3SNI7Z6YYJXJ45JDHZHZLLFBP2MHGGIGYQ56U5H5MF4BRHTORE7L3G

Interface

Called by each of the registered attestors. Once the 2-of-3 threshold is reached, mint_receivable_token is called automatically and status moves to Attested.

fn attest(env: soroban_sdk::Env, attestor: soroban_sdk::Address, receivable_id: u128)
fn get_count(env: soroban_sdk::Env) -> u128

Must be called once after deployment.

fn initialize(env: soroban_sdk::Env, admin: soroban_sdk::Address)

Called by FractionalSale contract when sale closes and exporter is paid.

fn mark_active(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    receivable_id: u128,
)

Called by SettlementEscrow after successful payout.

fn mark_settled(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    receivable_id: u128,
)

Emergency clawback — issuer only.

fn mark_clawback(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    receivable_id: u128,
)
fn get_receivable(env: soroban_sdk::Env, receivable_id: u128) -> Receivable

Exporter submits a purchase order / bill of lading. doc_hash is the SHA-256 of the uploaded document (computed off-chain). ipfs_cid is the IPFS content identifier where the file is pinned. attestors is a Vec of up to 3 addresses (logistics partner, export council, NBFC) who must attest before minting.

fn register_receivable(
    env: soroban_sdk::Env,
    exporter: soroban_sdk::Address,
    buyer_hash: soroban_sdk::BytesN<32>,
    amount_usd_cents: i128,
    currency: soroban_sdk::Symbol,
    maturity_date: u64,
    doc_hash: soroban_sdk::BytesN<32>,
    ipfs_cid: soroban_sdk::Bytes,
    attestors: soroban_sdk::Vec,
) -> u128

Imports

WebAssembly Text (WAT) ▶