I'm a little new to Web3, and in NodeJS I'm trying to create a deposit-aware system. Today I'm doing the following:
ETH Transactions: Get it through getBlock, and check whether the "to" of the transaction belongs to me or not Transactions Tokens: Obtained through getPastEvents, as in the code below:
const events = await tokenContract.getPastEvents('Transfer', {
filter: { to: walletsChunk },
fromBlock,
toBlock,
maxBlockResults: 10000
});
So I have the following problems:
- For some reason, sometimes I have the impression that getPastEvents does not return all transactions, I don't know if it could be some address limit or block range, or even another error
- Performance, I have doubts if this is the best way to get transactions to verify they belong to me.
- The most critical thing is that this type of transaction exists: https://etherscan.io/tx/0x4bad5eceba8501b62b9307c002957eb2a9ac5eb4ee8bc39340c801eb2abc93da. I don't know how I can get this transaction, just having the address of a wallet which is present in the transaction