Contract 591687ef484574f148f99380dcc39ccc41c217ae2fe80f67877fd24d43d60953

← Back to Index 📥 Download WASM

Meta

rssdkver 23.2.1#ab415a33cc1f6bdce20ac4a12f0ddbe41a648949
rsver 1.89.0

Instances

  • CAJWG3HJYGHAFE2FSGNHOA6MCUZQE5YSDIXKGLCI2HUEAJPT2ZOSYC2S
  • CBANDHMHHRSIK7NMZ5M5OMLJPN3PBOUGTY6U2G76IV7XJVQJ2QZYWQPJ

Interface

Initialize the contract with admin and validator setup. Must be called first after deployment.

fn initialize(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    bridge: soroban_sdk::Address,
) -> Result<(), ContractError>

Bridge set lp token map when new token support is added to bridge.

fn set_lp_map(
    env: soroban_sdk::Env,
    token: soroban_sdk::Address,
    lp_token: soroban_sdk::Address,
)

Admin updates lp token map from token map that exists in bridge contract.

fn update_lp_map(
    env: soroban_sdk::Env,
    token: soroban_sdk::Address,
) -> Result<(), ContractError>

Update the contract administrator. Only callable by the current admin.

fn update_admin(env: soroban_sdk::Env, admin: soroban_sdk::Address)

Update the contract administrator. Only callable by the current admin.

fn update_bridge(env: soroban_sdk::Env, bridge: soroban_sdk::Address)

Upgrade the contract WASM to a new version. Only callable by the admin.

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

Update user reward when user adds or removes liquidity.

fn update_reward(
    env: soroban_sdk::Env,
    token: soroban_sdk::Address,
    user: soroban_sdk::Address,
) -> Result<(), ContractError>

Update user reward when user adds or removes liquidity.

fn lp_update_reward(
    env: soroban_sdk::Env,
    token: soroban_sdk::Address,
    user: soroban_sdk::Address,
    balance: i128,
) -> Result<(), ContractError>

Update reward when rewards are received.

fn notify_fee(
    env: soroban_sdk::Env,
    token: soroban_sdk::Address,
    amount: i128,
) -> Result<(), ContractError>

Get total deposit for a particular bridge bridge.

fn get_total_deposit(
    env: soroban_sdk::Env,
    token_id: soroban_sdk::Address,
) -> Result

Get total deposit of an account for a particular bridge token.

fn get_total_deposit_of(
    env: soroban_sdk::Env,
    account: soroban_sdk::Address,
    token_id: soroban_sdk::Address,
) -> Result

Get total liquidity available for a token on remote bridge

fn get_user_reward(
    env: soroban_sdk::Env,
    user: soroban_sdk::Address,
    token: soroban_sdk::Address,
) -> Result

Initiate a rebalance operation between chains.

fn claim_rewards(
    env: soroban_sdk::Env,
    user: soroban_sdk::Address,
    token: soroban_sdk::Address,
) -> Result<(), ContractError>

Imports

WebAssembly Text (WAT) ▶