Overview
Tron deposits require building a TRC-20 token transfer transaction using TronWeb, then appending thecall_data as hex-encoded data before signing and broadcasting.
Prerequisites:
- tronweb for transaction building and RPC communication
call_data Format
For Tron,call_data is a plain string (a memo identifier). It is converted to hex and embedded in the transaction data field:
addUpdateData method, which Layerswap uses to identify and match the deposit.
Full Example
TheServer-side tab signs with a raw private key. The Browser tab uses a Tron wallet adapter (TronLink, etc.) and its signTransaction method.
Funding via the Depository
The example above covers the standard transfer flow. If you created the swap withuse_depository: true,
the deposit action targets Layerswap’s on-chain Depository contract. On Tron
the Depository supports TRC-20 tokens only — approve the contract, then call depositERC20:
TronWeb
Next Step
After the transaction is submitted, notify Layerswap so it can match your deposit faster:use_depository, TRC-20 tokens).