Skip to content

Conversation

@akronim26
Copy link
Contributor

@akronim26 akronim26 commented Sep 12, 2025

Fixes #5930

Renamed SignerERC7702 as SignerEIP7702

PR Checklist

  • Tests
  • Documentation
  • Changeset entry (run npx changeset add)

Summary by Sourcery

Rename the SignerERC7702 abstract contract to SignerEIP7702 and update all related references

Enhancements:

  • Rename SignerERC7702 to SignerEIP7702 across contracts, mocks, and cryptography utilities

Documentation:

  • Update documentation, examples, and README to use SignerEIP7702

Chores:

  • Revise changelog entry to reflect the new SignerEIP7702 name

@akronim26 akronim26 requested a review from a team as a code owner September 12, 2025 21:11
@changeset-bot
Copy link

changeset-bot bot commented Sep 12, 2025

⚠️ No Changeset found

Latest commit: c006e6b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Sep 12, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR systematically renames the SignerERC7702 contract to SignerEIP7702 across the codebase, updating the implementation, mocks, inheritance clauses, internal overrides, changelog entry, and documentation to align with the new EIP naming convention.

Class diagram for renaming SignerERC7702 to SignerEIP7702

classDiagram
    class AbstractSigner
    class SignerEIP7702 {
        +_rawSignatureValidation(hash, signature)
    }
    AbstractSigner <|-- SignerEIP7702

    class Account
    class AccountERC7702Mock {
    }
    Account <|-- AccountERC7702Mock
    SignerEIP7702 <|-- AccountERC7702Mock

    class AccountERC7702WithModulesMock {
        +_rawSignatureValidation(hash, signature)
    }
    Account <|-- AccountERC7702WithModulesMock
    SignerEIP7702 <|-- AccountERC7702WithModulesMock
    AccountERC7579 <|-- AccountERC7702WithModulesMock

    class MyAccountERC7702 {
        +_erc7821AuthorizedExecutor(caller, selector)
    }
    Account <|-- MyAccountERC7702
    SignerEIP7702 <|-- MyAccountERC7702
    ERC7821 <|-- MyAccountERC7702
    ERC721Holder <|-- MyAccountERC7702
    ERC1155Holder <|-- MyAccountERC7702
Loading

File-Level Changes

Change Details Files
Rename SignerERC7702 to SignerEIP7702 in implementation and mocks
  • Renamed abstract contract declaration to SignerEIP7702
  • Updated imports of the signer contract in mocks
  • Adjusted inheritance clauses to reference SignerEIP7702
  • Replaced internal overrides from SignerERC7702 to SignerEIP7702
contracts/utils/cryptography/signers/SignerERC7702.sol
contracts/mocks/account/AccountMock.sol
contracts/mocks/docs/account/MyAccountERC7702.sol
Update changelog entry for SignerEIP7702
  • Renamed changelog heading and description to reflect SignerEIP7702
CHANGELOG.md
Revise documentation references
  • Replaced SignerERC7702 mentions with SignerEIP7702 in README
  • Updated examples and references in module docs
contracts/utils/cryptography/README.adoc
docs/modules/ROOT/pages/accounts.adoc
docs/modules/ROOT/pages/eoa-delegation.adoc

Assessment against linked issues

Issue Objective Addressed Explanation
#5930 Rename all instances of SignerERC7702 to SignerEIP7702 in code, including contract names, imports, and references.
#5930 Update documentation and changelog to reflect the renaming from SignerERC7702 to SignerEIP7702.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 12, 2025

Walkthrough

This PR renames the signer utility from SignerERC7702 to SignerEIP7702 across code and docs. Changes include updating the contract name in contracts/utils/cryptography/signers/SignerERC7702.sol, imports and inheritance in mocks (AccountMock.sol, MyAccountERC7702.sol), and adjusting _rawSignatureValidation override references. Documentation updates span README.adoc, accounts.adoc, eoa-delegation.adoc, and CHANGELOG.md, including import paths and example inheritance. No behavioral or logic changes are introduced; updates are limited to symbol and reference renames.

Possibly related issues

  • None found beyond already linked issues.

Pre-merge checks (5 passed)

✅ Passed checks (5 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Rename SignerERC7702 as SignerEIP7702" directly and concisely describes the primary change in this PR (the signer contract and its references were renamed across contracts, mocks, docs, and the changelog), matching the PR objectives and raw_summary. It is specific, short, and useful for history scanning.
Linked Issues Check ✅ Passed The linked issue [#5930] requests renaming SignerERC7702 to SignerEIP7702 and the diff summary shows the contract, imports, mocks, documentation, and changelog were updated to the new name, which satisfies the coding-related objectives of that issue.
Out of Scope Changes Check ✅ Passed All reported changes are limited to renaming SignerERC7702→SignerEIP7702 across source files, mocks, documentation, and the changelog; there are no unrelated code modifications or feature additions noted in the raw_summary.
Description Check ✅ Passed The PR description references Fixes #5930 and clearly states the rename plus updates to tests, documentation, and a changeset, which is directly related to the changeset and not off-topic.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (3)
contracts/utils/cryptography/README.adoc (1)

59-59: Fix inconsistent reference: replace remaining "SignerERC7702" mention in this doc.

Line 59 correctly uses {{SignerEIP7702}}, but earlier in this file the bullet list still references {SignerERC7702} (Line 20). Update that bullet to {SignerEIP7702} to keep anchors and cross-refs consistent.

Would you like me to scan the docs for any other lingering "SignerERC7702" references?

CHANGELOG.md (1)

48-48: Use “EIP-7702”, not “ERC-7702”, in the entry text.

Nit: naming consistency across the repo uses EIP-7702.

Apply this diff:

- - `SignerEIP7702`: Implementation of `AbstractSigner` for Externally Owned Accounts (EOAs). Useful with ERC-7702. ([#5657](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5657))
+ - `SignerEIP7702`: Implementation of `AbstractSigner` for Externally Owned Accounts (EOAs). Useful with EIP-7702. ([#5657](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5657))
docs/modules/ROOT/pages/eoa-delegation.adoc (1)

13-13: LGTM on the rename; align terminology elsewhere in this page.

This line correctly references SignerEIP7702. Consider also changing earlier occurrences of “ERC-7702” to “EIP-7702” (e.g., Line 9) for consistency.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8f8d61c and 362a735.

📒 Files selected for processing (7)
  • CHANGELOG.md (1 hunks)
  • contracts/mocks/account/AccountMock.sol (4 hunks)
  • contracts/mocks/docs/account/MyAccountERC7702.sol (1 hunks)
  • contracts/utils/cryptography/README.adoc (1 hunks)
  • contracts/utils/cryptography/signers/SignerERC7702.sol (1 hunks)
  • docs/modules/ROOT/pages/accounts.adoc (2 hunks)
  • docs/modules/ROOT/pages/eoa-delegation.adoc (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-29T13:16:08.640Z
Learnt from: Amxx
PR: OpenZeppelin/openzeppelin-contracts#5904
File: contracts/mocks/crosschain/ERC7786RecipientMock.sol:12-14
Timestamp: 2025-08-29T13:16:08.640Z
Learning: In OpenZeppelin contracts, mock contracts (like ERC7786RecipientMock) don't require input validation such as zero-address checks in constructors, as they are only used for testing purposes in controlled environments.

Applied to files:

  • contracts/mocks/account/AccountMock.sol
🪛 GitHub Actions: checks
contracts/mocks/docs/account/MyAccountERC7702.sol

[error] 9-9: forge test -vvv: Source 'contracts/utils/cryptography/signers/SignerEIP7702.sol' not found: File not found. Searched the following locations: '/home/runner/work/openzeppelin-contracts/openzeppelin-contracts'.

contracts/mocks/account/AccountMock.sol

[error] 1-1: npm run compile (hardhat compile) failed: HH404: File ../../utils/cryptography/signers/SignerEIP7702.sol, imported from AccountMock.sol, not found.

🪛 GitHub Actions: formal verification
contracts/mocks/docs/account/MyAccountERC7702.sol

[error] 9-9: Source 'contracts/utils/cryptography/signers/SignerEIP7702.sol' not found.

contracts/mocks/account/AccountMock.sol

[error] 19-19: Source 'contracts/utils/cryptography/signers/SignerEIP7702.sol' not found.

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Sourcery review
🔇 Additional comments (6)
contracts/utils/cryptography/signers/SignerERC7702.sol (1)

14-24: Cannot verify — repo path 'contracts/' missing; confirm SignerERC7702.sol vs SignerEIP7702.sol filename mismatch**

Verification script output: "contracts/**: No such file or directory (os error 2)"; I couldn't inspect the code.

  • If the file exists, ensure filename matches imports: git mv contracts/utils/cryptography/signers/SignerERC7702.sol contracts/utils/cryptography/signers/SignerEIP7702.sol (or update imports that reference SignerEIP7702.sol).
docs/modules/ROOT/pages/eoa-delegation.adoc (1)

89-90: LGTM.

Reference and anchor for SignerEIP7702 look correct.

docs/modules/ROOT/pages/accounts.adoc (2)

26-26: LGTM.

Renamed reference to SignerEIP7702 is consistent with the new entity.


99-101: LGTM; ensure import path exists post-rename.

Example imports SignerEIP7702.sol; this will be valid once the file is renamed in the repo.

contracts/mocks/account/AccountMock.sol (2)

121-127: Override list correctly updated to include SignerEIP7702.

The delegation to SignerEIP7702._rawSignatureValidation is accurate.


84-93: LGTM.

Inheritance updated to SignerEIP7702 as intended.

import {SignerRSA} from "../../utils/cryptography/signers/SignerRSA.sol";
import {SignerWebAuthn} from "../../utils/cryptography/signers/SignerWebAuthn.sol";
import {SignerERC7702} from "../../utils/cryptography/signers/SignerERC7702.sol";
import {SignerEIP7702} from "../../utils/cryptography/signers/SignerEIP7702.sol";
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Import fails: SignerEIP7702.sol not found (rename source file).

Same root cause as other failures: the signer file wasn’t renamed. Rename the source file to SignerEIP7702.sol to unblock compilation.

🧰 Tools
🪛 GitHub Actions: formal verification

[error] 19-19: Source 'contracts/utils/cryptography/signers/SignerEIP7702.sol' not found.

🤖 Prompt for AI Agents
In contracts/mocks/account/AccountMock.sol around line 19, the import of
SignerEIP7702.sol fails because the actual signer source file was not renamed to
match this import; rename the signer source file in
../../utils/cryptography/signers/ to SignerEIP7702.sol (or alternatively update
the import to the actual filename) so the import path matches the file name and
compilation can succeed.

Comment on lines +9 to +11
import {SignerEIP7702} from "../../../utils/cryptography/signers/SignerEIP7702.sol";

contract MyAccountERC7702 is Account, SignerERC7702, ERC7821, ERC721Holder, ERC1155Holder {
contract MyAccountERC7702 is Account, SignerEIP7702, ERC7821, ERC721Holder, ERC1155Holder {
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Import fails: SignerEIP7702.sol not found (rename source file).

CI error shows this import path doesn’t exist yet. After renaming the signer file to SignerEIP7702.sol (in the signers folder), this will compile.


🏁 Script executed:

#!/bin/bash
# Confirm the import target exists after the rename
test -f contracts/utils/cryptography/signers/SignerEIP7702.sol && echo "OK: SignerEIP7702.sol present" || (echo "Missing SignerEIP7702.sol" && exit 1)

Length of output: 25


Fix missing import: add or rename SignerEIP7702.sol or update the import

contracts/mocks/docs/account/MyAccountERC7702.sol (lines 9-11) imports contracts/utils/cryptography/signers/SignerEIP7702.sol, but that file is missing (local check returned "Missing SignerEIP7702.sol") — either create/rename the signer file at that path or change the import to the correct filename.

🧰 Tools
🪛 GitHub Actions: checks

[error] 9-9: forge test -vvv: Source 'contracts/utils/cryptography/signers/SignerEIP7702.sol' not found: File not found. Searched the following locations: '/home/runner/work/openzeppelin-contracts/openzeppelin-contracts'.

🪛 GitHub Actions: formal verification

[error] 9-9: Source 'contracts/utils/cryptography/signers/SignerEIP7702.sol' not found.

🤖 Prompt for AI Agents
In contracts/mocks/docs/account/MyAccountERC7702.sol around lines 9-11 the
import for "../../../utils/cryptography/signers/SignerEIP7702.sol" points to a
missing file; either add or rename the signer source to that exact path and
filename (SignerEIP7702.sol) exporting the SignerEIP7702 contract, or update
this import to the actual existing signer filename/path (and adjust the contract
inheritance if the contract name differs) so the compiler can locate the signer
implementation.

@Amxx
Copy link
Collaborator

Amxx commented Sep 14, 2025

This is a breaking change. We cannot do that before v6.0

@Amxx Amxx added the breaking change Changes that break backwards compatibility of the public API. label Sep 14, 2025
@Amxx Amxx added this to the 6.0 milestone Sep 14, 2025
@akronim26
Copy link
Contributor Author

This is a breaking change. We cannot do that before v6.0

Got it! So this will be merged as part of v6.0, right?

@Amxx
Copy link
Collaborator

Amxx commented Sep 16, 2025

Update: we decided to do some "import related" breaking changes in 5.5

@Amxx Amxx modified the milestones: 6.0, 5.5 Sep 16, 2025
Copy link
Member

@ernestognw ernestognw left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks 🙌

@Amxx Amxx merged commit 0fc8e4b into OpenZeppelin:master Sep 16, 2025
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Changes that break backwards compatibility of the public API. ignore-changeset

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename SignerERC7702 as SignerEIP7702

3 participants