feat: bump alloy 0.8→2.0#16
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR upgrades the Alloy dependency from 0.8 to 2.0 and adapts the EVM module to use the new HTTP provider API. The dependency version bump in Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/evm.rs`:
- Line 44: The chained builder call
ProviderBuilder::new().disable_recommended_fillers().connect_http(url) (and the
similar chain on the other occurrence around the reported line) must be
reformatted to rustfmt-friendly multiline chaining: break the call so each
method in the chain is on its own indented line with the leading dot (e.g.,
start with ProviderBuilder::new() on one line, then put
.disable_recommended_fillers() on the next line, then .connect_http(url) on the
following line) so cargo fmt --check passes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: cd60e432-4695-42cb-ac58-f1efe5ba59b2
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock,!**/*.lock
📒 Files selected for processing (2)
Cargo.tomlsrc/evm.rs
alloy 2.0 reorganized the provider type stack:
- RootProvider is now generic over Network (default Ethereum), not
over a Transport — drop the Http<Client> parameterization
- alloy::transports::http::{Client, Http} no longer publicly re-exported
- ProviderBuilder::on_http renamed to connect_http
- ProviderBuilder::new() now installs recommended fillers (gas, nonce,
chain-id, blob-gas) by default, returning FillProvider<...>. Added
.disable_recommended_fillers() to keep the bare RootProvider
contract that http_provider() always returned
Public API surface unchanged — http_provider/http_provider_with_url
still return RootProvider; users picking up extra alloy fillers can
do so explicitly downstream.
Tests: 10/10 pass + doctest. Wallet round-trip + provider construction
both green.
0d906aa to
3a566e4
Compare
Cluster D part 1 of the major-bump audit (sdk-rs side).
Changes
API migrations
RootProvider<Http<Client>>RootProvider(generic over Network, default Ethereum)use alloy::transports::http::{Client, Http}ProviderBuilder::new().on_http(url)ProviderBuilder::new().disable_recommended_fillers().connect_http(url)disable_recommended_fillers()keeps the bare-RootProvidercontract — alloy 2.0 ProviderBuilder defaults to wrapping in a FillProvider stack (gas / nonce / chain-id / blob-gas), which is a behavioural change from 0.8. Consumers who want fillers can opt in explicitly.Verification
cargo test --all-features— 10/10 pass + 1 doctest. Covers wallet + provider construction.Coordinates with the rest of Cluster D (indexer-rs alloy bumps in #9, #10, #11, #12 — coming as a separate PR after this lands).
Summary by CodeRabbit