-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
cast sig
does not behave as expected on some inputs
#1521
Comments
cast
sig does not behave as expectedcast sig
does not behave as expected on some inputs
Should I have opened this issue in https://github.com/gakonst/ethers-rs/ ? It's really more of a problem there than it is a foundry bug. |
I don't think it should? You cannot make these functions external, so they will never have a 4byte signature. The others make sense to me. There is another issue: Some Cast commands ( Ref #670
Probably but I think having a tracking issue here also makes sense 🤷♂️ |
FYI this is also seems to be an issue with For
All to no avail. Would appreciate any support on this! |
function types are currently not supported by tracked here rust-ethereum/ethabi#273 |
If ethabi doesn't add function types then you could just treat them as |
there are essentially two issues:
which is handled here and would require another variant |
Should be fixed in #2151, please let me know if it's not! |
Component
Cast
Have you ensured that all of these are up to date?
What version of Foundry are you on?
nightly-8478c0841b00789c735df68ad111105fa9204f55
What command(s) is the bug in?
cast sig
Operating System
No response
Describe the bug
This should fail but does not
cast sig "foo(uint999)" 0x54511ad7
This should succeed
The root of the problem is really over in ethers-rs. The parser does not handle function types in human readable ABI and does not make sure the bytes/int/uint sizes are correct, among other things. ref gakonst/ethers-rs#474
Some more examples
Arrays with unit sizes are techincally valid solidity
In solidity this expands out to
uint[60]
.Arrays have a maximum size in solidity
This gets parsed as correct but is not.
cast sig "foo(uint[99999999999999999])" 0xfece5cb9
The text was updated successfully, but these errors were encountered: