PayoutHelper payout = new PayoutHelper("https://eth-goerli.g.alchemy.com/v2/HwO5lIvcvSTL4PzCfFrTZwu7N__dhzkl");
// The payout gateway contract address
String payoutGatewayAddress = "0x8E5dF55ac224DB7424Fa8536edA9356F44474936";
// Create a list to store the payouts
List<Payout> payoutList = new ArrayList<>();
// Create a payout for USDT with a value of 1 USDT (1 USDT = 1000000)
Payout payoutUsdt = new Payout("USDT", new BigInteger("1000000"), "to address");
// Create a payout for USDC with a value of 1 USDT (1 USDT = 1000000)
Payout payoutUsdc = new Payout("UDC", new BigInteger("1000000"), "to address");
// Add the payouts to the list
payoutList.add(payoutUsdt);
payoutList.add(payoutUsdc);
// Create a list to store the business-related information
// Format: BusinessNumber.OrderNumber
List<Utf8String> business = new ArrayList<>();
business.add(new Utf8String("TX1.NO00001"));
business.add(new Utf8String("TX2.NO00002"));
// Specify the chain ID (testnet: 1, mainnet: 5)
int chainId = 5;
// Perform the payout by calling the payout method with the private key, payout gateway address, payout list,
// business list, and chain ID, and get the transaction IDString txId = payout.payout(PRIVATEKEY, payoutGatewayAddress, payoutList, business, chainId);
System.out.println("txId->" + txId);
String jsonRpc = "https://...";
String http = "https://...";
// Create an instance of TronPayoutHelper with the specified JSON-RPC and HTTP URLs
TronPayoutHelper payoutHelper = new TronPayoutHelper(jsonRpc, http);
// Specify the private key for signing the transaction
String privateKey = "Your Private Key";
//call gateway contract Address
String payoutGateWayAddress = "gateway contract Address";
//the trigger address (the address of private key)
String triggerAddress = "trigger Address";
// Create a list of token addresses for payout
List<Address> tokenList = new ArrayList<>();
// Add USDT token address for payout
tokenList.add(new Address(TronSDKUtils.convertAddressToEth("USDT token address")));
// Add USDC token address for payout
tokenList.add(new Address(TronSDKUtils.convertAddressToEth("USDC token address")));
// Create a list of token amounts for payout
List<Uint256> amountList = new ArrayList<>();
// Add 1 USDT amount
amountList.add(new Uint256(1000000));
// Add 1 USDC amount
amountList.add(new Uint256(1000000));
// Create a list of recipient addresses
List<Address> toList = new ArrayList<>();
// Add USDT recipient address
toList.add(new Address(TronSDKUtils.convertAddressToEth("recipient USDT address ")));
// Add USDC recipient address
toList.add(new Address(TronSDKUtils.convertAddressToEth("recipient USDC address")));
// Create a list of business-related information
List<Utf8String> business = new ArrayList<>();
// Add business number and order number
business.add(new Utf8String("your business no.you order no"));
business.add(new Utf8String("your business no.you order no"));
// Perform the payout with the specified parameters and get the transaction ID
String txId = payoutHelper.payout(privateKey, payoutGateWayAddress, fromAddress, new BigDecimal(100), tokenList, amountList, toList, business);
System.out.println("txId->" + txId);