Skip to content

fix: adapt encode_blocks to alloy 0.12 get_block_by_number API - #139

Open
creditcoinprotoclaw wants to merge 1 commit into
dependabot/cargo/rust/alloy-0.12.6from
fix/encode-blocks-alloy-0.12-api
Open

fix: adapt encode_blocks to alloy 0.12 get_block_by_number API#139
creditcoinprotoclaw wants to merge 1 commit into
dependabot/cargo/rust/alloy-0.12.6from
fix/encode-blocks-alloy-0.12-api

Conversation

@creditcoinprotoclaw

Copy link
Copy Markdown
Contributor

Stacked on top of #16 (the alloy 0.11 → 0.12.6 bump).

PR #16 bumps alloy but leaves the source using the old API, so cargo-check fails with:

  • E0308 mismatched types (two alloy-rpc-types-eth versions in tree before the bump)
  • E0061 get_block_by_number takes 1 arg, not 2

alloy 0.12 changed get_block_by_number to take only BlockNumberOrTag and return an EthGetBlock builder. This commit:

  • drops the removed BlockTransactionsKind::Full arg
  • uses the new builder: .get_block_by_number(n.into()).full().await
  • removes the now-unused BlockTransactionsKind import

Merge #16 first (or merge this into #16 branch), then #16 should pass CI.

cargo fmt clean. Couldn't run cargo check locally (no linker in sandbox); relying on PR CI.

alloy 0.12 changed get_block_by_number to take only BlockNumberOrTag and
return an EthGetBlock builder; use .full() for full transactions and drop
the now-unused BlockTransactionsKind import.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant