Hey guys! Is there any smart method in web3.js to check if an address interacted with a specific contract without actually looking to the list of transactions for the given address?
Jun 23, 2022, 8:30 PM
If the contract emits an event with an address you can filter events by address or else if it stores any value based on the user interacting with their address you can check that value
Jun 23, 2022, 8:35 PM
Ok thanks! Interesting.. I'm currently checking is user have balance
Jun 23, 2022, 8:36 PM
If it's an ERC, you can do a get balance call, if that is what you want to know.
Jun 23, 2022, 8:37 PM
I believe you can use the graph to index all of the events which would allow you to check if the user has ever been part of a transfer or transferFrom call (from or to)
Someone might have no balance but had a balance before hence interacted with the contract
Jun 23, 2022, 8:38 PM
yep very true: you can use infrura apis for that. Lowest cost solution, compared to Graph.
Jun 23, 2022, 8:39 PM
Hah eth gas so big, why?
Jun 23, 2022, 8:41 PM
I don't really need the balance, I need a list of ERC20/ERC751 because I would like to revoke authorization..
That's why I was thinking to check the balance.. By doing so I can filter the contacts I've interacted from the others
That's why I was thinking to check the balance.. By doing so I can filter the contacts I've interacted from the others
Uh wait I can check the allowance() 🤩
Jun 23, 2022, 8:43 PM