首页 > 解决方案 > TRC-20 事件监听器中不包含所有事件

问题描述

我发送的交易不是每次都进来,错误率在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();
});

标签: node.jstrontronweb

解决方案


推荐阅读