bitcore icon indicating copy to clipboard operation
bitcore copied to clipboard

Use Erc20RelatedFilterTransform instead of Transfers event.

Open micahriggan opened this issue 3 years ago • 0 comments

https://github.com/bitpay/bitcore/blob/e478af880b11990d9b402e246c9c920a24404d8b/packages/bitcore-node/src/modules/ethereum/api/csp.ts#L252

On this line we're getting web3 transfer events, but that won't work for really large block ranges, it'll time out.

We have a transform stream that can generate the ERC20 transfers from the database, we should modify this method to use that

      const erc20Transform = new Erc20RelatedFilterTransform(web3, args.tokenAddress);
      transactionStream = transactionStream.pipe(erc20Transform);

micahriggan avatar Aug 24 '22 17:08 micahriggan