Skip to main content
For the standard Tron transfer flow, construct a TRC-20 transfer(address,uint256) transaction and add the returned call_data as UTF-8 transaction data. Layerswap uses that memo to match the deposit. Supported networks: Tron Mainnet, Tron Testnet (Shasta/Nile)

Full example

The Server-side tab signs with a raw private key. The Browser tab uses a Tron wallet adapter (TronLink and similar) and its signTransaction method.
Set the fee limit according to your integration’s Tron policy. The example value is a cap, not an estimate. Using amount_in_base_units as a string avoids float rounding.

Funding via the Depository

The examples above cover the standard transfer flow. If the swap was created with use_depository: true, the action targets Layerswap’s on-chain Depository contract instead of carrying the standard-transfer memo. On Tron the Depository supports TRC-20 tokens only — approve the contract, then call depositERC20:
TronWeb
See Funding methods for when to use each. Store the transaction id and track the swap.