Contract 3078e41dcd71a4d67404b7e8bc63a092523209efcc2091abb508b20927f80443

← Back to Index 📥 Download WASM

Meta

cliver 26.0.0#60f7458e7ecffddf2f2d91dc6d0d2db4fab03ecc
rssdkver 25.1.1#94c2a3b3a5ded6b9cf9cef0c207bf8804f3eb294
rsver 1.92.0

Instances

  • CAYEDQP77XRVCJU47XYI23W5JQSHI72Q2SNAO3HVLY7OKB36JQRM2HQ2

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)

Replaces the factory contract's WASM bytecode.

Arguments

  • env - Contract environment.
  • new_wasm_hash - Hash of the uploaded WASM to install.

Authorization

Requires authorization from the current owner. Not gated by pause state.

fn upgrade(env: soroban_sdk::Env, new_wasm_hash: soroban_sdk::BytesN<32>)

Returns the current owner address.

Arguments

  • env - Contract environment.

Authorization

No authorization required.

Returns

The current owner address.

fn get_owner(env: soroban_sdk::Env) -> soroban_sdk::Address

Transfers ownership to a new address.

Arguments

  • env - Contract environment.
  • new_owner - Address to receive ownership.

Authorization

Requires authorization from both the current owner and the new owner. The new-owner co-signature prevents accidental loss of ownership to an unreachable address. Not gated by pause state.

fn set_owner(env: soroban_sdk::Env, new_owner: soroban_sdk::Address)

Returns the current pauser address.

Arguments

  • env - Contract environment.

Authorization

No authorization required.

Returns

The current pauser address.

fn get_pauser(env: soroban_sdk::Env) -> soroban_sdk::Address

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

Upgrades an issuer contract's WASM bytecode.

Arguments

  • env - Contract environment.
  • issuer_id - Issuer identifier.
  • token - Token address associated with the issuer.
  • new_wasm_hash - Hash of the uploaded WASM to install on the issuer.

Authorization

Requires authorization from the current owner. Not gated by pause state.

fn upgrade_issuer(
    env: soroban_sdk::Env,
    issuer_id: soroban_sdk::BytesN<32>,
    token: soroban_sdk::Address,
    new_wasm_hash: soroban_sdk::BytesN<32>,
)

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

Owner-driven pauser rotation. Bypasses the pause guard to recover from a compromised pauser.

Arguments

  • env - Contract environment.
  • new_pauser - Address to receive the pauser role.

Authorization

Requires authorization from the current owner. Not gated by pause state.

fn set_pauser_by_owner(env: soroban_sdk::Env, new_pauser: soroban_sdk::Address)

Transfers the pauser role to a new address via the pauser self-rotation path.

Arguments

  • env - Contract environment.
  • new_pauser - Address to receive the pauser role.

Authorization

Requires authorization from the current pauser and a non-paused contract state.

fn set_pauser_by_pauser(env: soroban_sdk::Env, new_pauser: 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 - Fixed-window 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. Manager rotation is authority-replacing and owner-gated, so it is permitted while paused for incident response (e.g. to rotate out a compromised manager without first unpausing).

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. Revoking a debitor (authorized == false) is permitted while paused for incident response; authorizing a debitor (authorized == true) requires 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. Removing a destination (allowed == false) is permitted while paused for incident response; adding a destination (allowed == true) requires 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) ▶