hi guys! anyone knows how to only listen to verified smart contracts on eth blockchain

Jul 21, 2023, 10:07 AM
this is not a solidity thing cause contracts do not get verified on the blockchain , check with etherscan
Jul 21, 2023, 12:13 PM
yea thats the tough problem
Jul 21, 2023, 12:13 PM
etherscan should have an api tocheck whether a contract is verified or not
Jul 21, 2023, 12:20 PM
yes, but i only want to listen to verified ones
Jul 21, 2023, 12:20 PM
Well, check all contracts and filter out non verified ones?
Jul 21, 2023, 12:21 PM
that wont be live anymore, because im checking for live token creations rn
was thinking if there's way to check for live contract verified
Jul 21, 2023, 12:22 PM
Like, auto verified from same bytecode?
Jul 21, 2023, 12:22 PM
wym?
Jul 21, 2023, 12:24 PM
By live you meant freshly deployed contracts yeah? They won't be verified until someone verifies it unless it have a matching bytecode with one of the pre verified ones
Jul 21, 2023, 12:25 PM
Yeap! Freshly deployed contracts
Jul 21, 2023, 12:25 PM
Create a list of fresh deployed contracts, keep it in the list for x amount of time, after x amount of time, check its verification status and keep/remove it from list according to the result
Jul 21, 2023, 12:26 PM
That’s why I was thinking instead of listening and awaiting some time before using the api to check if source code is verified, if there’s another way
Yea I was planning to do this if there’s no other way around it
As this method is not very efficient
And quite a some of data
Jul 21, 2023, 12:27 PM
There is no "event" or such emitted by etherscan when you verify a contract. So I think this is the only soln
Jul 21, 2023, 12:28 PM
use vm.stratPrank(user1) , cause the caller is not the user i think
Jul 21, 2023, 1:15 PM
it is, you can see it as last log (received ETH)
Jul 21, 2023, 1:21 PM
listen to all then apply filter
.
Jul 21, 2023, 1:26 PM

© 2024 Draquery.com All rights reserved.