Contract 32936559de8a87f0977aa4507502faf5f45c50daa88eaeb0bc89ee34a1b08892

← Back to Index 📥 Download WASM

Meta

rssdkver 25.3.1#e50d95af029c83196dd122f0154bac3f1302394b
rsver 1.91.0

Instances

  • CDTF3ITE63445MI4WOYOCZWZCLKCX2GCDDRUMZRQ3AWGKKVMZKO3S6JH

Interface

Add governance voter.

Notes:

  • Admin only.
fn add_voter(
    env: soroban_sdk::Env,
    voter: soroban_sdk::Address,
) -> Result<(), UpgradeError>

Cast vote on active proposal.

Notes:

  • Voter must authorize.
fn cast_vote(
    env: soroban_sdk::Env,
    voter: soroban_sdk::Address,
    wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), UpgradeError>

Get current payment nonce.

Notes:

  • Used for payment id generation.
  • Also tracks created payment sequence.
fn get_nonce(env: soroban_sdk::Env) -> u64

Update admin.

Notes:

  • Admin only.
  • Changes control over privileged router actions.
fn set_admin(env: soroban_sdk::Env, new_admin: soroban_sdk::Address)

Get a stored payment by id.

fn get_payment(
    env: soroban_sdk::Env,
    payment_id: soroban_sdk::BytesN<32>,
) -> Option

Remove governance voter.

Notes:

  • Admin only.
fn remove_voter(
    env: soroban_sdk::Env,
    voter: soroban_sdk::Address,
) -> Result<(), UpgradeError>

Initialize router state.

Notes:

  • Sets admin and registry.
  • Initializes payment nonce.
  • Intended to run once.
fn __constructor(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    registry: soroban_sdk::Address,
) -> Result<(), UpgradeError>

Execute approved upgrade proposal.

Notes:

  • Admin only.
  • Applies the current passed proposal.
fn apply_upgrade(
    env: soroban_sdk::Env,
) -> Result, UpgradeError>

Claim a single pending payment.

Notes:

  • Requires claimer auth.
  • Claim validation is delegated to claim_one.
fn claim_payment(
    env: soroban_sdk::Env,
    claimer: soroban_sdk::Address,
    payment_id: soroban_sdk::BytesN<32>,
) -> Result<(), RegistryError>

Pay to a social identity.

Notes:

  • Requires sender auth.
  • Asset must be supported.
  • Sends directly if registry resolves a wallet.
  • Otherwise stores a pending payment and indexes it by identity and sender.
fn pay_to_social(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    platform: soroban_sdk::String,
    user_id: soroban_sdk::String,
    asset: soroban_sdk::Address,
    amount: i128,
    duration: Option,
) -> Result

Claim multiple pending payments.

Notes:

  • Requires claimer auth.
  • Processes claims sequentially.
  • Entire call fails if any claim fails.
fn claim_payments(
    env: soroban_sdk::Env,
    claimer: soroban_sdk::Address,
    payment_ids: soroban_sdk::Vec>,
) -> Result<(), RegistryError>

Refund a single payment.

Notes:

  • Requires sender auth.
  • Refund eligibility is delegated to refund_one.
fn refund_payment(
    env: soroban_sdk::Env,
    sender: soroban_sdk::Address,
    payment_id: soroban_sdk::BytesN<32>,
) -> Result<(), RegistryError>

Cancel active proposal.

Notes:

  • Admin only.
fn cancel_proposal(env: soroban_sdk::Env) -> Result<(), UpgradeError>

Create upgrade proposal.

Notes:

  • Admin only.
  • Starts governance flow for a new wasm hash.
fn propose_upgrade(
    env: soroban_sdk::Env,
    proposal_type: soroban_sdk::String,
    new_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), UpgradeError>

Refund multiple payments.

Notes:

  • Requires sender auth.
  • Processes refunds sequentially.
  • Entire call fails if any refund fails.
fn refund_payments(
    env: soroban_sdk::Env,
    sender: soroban_sdk::Address,
    payment_ids: soroban_sdk::Vec>,
) -> Result<(), RegistryError>

Add supported asset.

Notes:

  • Admin only.
  • Enables new payments in the asset.
fn add_supported_asset(env: soroban_sdk::Env, asset: soroban_sdk::Address)

Get total currently claimable amount for identity and asset.

Notes:

  • Includes only pending, unexpired payments matching the asset.
  • Excludes expired and already processed payments.
fn get_claimable_total(
    env: soroban_sdk::Env,
    platform: soroban_sdk::String,
    user_id: soroban_sdk::String,
    asset: soroban_sdk::Address,
) -> Result

Get payment ids created by sender.

fn get_sender_payments(
    env: soroban_sdk::Env,
    sender: soroban_sdk::Address,
) -> soroban_sdk::Vec>

Get all supported assets.

fn get_supported_assets(
    env: soroban_sdk::Env,
) -> soroban_sdk::Vec

Get payment ids for (platform, user_id).

fn get_identity_payments(
    env: soroban_sdk::Env,
    platform: soroban_sdk::String,
    user_id: soroban_sdk::String,
) -> Result>, RegistryError>

Remove supported asset.

Notes:

  • Admin only.
  • Blocks new payments in the asset.
fn remove_supported_asset(env: soroban_sdk::Env, asset: soroban_sdk::Address)

Imports

WebAssembly Text (WAT) ▶