-
Notifications
You must be signed in to change notification settings - Fork 39
Fix abigen 0.2-dev #673
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
Fix abigen 0.2-dev #673
Conversation
WalkthroughThe change updates the command used in the Changes
Sequence Diagram(s)sequenceDiagram
participant G as generate_bindings
participant F as Forge Inspector
G->>F: Execute "forge inspect --json"
F-->>G: Return ABI in JSON format
G->>G: Process ABI data
G->>G: If error, handle failure and exit
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
contracts/dev/generate (1)
34-37: Consider adding --json flag for bytecode consistencyWhile the ABI generation now uses the
--jsonflag, the bytecode generation command doesn't include it. For consistency and to prevent potential issues if the default output format changes, consider adding the--jsonflag here as well.- if ! forge inspect "${source_artifact}:${filename}" bytecode > "${build_artifact}.bin.json"; then + if ! forge inspect --json "${source_artifact}:${filename}" bytecode > "${build_artifact}.bin.json"; then echo "ERROR: Failed to generate bytecode for ${filename}" >&2 exit 1 fi
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
contracts/dev/generate(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: abis
- GitHub Check: Build pre-baked anvil-xmtpd
- GitHub Check: Push Docker Images to GitHub Packages (xmtpd)
🔇 Additional comments (1)
contracts/dev/generate (1)
29-29: Good update to specify the JSON format explicitlyAdding the
--jsonflag to theforge inspectcommand ensures that the ABI is properly formatted as JSON, which is required for the Go bindings generator to process it correctly. This change aligns with the PR objective to fix abigen compatibility.
Add JSON flag to forge inspect ABI generation
Modified the
forge inspectcommand to include--jsonflag when generating contract ABI files in the contract artifact generation process📍Where to Start
The contract generation script in generate
Macroscope summarized 067704b.
Summary by CodeRabbit