-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Contracts with incorrect results? Report here please #19
Comments
Hello @shazow , A simple contract that I compiled does not work. Here is the bytecode : A |
@Taryax Oh good find, thank you! And I extra-appreciate the debugging you already did. :) |
Ok I think I understood more precisely. What i copied here is the whole creation code. Would it make sense then to detect if there is init codes at the beginning of the data ? And then only keep the good part ? It works like a charm if I remove the first 36 bytes. |
@Taryax Yea I think you're on the right track, I've been meaning to add some logic to separate out the init code but haven't gotten to it yet. Let me know if you'd like to work on that, it would be appreciated! :) |
The following bytecode (which is real runtime code this time 😛) is compiled from a contract not having payable nor fallback function (solidity 0.6.0) : The compiler will then put a |
Ooo another good one, thank you! |
Okay all of these examples are passing as of #23, let me know if there are other good ones. :) |
It seems to miss all functions for Uniswap V2 pairs. Random example on mainnet: Bytecode:
selectors:
abiFromBytecode:
Can check other pairs by grabbing a random tx from the Uniswap v2 factory internal txs (https://etherscan.io/address/0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f#internaltx) and then grab the pair address from the internal create2 tx |
@Zil-B can you try it with the latest version in main? I'm getting |
ah my mistake I was using the v0.4.1 release. It's working as expected in the latest main version Thanks! |
No worries, I need to do a v0.5 release soon, my bad! |
v0.5.0 has been released! |
Edit: Actually not sure this one even has a jump table? Interesting. |
|
Please report any examples of contracts (ideally addresses deployed on mainnet) which yield incorrect selector results with whatsabi.
The text was updated successfully, but these errors were encountered: