A simple implementation of gasless USDT transfers on the TRON network.
Install the required node modules:
npm install
# or
pnpm installCreate a .env file in the root directory and configure your private keys:
NETWORK=nile
USER_PRIVATE_KEY=your_user_private_key
DEPLOYER_PRIVATE_KEY=your_deployer_private_key
RECIPIENT_ADDRESS=target_wallet_addressNote: The
DEPLOYER_PRIVATE_KEYaccount acts as the Relayer and must have TRX to pay for gas.
Deploy the Factory and Controller contracts to the Nile Testnet:
node script/deployUups.cjsThis will create a deployed-addresses-uups.nile.json file (or based on your NETWORK setting) with the contract addresses.
Run the script to sign a permit and execute the transfer via the Relayer:
# Deposit usdt
node script/executeGaslessDepositUups.cjs
# Deposit trx
node script/executeGaslessDepositTrxUups.cjs