Skip to content

Merge branch 'eip7702-support' into af-eip7702-addresses - #43

Open
ajit2903 wants to merge 11 commits into
af-eip7702-transactionsfrom
af-eip7702-addresses
Open

Merge branch 'eip7702-support' into af-eip7702-addresses#43
ajit2903 wants to merge 11 commits into
af-eip7702-transactionsfrom
af-eip7702-addresses

Conversation

@ajit2903

@ajit2903 ajit2903 commented Jul 28, 2026

Copy link
Copy Markdown
Owner

GitHub keywords to close any associated issues

Motivation

Why we should merge these changes. If using GitHub keywords to close issues, this is optional as the motivation can be read on the issue page.

Changelog

Enhancements

Things you added that don't break anything. Regression tests for Bug Fixes count as Enhancements.

Bug Fixes

Things you changed that fix bugs. If it fixes a bug but, in so doing, adds a new requirement, removes code, or requires a database reset and reindex, the breaking part of the change should also be added to "Incompatible Changes" below.

Incompatible Changes

Things you broke while doing Enhancements and Bug Fixes. Breaking changes include (1) adding new requirements and (2) removing code. Renaming counts as (2) because a rename is a removal followed by an add.

Upgrading

If you have any Incompatible Changes in the above Changelog, outline how users of prior versions can upgrade once this PR lands or when reviewers are testing locally. A common upgrading step is "Database reset and re-index required".

Checklist for your Pull Request (PR)

  • I verified this PR does not break any public APIs, contracts, or interfaces that external consumers depend on.
  • If I added new functionality, I added tests covering it.
  • If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
  • I updated documentation if needed:
  • If I modified API endpoints, I updated the Swagger/OpenAPI schemas accordingly and checked that schemas are asserted in tests, and highlighted the change in the PR description.
  • If I added new DB indices, I checked, that they are not redundant, with PGHero or other tools.
  • If I added/removed chain type, I modified the Github CI matrix and PR labels accordingly.

Summary by CodeRabbit

  • New Features
    • Added support for EIP-7702 transactions and signed authorization lists.
    • Transaction API responses now include authorization details such as chain ID, nonce, signature values, delegate address, and authority.
    • Added detection and display of EIP-7702 delegate implementations.
    • Improved transaction and address handling for externally owned accounts with code.
  • Bug Fixes
    • Corrected transaction type classification and related gas usage behavior for EIP-7702 accounts.

AllFi and others added 10 commits September 23, 2024 16:03
…d_authorizations.exs

Co-authored-by: Kirill Fedoseev <kirill@blockscout.com>
…actions/:tx_hash` response (blockscout#10776)

* feat: support EIP-7702 transactions

* fix: handle invalid signatures

* fix: save authority

* Update apps/block_scout_web/lib/block_scout_web/views/api/v2/transaction_view.ex

Co-authored-by: Kirill Fedoseev <kirill@blockscout.com>

* Update apps/explorer/lib/explorer/chain/signed_authorization.ex

Co-authored-by: Kirill Fedoseev <kirill@blockscout.com>

* Update apps/indexer/lib/indexer/block/fetcher.ex

Co-authored-by: Kirill Fedoseev <kirill@blockscout.com>

* fix: remove set_code_transaction from @allowed_type_labels

* Update apps/explorer/lib/explorer/chain/import/runner/signed_authorizations.ex

Co-authored-by: Kirill Fedoseev <kirill@blockscout.com>

* fix: move signed_authorization to a separate module

* add todo

---------

Co-authored-by: Kirill Fedoseev <kirill@blockscout.com>
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ajit2903-blockscout Ready Ready Preview, Comment Jul 28, 2026 9:24am
ajit2903-blockscout2 Ready Ready Preview, Comment Jul 28, 2026 9:24am
blockscout Ready Ready Preview, Comment Jul 28, 2026 9:24am
blockscout-a9xo Ready Ready Preview, Comment Jul 28, 2026 9:24am
blockscout-e3sk Ready Ready Preview, Comment Jul 28, 2026 9:24am
blockscout-g2h9 Ready Ready Preview, Comment Jul 28, 2026 9:24am
blockscout-yyq6 Ready Ready Preview, Comment Jul 28, 2026 9:24am

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c6db7f39-2052-4d81-a668-a52f054b573f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds EIP-7702 authorization-list decoding, authority recovery, database persistence, EOA-with-code detection, proxy support, transaction classification, and API rendering.

Changes

EIP-7702 authorization support

Layer / File(s) Summary
JSON-RPC authorization contract
apps/ethereum_jsonrpc/lib/ethereum_jsonrpc.ex, apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/signed_authorization.ex, apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/transaction.ex
Defines signed authorization types, normalizes quantity fields, and carries authorizationList through transaction conversion.
Authorization storage and block import
apps/explorer/priv/repo/migrations/*signed_authorizations*, apps/explorer/lib/explorer/chain/signed_authorization.ex, apps/explorer/lib/explorer/chain/import/..., apps/indexer/lib/indexer/block/fetcher.ex
Creates signed authorization persistence, recovers authorities during block fetching, and imports records with conflict-aware upserts.
EIP-7702 address behavior
apps/explorer/lib/explorer/chain/address*, apps/explorer/lib/explorer/chain/smart_contract/proxy*, apps/explorer/lib/explorer/chain/transaction.ex, apps/explorer/lib/explorer/chain/address/counters.ex, apps/indexer/lib/indexer/fetcher/on_demand/contract_code.ex
Recognizes delegate bytecode, integrates EIP-7702 proxy detection, and updates address classification, gas usage, transaction matching, and bytecode fetching.
Transaction API output
apps/block_scout_web/lib/block_scout_web/controllers/api/v2/*, apps/block_scout_web/lib/block_scout_web/views/api/v2/transaction_view.ex
Loads optional authorization associations, renders sorted authorization lists, adds them to transaction responses, and classifies type 4 transactions as set-code transactions.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant JSONRPC
  participant IndexerBlockFetcher
  participant SignedAuthorizationRunner
  participant TransactionView
  JSONRPC->>IndexerBlockFetcher: authorizationList transaction data
  IndexerBlockFetcher->>IndexerBlockFetcher: recover authority address
  IndexerBlockFetcher->>SignedAuthorizationRunner: signed authorization records
  SignedAuthorizationRunner-->>TransactionView: persisted signed authorizations
  TransactionView-->>TransactionView: render authorization_list
Loading

Suggested reviewers: vbaranov, qwerty5uiop

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 70.83% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is a merge-branch message and does not describe the actual EIP-7702 support changes. Rename it to summarize the main change, e.g. 'Add EIP-7702 support for transactions and addresses'.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch af-eip7702-addresses

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
`@apps/explorer/priv/repo/migrations/20240904161254_create_signed_authorizations.exs`:
- Line 14: Update the nonce column definition in the
create_signed_authorizations migration to use PostgreSQL’s bigint-compatible
type instead of :integer, while preserving the existing non-null constraint.
🪄 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: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a3c50935-7a51-4990-b0ed-204ed5ecfa24

📥 Commits

Reviewing files that changed from the base of the PR and between 0b75ac2 and d6fd3b6.

📒 Files selected for processing (19)
  • apps/block_scout_web/lib/block_scout_web/controllers/api/v2/address_controller.ex
  • apps/block_scout_web/lib/block_scout_web/controllers/api/v2/transaction_controller.ex
  • apps/block_scout_web/lib/block_scout_web/views/api/v2/transaction_view.ex
  • apps/ethereum_jsonrpc/lib/ethereum_jsonrpc.ex
  • apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/signed_authorization.ex
  • apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/transaction.ex
  • apps/explorer/lib/explorer/chain/address.ex
  • apps/explorer/lib/explorer/chain/address/counters.ex
  • apps/explorer/lib/explorer/chain/import/runner/signed_authorizations.ex
  • apps/explorer/lib/explorer/chain/import/stage/block_referencing.ex
  • apps/explorer/lib/explorer/chain/signed_authorization.ex
  • apps/explorer/lib/explorer/chain/smart_contract/proxy.ex
  • apps/explorer/lib/explorer/chain/smart_contract/proxy/eip_7702.ex
  • apps/explorer/lib/explorer/chain/smart_contract/proxy/models/implementation.ex
  • apps/explorer/lib/explorer/chain/transaction.ex
  • apps/explorer/priv/repo/migrations/20240904161254_create_signed_authorizations.exs
  • apps/explorer/priv/repo/migrations/20240918104231_new_proxy_type_eip7702.exs
  • apps/indexer/lib/indexer/block/fetcher.ex
  • apps/indexer/lib/indexer/fetcher/on_demand/contract_code.ex

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Note

Unit test generation is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.


Generating unit tests... This may take up to 20 minutes.

@ajit2903 ajit2903 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auth

Commented in CodeRabbit Change Stack

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Request timed out after 900000ms (requestId=6fe01c94-0625-4406-8490-8282e7baaf34)

Implemented from a Change Stack AI coding task.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/ajiytmr?upgradeToPro=build-rate-limit

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.

2 participants