.
├── READMD.md # Instruction
├── TronTransaction.php # Main class
├── TronTransactionTest.php # Test case
└── useTronTransaction.php # Example
composer require iexbase/tron-api
# Send TRX to address
$result = $tronTransaction->sendTRX('receiver-address-for-TRX', 100);
# Send TRC20 to address
$result = $tronTransaction->sendTRC20('your-send-address-for-TRC20', 'contract-address-for-TRC20', 100);
- Install
composer require --dev phpunit/phpunit ^9
- Change variable in
TronTransactionTest.php
- Run all test case
./vendor/bin/phpunit TronTransactionTest.php
# Global install phpunit
phpunit TronTransactionTest.php
Note:
- Replace 'your-test-private-key-here', 'TRC20-contract-address-here' and 'receiver-address-here' to your own.