Pauses the contract.
env - Contract environment.Requires authorization from the configured pauser.
fn pause(env: soroban_sdk::Env)
Returns true when the contract is paused.
env - Contract environment.No authorization required.
true if paused, otherwise false.
fn paused(env: soroban_sdk::Env) -> bool
Unpauses the contract.
env - Contract environment.Requires authorization from the configured pauser.
fn unpause(env: soroban_sdk::Env)
Initializes contract roles and issuer deployment configuration.
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.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.
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.Requires owner authorization and a non-paused contract state.
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.
env - Contract environment.issuer_id - Issuer identifier.token - Token address.user - User address.No authorization required.
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.
env - Contract environment.issuer_id - Issuer identifier.token - Token address associated with the issuer contract.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.
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.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.
env - Contract environment.issuer_id - Issuer identifier.debitor - Debitor address to check.No authorization required.
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.
env - Contract environment.issuer_id - Issuer identifier.manager - Manager address to check.No authorization required.
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.
env - Contract environment.issuer_id - Issuer identifier to update.manager - New manager address for issuer-scoped operations.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.
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.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.
env - Contract environment.issuer_id - Issuer identifier.destination - Destination address to check.No authorization required.
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.
env - Contract environment.issuer_id - Issuer identifier to update.debitor - Debitor address being modified.authorized - If true, authorize debitor; if false, revoke 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.
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.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,
)