Contract 8a3d3044c254070cbd3e5e21a0c207184a86b6c96c0457d1b0f124aa204bbfc9

← Back to Index 📥 Download WASM

Meta

cliver 25.0.0#a64925e9391c3d3b3ef8e53dc60c23db9e6a82e4
rssdkver 22.0.8#f46e9e0610213bbb72285566f9dd960ff96d03d8
rsver 1.93.0

Instances

  • CBC7ZGZ5PVIUD2L4DNU3AWNGB3CJTHSLY5HVA56UFQV7JS564N4FLROQ

Interface

fn pause(env: soroban_sdk::Env, caller: soroban_sdk::Address)
fn paused(env: soroban_sdk::Env) -> bool
fn unpause(env: soroban_sdk::Env, caller: soroban_sdk::Address)

Upgrade the contract to a new WASM hash Only owner can upgrade the contract @param new_wasm_hash - The hash of the new WASM binary

fn upgrade(
    env: soroban_sdk::Env,
    new_wasm_hash: soroban_sdk::BytesN<32>,
    caller: soroban_sdk::Address,
)
fn has_role(
    env: soroban_sdk::Env,
    account: soroban_sdk::Address,
    role: soroban_sdk::Symbol,
) -> Option

Check if an address is an admin (has ADMIN_ROLE or OWNER_ROLE)

fn is_admin(env: soroban_sdk::Env, account: soroban_sdk::Address) -> bool
fn get_admin(env: soroban_sdk::Env) -> Option

Get the owner address @return Option<Address> - Some(address) if owner exists, None if no owner is set

fn get_owner(env: soroban_sdk::Env) -> Option
fn extend_ttl(
    env: soroban_sdk::Env,
    threshold: u32,
    extend_to: u32,
    keys: soroban_sdk::Vec,
)
fn grant_role(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    account: soroban_sdk::Address,
    role: soroban_sdk::Symbol,
)

Grant admin role to an address @param admin - The address to grant admin role

fn grant_admin(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    caller: soroban_sdk::Address,
)
fn revoke_role(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    account: soroban_sdk::Address,
    role: soroban_sdk::Symbol,
)

Revoke admin role from an address @param admin - The address to revoke admin role

fn revoke_admin(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    caller: soroban_sdk::Address,
)
fn renounce_role(
    env: soroban_sdk::Env,
    account: soroban_sdk::Address,
    role: soroban_sdk::Symbol,
)

Initialize the contract with owner and system wallet @param owner - The owner address (can upgrade, manage admins) @param system_wallet - The system wallet address (can mint/release) @param current_chain_id - The current chain identifier (CAIP-2 format)

fn __constructor(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    system_wallet: soroban_sdk::Address,
    current_chain_id: soroban_sdk::String,
)
fn get_role_admin(
    env: soroban_sdk::Env,
    role: soroban_sdk::Symbol,
) -> Option
fn renounce_admin(env: soroban_sdk::Env)
fn set_role_admin(
    env: soroban_sdk::Env,
    role: soroban_sdk::Symbol,
    admin_role: soroban_sdk::Symbol,
)
fn get_role_member(
    env: soroban_sdk::Env,
    role: soroban_sdk::Symbol,
    index: u32,
) -> soroban_sdk::Address

Set admin for a token contract Only owner can set token admin to prevent unauthorized takeover @param admin_token - The token contract address @param new_admin - The new admin address for the token @param caller - The caller address (must be owner)

fn set_admin_token(
    env: soroban_sdk::Env,
    admin_token: soroban_sdk::Address,
    new_admin: soroban_sdk::Address,
    caller: soroban_sdk::Address,
)

Accept ownership transfer @param caller - The caller address (must be proposed owner) @notice This is a two-step ownership transfer to prevent accidental transfers @notice First, the new owner must be proposed by the current owner @notice Then, the new owner must accept the transfer by calling this function @notice This function can only be called by the proposed owner

fn accept_ownership(env: soroban_sdk::Env, caller: soroban_sdk::Address)

Check if an address is a system wallet @param account - The address to check @return true if the address has SYSTEM_WALLET_ROLE

fn is_system_wallet(env: soroban_sdk::Env, account: soroban_sdk::Address) -> bool

Add a system wallet address (supports multiple system wallets) @param new_system_wallet - The system wallet address to add Only owner or admin can add system wallets

fn add_system_wallet(
    env: soroban_sdk::Env,
    new_system_wallet: soroban_sdk::Address,
    caller: soroban_sdk::Address,
)

Propose a new owner address @param new_owner - The new owner address

fn propose_new_owner(
    env: soroban_sdk::Env,
    new_owner: soroban_sdk::Address,
    caller: soroban_sdk::Address,
)

Get the locked balance for a token

fn get_locked_balance(env: soroban_sdk::Env, token: soroban_sdk::Address) -> i128

Get all system wallet addresses @return Result<Vec<Address>, TokenBridgeError> - Ok(wallets) if system wallets exist, Err if none configured

fn get_system_wallets(
    env: soroban_sdk::Env,
) -> Result, TokenBridgeError>
fn extend_ttl_instance(env: soroban_sdk::Env, threshold: u32, extend_to: u32)

Check if a transaction ID has been used

fn is_transaction_used(env: soroban_sdk::Env, transaction_id: i128) -> bool
fn transfer_admin_role(
    env: soroban_sdk::Env,
    new_admin: soroban_sdk::Address,
    delay: u32,
)

Get the current chain ID

fn get_current_chain_id(env: soroban_sdk::Env) -> soroban_sdk::String

Remove a system wallet address @param system_wallet - The system wallet address to remove Only owner or admin can remove system wallets

fn remove_system_wallet(
    env: soroban_sdk::Env,
    system_wallet: soroban_sdk::Address,
    caller: soroban_sdk::Address,
)

Set the current chain ID @param new_chain_id - The new chain ID @param caller - The caller address (must be owner)

fn set_current_chain_id(
    env: soroban_sdk::Env,
    new_chain_id: soroban_sdk::String,
    caller: soroban_sdk::Address,
)
fn accept_admin_transfer(env: soroban_sdk::Env)
fn get_role_member_count(env: soroban_sdk::Env, role: soroban_sdk::Symbol) -> u32

Get the count of system wallets @return Number of addresses with SYSTEM_WALLET_ROLE

fn get_system_wallet_count(env: soroban_sdk::Env) -> u32

Execute a bridge operation @param operation - The bridge operation type (Lock=0, Burn=1, Release=2, Mint=3) @param token_info - Token and amount information @param route - Network and address routing information @param metadata - Transaction metadata (ID and email) @param caller - The caller address

fn execute_bridge_operation(
    env: soroban_sdk::Env,
    operation: u32,
    bridge_data: TokenBridgeData,
    caller: soroban_sdk::Address,
)

Imports

WebAssembly Text (WAT) ▶