-
Notifications
You must be signed in to change notification settings - Fork 238
fix(sol-macro): internal SC derives #1017
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
Conversation
I was able to reproduce it locally using this abi: core/crates/sol-types/tests/macros/sol/json.rs Lines 219 to 241 in 4004749
I am still trying to understand why I can't reproduce it in the alloy repo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a compilation issue where smart contract bindings generated from ABI JSON fail when the root smart contract depends on other interfaces from the same file. The fix ensures that derive attributes are properly propagated to internal contracts.
- Extracts
all_derives
andextra_derives
attributes fromsol
attributes for propagation - Applies these derive attributes to internal contracts during code generation
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
#1011 PR doesn't cover a case where SC bindings are generated from an ABI json, where the root SC depends on other interfaces that also generated from the same file. As a result, the compilation fails. This PR fixes that.