Skip to main content

Overview

Tron deposits require building a TRC-20 token transfer transaction using TronWeb, then appending the call_data as hex-encoded data before signing and broadcasting. Prerequisites:
  • tronweb for transaction building and RPC communication
Supported networks: Tron Mainnet, Tron Testnet (Shasta/Nile)

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:
This hex data is appended to the transaction using TronWeb’s addUpdateData method, which Layerswap uses to identify and match the deposit.

Full Example

The Server-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 with use_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
See Choosing a method for when to use each.

Next Step

After the transaction is submitted, notify Layerswap so it can match your deposit faster:
See the full deposit flow for details, or the Depository guide to fund via the on-chain contract (use_depository, TRC-20 tokens).