Contract 82eaed0b842b579f9978706d84717236b14d24254480ebe0861f554f5e8b3364

← Back to Index 📥 Download WASM

Meta

cliver 25.1.0#a048a57a75762458b487052e0021ea704a926bee
rssdkver 23.4.1#e671b396f8bacf1370925f722df158b31c0baae5
rsver 1.95.0-nightly

Instances

  • CD4NL2R7HPIF7YEG3NDBV35EPZFTSAU5INHYJ2N6CFKYZAY4YIHFXQ5B

Interface

Send any fungible token from the contract to a recipient

The contract must already hold the chosen token (someone transferred it to the contract). Anyone can call this function to forward that token to a recipient. Works with XLM (pass the native asset address) or any custom Soroban fungible token.

Arguments

  • token_address - The fungible token contract address (e.g. from soroban contract id asset --asset native --network <network> for XLM)
  • recipient - The Stellar address to send the token to
  • amount - The amount in the token's smallest units (e.g. stroops for XLM)

Returns

Returns true on success

fn send_token(
    env: soroban_sdk::Env,
    token_address: soroban_sdk::Address,
    recipient: soroban_sdk::Address,
    amount: i128,
) -> bool

Imports

WebAssembly Text (WAT) ▶