-
Notifications
You must be signed in to change notification settings - Fork 282
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: add ABI with removed functions from contract #1135
Conversation
Caution Review failedThe pull request is closed. WalkthroughThis pull request implements several changes, including adjusting the logging level in the Changes
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
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)
rollup/l1/abi_test.go (1)
21-26
: Add descriptive messages to yourassert.Equal()
calls and safeguard lookups.Although the tests effectively verify the 4-byte method IDs, consider including descriptive assertion messages to identify which signature fails if there's a mismatch. Also, to prevent potential lookup panics, you could verify
ScrollChainABI.Methods[<methodName>]
exists before comparing the IDs.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
rollup/da_syncer/batch_queue.go
(1 hunks)rollup/l1/abi.go
(1 hunks)rollup/l1/abi_test.go
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- rollup/da_syncer/batch_queue.go
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: test
🔇 Additional comments (1)
rollup/l1/abi.go (1)
27-27
:❓ Verification inconclusive
Validate ABI correctness and consider externalizing the ABI.
The updated ABI JSON appears comprehensive; however, ensure it exactly matches the contract code (including function overloads like
revertBatch
). As an enhancement, consider storing the ABI in a separate file or usingabigen
to generate bindings for improved maintainability.Below is an optional script to check for multiple
revertBatch
definitions in the Solidity sources:
🏁 Script executed:
#!/bin/bash # Searches for 'function revertBatch' definitions in Solidity files to confirm overload usage. fd . --extension sol --exec rg -A 2 -B 2 'function revertBatch'Length of output: 65
Action Required: Verify ABI Consistency and Consider Externalization
The ABI inrollup/l1/abi.go
(line 27) appears comprehensive but ensure it exactly matches your Solidity contract implementations—particularly for functions like the overloadedrevertBatch
. Note that our automated search forrevertBatch
definitions did not return any results, so please manually verify this against your Solidity sources. As a maintainability improvement, consider externalizing the ABI (for example, storing it in a separate file or usingabigen
to generate bindings).
b175df2
1. Purpose or design rationale of this PR
This PR updates the
ScrollChainABI
to include also removed functions from the contracts as these are still needed to sync from genesis with L1 follower mode.2. PR title
Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:
3. Deployment tag versioning
Has the version in
params/version.go
been updated?4. Breaking change label
Does this PR have the
breaking-change
label?Summary by CodeRabbit
Summary by CodeRabbit
Refactor
New Features
Tests
Chores