guys, i have a list of EOA & Contract Addresses that i am monitoring. now i am facing a problem:

i am scanning all txs from a specific block, and i am checking if the tx.To or tx.From is one of the addresses that i am monitoring. if so, i am handling it

there is a scenario that i don't know how to handle:

when the tx is a interaction between two contract addresses (not in my list of monitoring contract addresses), and the EOA address that i am monitoring (which is receiving some tokens) is present at the event logs, and not in the tx.To field

i can't have the ABI of every contract to check (in every transaction from a block) if there is a transfer to one of my monitoring EOA addresses in the Transaction Receipt Event Logs

Aug 5, 2022, 1:43 PM
Create an event listener and compare the event topics with your eoa
Whereas a contract is controlled by the code present inside it
Aug 5, 2022, 2:12 PM
i'll think about it, i don't know if i get it perfectly. thank youu
Aug 5, 2022, 2:13 PM
Its quite simple. You make a subscription to an event listener, filter out Transfer events, and check the topics if 'from' or 'to' is your required EOA
Aug 5, 2022, 2:15 PM
but to filter out Transfer events, i must have the contract abi, don't i?
Aug 5, 2022, 2:21 PM
No need, just the hash of the event
Which is a unique value
keccack(Transfer(address,address,uint256))
Aug 5, 2022, 2:30 PM
i would use socket.io to create the ethereum provider and listen those events.
Aug 5, 2022, 2:32 PM
First time I hear about this socket.io, any advantages over traditional event listening through web3 & a wss provider?
Aug 5, 2022, 2:45 PM
web3js or ethers would be a better approach
Aug 5, 2022, 2:54 PM
you don't want to listen them in real time?
Aug 5, 2022, 2:54 PM
Sure, and I've always done that through web3 & a wss provider
Never used this socket.io
Aug 5, 2022, 3:01 PM
I used socketIO for chat app, but web3/ethers handles the event listening better
Aug 5, 2022, 3:03 PM
Due to ETH Merge, the Rinkeby Testnet will be deprecated soon, but chainlink doesn't seem to support goerli testnet, any thoughts about testnet & chainlink in the future?
Aug 5, 2022, 3:30 PM
No worries at all
Aug 5, 2022, 3:38 PM
it worked, thank you!
Aug 5, 2022, 7:22 PM

© 2024 Draquery.com All rights reserved.