Suppose we have multiple Ethereum accounts and we are trying to track them for any deposit. I mean we want to be notified for any transaction in the blockchain if the transaction is to any of our accounts and save that transaction. I know that for Bitcoin, there exists a function listunspent
that shows any unspent transaction that is related to our addresses. but after weeks of search, I didn't find any alternative for that in Ethereum Blockchain. I tried below methods but these are not completely what I want:
- Using
eth.filter
:
After some tests, I found that apparently, this function just filter smart contracts with the specified accounts.
- searching all blocks:
This method is very time-consuming. Because there exists a lot of transactions and we should check every single transaction for the to
field.
- creating smart contract:
A friend told me to use Event in a smart contract. but the problem is that I don't want others to know that this contract is for me. but after some times that can be comprehended.
- Using
eth.getBalance
This is a solution to find out deposits but I also want to have the exact transaction that the deposit is done. but can't find it in this way.
I wonder if there exists any better way. I appreciate if you can help me. Thanks