find-transaction.php 534 B

123456789101112131415
  1. <?php
  2. include_once '../vendor/autoload.php';
  3. $fullNode = new \IEXBase\TronAPI\Provider\HttpProvider('https://api.trongrid.io');
  4. $solidityNode = new \IEXBase\TronAPI\Provider\HttpProvider('https://api.trongrid.io');
  5. $eventServer = new \IEXBase\TronAPI\Provider\HttpProvider('https://api.trongrid.io');
  6. try {
  7. $tron = new \IEXBase\TronAPI\Tron($fullNode, $solidityNode, $eventServer);
  8. } catch (\IEXBase\TronAPI\Exception\TronException $e) {
  9. exit($e->getMessage());
  10. }
  11. $detail = $tron->getTransaction('TxId');
  12. var_dump($detail);