Initialize the contract with a fee collector address
fn init(env: soroban_sdk::Env, fee_collector: soroban_sdk::Address) -> ()
Transfer tokens with an automatic fee deduction.
token_contract: token contract address (USDC or native XLM contract id)from: account sending tokens (must be the invoker)to: recipient (e.g. Binance deposit address)amount: total amount user wants to transferfee_bps: fee in basis points (e.g. 100 = 1%)fn transfer_usdc(
env: soroban_sdk::Env,
token_contract: soroban_sdk::Address,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
amount: i128,
fee_bps: u32,
) -> ()
send XLM with fee deduction
fn transfer_xlm(
env: soroban_sdk::Env,
token_contract: soroban_sdk::Address,
sender: soroban_sdk::Address,
recipient: soroban_sdk::Address,
amount: i128,
fee: i128,
) -> ()
Calculate the transaction fee for XLM or USD sent.
amount: total amount to be transferredfee_bps: fee in basis points (e.g. 100 = 1%)
Returns the calculated fee amountfn calculate_fee(env: soroban_sdk::Env, amount: i128, fee_bps: u32) -> i128