-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 bind
fails to compile on keyword enum
(alloy)
#5847
Comments
Able to reproduce with given instructions
Unfortunately
cc @DaniPopes + @yash-atreya could be a good setup for stress testing Alloy's binding generation Created a repo with instructions here to simplify reproduction: https://github.com/zerosnacks/foundry-bug-5847-repro |
forge bind
generates duplicate structs that don't compile (ethers) or fails to compile on keyword enum
(alloy)
reopen because alloy bind also fails -.- |
Confirming this is still an active issue with Alloy, keeping it in the milestone Updating title to scope to Alloy only
cc @yash-atreya / @DaniPopes |
forge bind
generates duplicate structs that don't compile (ethers) or fails to compile on keyword enum
(alloy)forge bind
fails to compile on keyword enum
(alloy)
This is because one of the generated modules is named |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (ecf9a10 2023-09-18T00:24:28.742120000Z)
What command(s) is the bug in?
forge bind
Operating System
macOS (Apple Silicon)
Describe the bug
To reproduce the bug run
then in the project root run
and add
foundry-contracts = { path = "lib/optimism/packages/contracts-bedrock/forge-artifacts/bindings" }
to thecargo.toml
at this point the static analyzer will pick up the compile errors in the bindings. but you can verify by attempting to import them to the main file with
use foundry_contracts::l2_output_oracle;
the bindings are mostly correct but generate duplicate struct definitions for the
https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L1/L2OutputOracle.sol
contract that then implicate thehttps://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L1/OptimismPortal.sol
From what i can tell the duplicate structs are in fact identical.
Desired functionality would be for forge bind to not produce codegen that doesn't compile.
The text was updated successfully, but these errors were encountered: