Alternative function name: pay Same functionality as send()
fn pay(env: soroban_sdk::Env, recipient: soroban_sdk::Address) -> bool
Send 0.1 XLM (1,000,000 stroops) from the contract to a recipient
recipient - The Stellar address to send 0.1 XLM toReturns true on success
Anyone can call this function. This function transfers 0.1 XLM (the native Stellar asset) from the contract's balance to the recipient. The contract must have at least 0.1 XLM balance before calling this function.
The XLM native asset contract address is network-specific and can be obtained using:
soroban contract id asset --asset native --network <network>
fn send(env: soroban_sdk::Env, recipient: soroban_sdk::Address) -> bool
Alternative function name: transfer Same functionality as send()
fn transfer(env: soroban_sdk::Env, recipient: soroban_sdk::Address) -> bool
Constructor to initialize the payment contract
native_asset_address - The XLM native asset contract address for your networkStores the native asset address in contract storage for use by the send functions.
To get the XLM contract address for your network:
soroban contract id asset --asset native --network <network>
fn __constructor(env: soroban_sdk::Env, native_asset_address: soroban_sdk::Address)