Initialize the contract with a destination address Can only be called once
fn init(
env: soroban_sdk::Env,
destination: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>
Pay USDC to the destination address The caller must have approved the contract to spend their USDC Memo is included in the event for tracking
fn pay(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
amount: i128,
memo: soroban_sdk::String,
) -> Result<(), soroban_sdk::Error>
Flush any tokens from this contract to the destination This is useful for recovering tokens accidentally sent to the contract
fn flush(
env: soroban_sdk::Env,
token_contract: soroban_sdk::Address,
amount: i128,
) -> Result<(), soroban_sdk::Error>
Get the destination address
fn get_destination(env: soroban_sdk::Env) -> soroban_sdk::Address
Get the USDC token address
fn get_usdc(env: soroban_sdk::Env) -> soroban_sdk::Address