Contract c6114e96c26734bb1b31ffbbc4d6412e776eb17a74492fce83a3d677aa223ae9

← Back to Index 📥 Download WASM

Meta

rssdkver 25.1.1#94c2a3b3a5ded6b9cf9cef0c207bf8804f3eb294
rsver 1.92.0

Instances

  • CANIA6URZJVOYMNN3HDORDC2KKPXT2EXRKTQFPI3K6RCISB2PDML3MIG

Interface

Pauses the contract.

Arguments

  • env - Contract environment.

Authorization

Requires authorization from the configured pauser.

fn pause(env: soroban_sdk::Env)

Returns true when the contract is paused.

Arguments

  • env - Contract environment.

Authorization

No authorization required.

Returns

true if paused, otherwise false.

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

Unpauses the contract.

Arguments

  • env - Contract environment.

Authorization

Requires authorization from the configured pauser.

fn unpause(env: soroban_sdk::Env)

Initializes contract roles and issuer deployment configuration.

Arguments

  • env - Contract environment.
  • owner - Address authorized for owner-only operations.
  • pauser - Address authorized to pause and unpause the contract.
  • issuer_wasm_hash - Wasm hash used when deploying issuer contracts.

Authorization

No runtime authorization check. This entrypoint is only callable at contract initialization.

fn __constructor(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    pauser: soroban_sdk::Address,
    issuer_wasm_hash: soroban_sdk::BytesN<32>,
)

Deploys an issuer contract for issuer_id and configures its initial manager and destination.

Arguments

  • env - Contract environment.
  • issuer_id - Issuer identifier used for per-issuer state.
  • token - Token address associated with this issuer deployment.
  • manager - Initial manager for issuer-scoped operations.
  • destination - Initial allowed destination for transfers.

Authorization

Requires owner authorization and a non-paused contract state.

Returns

The deployed issuer contract address.

fn create_issuer(
    env: soroban_sdk::Env,
    issuer_id: soroban_sdk::BytesN<32>,
    token: soroban_sdk::Address,
    manager: soroban_sdk::Address,
    destination: soroban_sdk::Address,
) -> soroban_sdk::Address

Returns velocity limits and spend tracking for user under an issuer/token scope.

Arguments

  • env - Contract environment.
  • issuer_id - Issuer identifier.
  • token - Token address.
  • user - User address.

Authorization

No authorization required.

Returns

Current UserVelocity state for this (issuer_id, token, user) scope.

fn get_user_velocity(
    env: soroban_sdk::Env,
    issuer_id: soroban_sdk::BytesN<32>,
    token: soroban_sdk::Address,
    user: soroban_sdk::Address,
) -> UserVelocity

Returns the issuer contract address for an (issuer_id, token) pair.

Arguments

  • env - Contract environment.
  • issuer_id - Issuer identifier.
  • token - Token address associated with the issuer contract.

Returns

The issuer contract address stored for this (issuer_id, token) pair.

fn get_issuer_address(
    env: soroban_sdk::Env,
    issuer_id: soroban_sdk::BytesN<32>,
    token: soroban_sdk::Address,
) -> soroban_sdk::Address

Sets velocity limits for user under issuer_id and token.

Arguments

  • env - Contract environment.
  • issuer_id - Issuer identifier whose limits are being configured.
  • token - Token address for the velocity configuration scope.
  • user - User address whose velocity is configured.
  • period_duration_seconds - Rolling period length in seconds.
  • period_spend_limit - Maximum spend allowed per period.
  • per_transaction_spend_limit - Maximum spend per transfer.

Authorization

Requires issuer-manager authorization and a non-paused contract state.

fn update_user_velocity(
    env: soroban_sdk::Env,
    issuer_id: soroban_sdk::BytesN<32>,
    token: soroban_sdk::Address,
    user: soroban_sdk::Address,
    period_duration_seconds: u64,
    period_spend_limit: i128,
    per_transaction_spend_limit: i128,
)

Checks whether debitor is authorized for issuer_id.

Arguments

  • env - Contract environment.
  • issuer_id - Issuer identifier.
  • debitor - Debitor address to check.

Authorization

No authorization required.

Returns

true if the debitor is authorized for this issuer, otherwise false.

fn is_authorized_debitor(
    env: soroban_sdk::Env,
    issuer_id: soroban_sdk::BytesN<32>,
    debitor: soroban_sdk::Address,
) -> bool

Checks whether manager is the configured manager for issuer_id.

Arguments

  • env - Contract environment.
  • issuer_id - Issuer identifier.
  • manager - Manager address to check.

Authorization

No authorization required.

Returns

true if manager is currently authorized for this issuer, otherwise false.

fn is_authorized_manager(
    env: soroban_sdk::Env,
    issuer_id: soroban_sdk::BytesN<32>,
    manager: soroban_sdk::Address,
) -> bool

Rotates the manager for issuer_id.

Arguments

  • env - Contract environment.
  • issuer_id - Issuer identifier to update.
  • manager - New manager address for issuer-scoped operations.

Authorization

Requires owner authorization and a non-paused contract state.

fn set_authorized_manager(
    env: soroban_sdk::Env,
    issuer_id: soroban_sdk::BytesN<32>,
    manager: soroban_sdk::Address,
)

Transfers amount from account to destination through the issuer contract.

Arguments

  • env - Contract environment.
  • issuer_id - Issuer identifier whose policy applies to this transfer.
  • token - Token address being transferred.
  • debitor - Authorized debitor that signs this request.
  • account - Debited account used as the token source.
  • amount - Transfer amount.
  • destination - Destination address that must be allowlisted.
  • uuid - Offchain transfer correlation identifier emitted in events.

Authorization

Requires a non-paused contract state and authentication for an authorized debitor.

fn transfer_to_destination(
    env: soroban_sdk::Env,
    issuer_id: soroban_sdk::BytesN<32>,
    token: soroban_sdk::Address,
    debitor: soroban_sdk::Address,
    account: soroban_sdk::Address,
    amount: i128,
    destination: soroban_sdk::Address,
    uuid: soroban_sdk::BytesN<32>,
)

Checks whether destination is allowlisted for issuer_id.

Arguments

  • env - Contract environment.
  • issuer_id - Issuer identifier.
  • destination - Destination address to check.

Authorization

No authorization required.

Returns

true if the destination is authorized for this issuer, otherwise false.

fn is_authorized_destination(
    env: soroban_sdk::Env,
    issuer_id: soroban_sdk::BytesN<32>,
    destination: soroban_sdk::Address,
) -> bool

Updates whether debitor is authorized for issuer_id.

Arguments

  • env - Contract environment.
  • issuer_id - Issuer identifier to update.
  • debitor - Debitor address being modified.
  • authorized - If true, authorize debitor; if false, revoke authorization.

Authorization

Requires issuer-manager authorization and a non-paused contract state.

fn update_authorized_debitor(
    env: soroban_sdk::Env,
    issuer_id: soroban_sdk::BytesN<32>,
    debitor: soroban_sdk::Address,
    authorized: bool,
)

Updates whether destination is allowed for issuer_id.

Arguments

  • env - Contract environment.
  • issuer_id - Issuer identifier to update.
  • destination - Destination address being modified.
  • allowed - If true, add destination to allowlist; if false, remove it.

Authorization

Requires owner authorization and a non-paused contract state.

fn update_issuer_destination(
    env: soroban_sdk::Env,
    issuer_id: soroban_sdk::BytesN<32>,
    destination: soroban_sdk::Address,
    allowed: bool,
)

Imports

WebAssembly Text (WAT) ▶