-
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
bug: forge flatten
fails with missing field body at line 1 column 30987
#7554
Comments
Hey @duncancmt thanks for the report! Would it be possible for you to provide a repro for this? Else it's really really hard to investigate. cc @klkvr seems like another flattener edge case |
Thanks @duncancmt for reporting, would be great to have a minimal reproduction or additional details on your contract For now I'll mark it as Feel free to re-open with additional details / minimal reproduction |
Hi @zerosnacks . I couldn't give a repro because the contracts weren't released yet, but we just released, so I can show you. In the repo https://github.com/0xProject/0x-settler if you try |
Was able to narrow it down to the function _uniV3ForkInfo(uint8 forkId)
internal
pure
override
returns (address factory, bytes32 initHash, uint32 callbackSelector)
{
// ...
} Where it overrides function _uniV3ForkInfo(uint8 forkId) internal view virtual returns (address, bytes32, uint32); This is fixed by removing This is something we should handle as it is valid Solidity Additional action item is seeing if we can improve the error message returned |
forge flatten
fails with cryptic error messageforge flatten
fails with missing field
body at line 1 column 30987
forge flatten
fails with missing field
body at line 1 column 30987
forge flatten
fails with missing field body at line 1 column 30987
forge flatten
fails with missing field body at line 1 column 30987
forge flatten
fails with missing field body at line 1 column 30987
hmm, it's strange that removing |
Ah good point, |
ah it's succeeding because we are falling back to older flattener impl which does not require AST parsing |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (dbc48ea 2024-04-03T00:17:03.697365187Z)
What command(s) is the bug in?
forge flatten
Operating System
Linux
Describe the bug
Seems related to #7069, but I have no further insights. I'm trying to flatten this contract because
forge create --verify
also fails with this contract and I'm about to pull my hair out.The text was updated successfully, but these errors were encountered: