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 itssignTransaction method.
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 withuse_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