Closed eyooooo closed 1 year ago
Certainly not hard to pull PUSH20
s but it is hard to guarantee that they're address
types. Could you talk more about your higher-level usecases? Maybe there are other interesting approaches to try.
Certainly not hard to pull
PUSH20
s but it is hard to guarantee that they'readdress
types. Could you talk more about your higher-level usecases? Maybe there are other interesting approaches to try.
fastest reply to an github issue EVER. my use case is scanning deployed bytecode and looking for valid addresses.
thinking out loud - maybe like grabbing from PUSH20 and then confirming the checksum.
nah that wont work it comes through as all lowercase. scratch that.
edit: might not really be a way to guarantee it tbh...
Would you care if you have a bunch of false positives? If not, could just pull PUSH20s out using a fairly simple regexp. :)
i wouldnt mind xD im parsing out some contracts and it seems like a common false positive is 0xffffffffffffffffffffffffffffffffffffffff
i dont have any proof of this (yet) but might be useful to also check PUSH32 for 20 byte addresses in case someone out here doing something weird. just adding for the sake of completeness :)
I think this use case is better done separately. Here's an example that you could base off of: https://github.com/hananbeer/flaccid/blob/main/getSignatures.js
got it :) feel free to close/reject this issue if you'd like. thanks a lot.
Thanks! Would love to see what you come up with and how reliable it is, please share if you develop something! :) Maybe we can toss it in as a separate helper somewhere.
I don't think it makes a lot of sense to put it into the core disasm parsing routine since it won't help the rest of the stuff we're trying to deduce, at least not yet.
just found this repo so gonna see if i can help with a PR but it would be awesome if this tool could also pull addresses from bytecode. im guessing we need the PUSH20 opcode and maybe some other jazz.
thanks :)