Ethereum Asked by Mohammad Saberi on November 27, 2021
I have an application which should work as an exchange. Customers have their own Ethereum addresses on my Geth server, and they might receive ERC20 Tokens on them. I need to fetch the incoming transaction data for multiple accounts.
I’ve used eth_getLogs()
like this:
eth_getLogs(
'0x9589a2',
'latest',
'0xdac17f958d2ee523a2206206994597c13d831ec7',
[null, null, '0x000000000000000000000000825F80D4c229f56bf1275C9592223a9d921329E2']
);
Now, I have some questions:
You can listen for Transfer
events for all tokens. Then build your own database of all transfers you are interested in. Then match those transfers to your exchange user balances.
Poll for the events scan them again a few blocks back.
Here is some Python code: https://github.com/TokenMarketNet/sto/blob/master/sto/ethereum/scanner.py#L153
Answered by Mikko Ohtamaa on November 27, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP