2

我发送的交易不是每次都进来,错误率在90%左右。

const trc20ContractAddress = "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"; //mainnet USDT contract
let contract = await tronWeb.contract().at(trc20ContractAddress);

//enventname is the name of the event of the contract
await contract && contract.Transfer().watch((err, event) => {
  if(err)
    return console.error('Error with "Message" event:', err);
 console.log('- Result:', event.result, '\n');
  console.groupEnd();
});
4

0 回答 0