How to get all USDT events in tronweb

90 Views Asked by At

I tried to study the tronweb documentation. The code part for getting the event is as follows, but if my size setting is small, when I parse the logs in a loop, sometimes it will happen that a certain block does not have logs, and the last item of the logs does not. fingerprint attribute

there is my some code

for (let i = fBlock; i < tBlock; i++) {
  isContinue = true;
  while (isContinue) {
    const logs = await tronWeb.getEventResult(
      config.CHAIN[chain].contracts.USDT,
      {
        eventName: "Transfer",
        blockNumber: i,
        size: config.logSize, //区块事件结果数组最大长度
        fingerprint: continueToken,
      }
    );
  }
}
0

There are 0 best solutions below