Contract b56aedeaf80c3d4b7c4c2ddf3893ac47c3ecff1a0a6f19152ca993e5bb294414

← Back to Index 📥 Download WASM

Meta

rssdkver 23.4.1#e671b396f8bacf1370925f722df158b31c0baae5
rsver 1.90.0

Instances

  • CAC5SKP5FJT2ZZ7YLV4UCOM6Z5SQCCVPZWHLLLVQNQG2RWWOOSP3IYRL
  • CAFO6OUZAL62SGDVGHHJPSCOOF3HUKXLED3C3FS5RRQI2VBZ4F5HBPXI
  • CAQPKW5AUPEA4C7OERZRUCBWT5RZDSETO4PR5REVRC5MT4CF3PBSKXQC
  • CCRLTS3CMJHYHFD7MYRBJPNW6R3LCXNDO2B6TK6AS6FSXAHR6GBMGLRE

Interface

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

Imports

WebAssembly Text (WAT) ▶