Contract 283b09bef8e8b2b118311acf724d42613d3416b40846aacf1433051713f95bd2

← Back to Index 📥 Download WASM

Meta

rssdkver 22.0.7#211569aa49c8d896877dfca1f2eb4fe9071121c8
rsver 1.85.0

Instances

  • CCLPGO3O3KZKVTXQU6W7B762DEY7JF4PAXID5DX4CQM66RMON5L43UYW

Interface

Initializes the contract with a public key for signature verification and an owner address

Arguments

  • public_key - The public key used to verify signatures for withdrawals
  • owner - The address of the contract owner who has administrative privileges
fn constructor(
    env: soroban_sdk::Env,
    public_key: soroban_sdk::BytesN<65>,
    owner: soroban_sdk::Address,
)

Changes the contract owner to a new address

Arguments

  • owner - The new owner address
fn set_owner(env: soroban_sdk::Env, owner: soroban_sdk::Address)

Allows the owner to withdraw tokens from the contract

Arguments

  • amount - The amount of tokens to withdraw
  • token - The token address to withdraw from
fn owner_withdraw(env: soroban_sdk::Env, amount: u128, token: soroban_sdk::Address)

Extends the contract instance TTL to prevent expiration

fn increase_instance_ttl(env: soroban_sdk::Env)

Removes a deposit record from storage

Arguments

  • nonce - The nonce of the deposit to clear
fn clear_deposit(env: soroban_sdk::Env, nonce: u128)

Updates the public key used for signature verification

Arguments

  • public_key - The new public key to set
fn set_public_key(env: soroban_sdk::Env, public_key: soroban_sdk::BytesN<65>)

Processes a withdrawal request after verifying the signature

Arguments

  • amount - The amount to withdraw
  • nonce - A unique identifier for this withdrawal
  • token - The token address to withdraw
  • receiver - The address to receive the tokens
  • signature - The signature authorizing this withdrawal
fn withdraw(
    env: soroban_sdk::Env,
    amount: u128,
    nonce: u128,
    token: soroban_sdk::Address,
    receiver: soroban_sdk::Address,
    signature: soroban_sdk::BytesN<65>,
)

Processes a deposit from Stellar to another chain

Arguments

  • sender_id - The address sending the tokens
  • amount - The amount of tokens to deposit
  • token - The token address being deposited
  • receiver_id - The recipient address on the target chain
  • client_timestamp - Timestamp used as nonce

Returns

  • The nonce used for this deposit
fn deposit(
    env: soroban_sdk::Env,
    sender_id: soroban_sdk::Address,
    amount: u128,
    token: soroban_sdk::Address,
    receiver_id: soroban_sdk::BytesN<32>,
    nonce: u128,
) -> u128

Retrieves deposit data by nonce

Arguments

  • nonce - The nonce of the deposit to retrieve

Returns

  • The deposit data as bytes
fn get_deposit(env: soroban_sdk::Env, nonce: u128) -> soroban_sdk::Bytes

Gets the current ledger timestamp

Returns

  • The current ledger timestamp
fn get_timestamp(env: soroban_sdk::Env) -> u64

Retrieves the public key used for signature verification

Returns

  • The public key as bytes
fn get_public_key(env: soroban_sdk::Env) -> soroban_sdk::BytesN<65>

Checks if a withdrawal with the given nonce has been executed

Arguments

  • nonce - The nonce to check

Returns

  • True if the withdrawal has been executed, false otherwise
fn is_executed(env: soroban_sdk::Env, nonce: u128) -> bool

Gets the contract owner address

Returns

  • The owner address
fn get_owner(env: soroban_sdk::Env) -> soroban_sdk::Address

Verifies a hot omni bridge deposit

Arguments

  • wallet_id - The wallet identifier
  • data - The data to verify containing nonce and hash

Returns

  • True if verification succeeds, false otherwise
fn hot_verify(
    env: soroban_sdk::Env,
    wallet_id: soroban_sdk::String,
    data: soroban_sdk::BytesN<48>,
) -> bool

Imports

WebAssembly Text (WAT) ▶