-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Alloy binding failed: unable to parse token from invalid AST #10055
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
Comments
@alxiong mind to check if problem persists in latest stable? thank you! (be aware that ethers was removed and we're it defaults to alloy) |
just updated to the latest, still got this issue:
(and yes, I'm only generating alloy bindings) |
are you able to reproduce @grandizzy ? (you don't need to enter (this is a blocking bug on a somewhat time-sensitive feature I'm working on, so would appreciate if its gets prioritized, I'm happy to hop on call or explaining more about our contracts, if necessary, to help you debug and locate the bug) |
yep, going to check why it happens |
@alxiong Please reopen if still issues, thank you |
I see, 😂 didn't realize that. Using the name "self" in library is not uncommon as it appears in the solidity official example: https://docs.soliditylang.org/en/v0.8.29/contracts.html#libraries While this ticket can be closed, may I suggest adding a compiler warning or hint during binding generations? |
the error says
agree could be misleading |
Reopening as we have a fix here: alloy-rs/core#903 which will be applied in the next alloy core bump @alxiong we still can't generate bindings for Having said that, we've opted for mapping function something(address self) returns (uint256); will translate to: pub struct somethingCall { this: Address }; |
yes, that's lovely. |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
1.0.0-nightly
What version of Foundryup are you on?
No response
What command(s) is the bug in?
just gen-bindings
Operating System
MacOS
Describe the bug
On 6e86d3c of EspressoSystems/espresso-network#2706, just run
gen-bindings
which internally runand got:
Before this PR, our
main
has no problem generating bindings (for both ethers and alloys) using the same just command.p.s. the problem with
contract-bindings-alloy/src/lightclientarbitrumv2.rs:lightclientarbitrumv2;
also exists forcontract-bindings-alloy/src/lightclientv2.rs:lightclientv2;
as I have observed that before as well.cc @sveitser
The text was updated successfully, but these errors were encountered: