Skip to content

Commit 2518fbd

Browse files
authored
Remove ERC7702 mentions in favor of EIP7702 (#6044)
1 parent de87771 commit 2518fbd

File tree

13 files changed

+41
-41
lines changed

13 files changed

+41
-41
lines changed

certora/harnesses/AccountHarness.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.26;
33

4-
import {AccountERC7702WithModulesMock} from "../patched/mocks/account/AccountMock.sol";
4+
import {AccountEIP7702WithModulesMock} from "../patched/mocks/account/AccountMock.sol";
55
import {EIP712} from "../patched/utils/cryptography/EIP712.sol";
66
import {EnumerableSet} from "../patched/utils/structs/EnumerableSet.sol";
77

8-
contract AccountHarness is AccountERC7702WithModulesMock {
8+
contract AccountHarness is AccountEIP7702WithModulesMock {
99
using EnumerableSet for EnumerableSet.AddressSet;
1010

1111
constructor(string memory name, string memory version) EIP712(name, version) {}

contracts/account/extensions/draft-AccountERC7579.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ abstract contract AccountERC7579 is Account, IERC1271, IERC7579Execution, IERC75
400400
* actual copy. However, this would require `_installModule` to get a calldata bytes object instead of a memory
401401
* bytes object. This would prevent calling `_installModule` from a contract constructor and would force the use
402402
* of external initializers. That may change in the future, as most accounts will probably be deployed as
403-
* clones/proxy/ERC-7702 delegates and therefore rely on initializers anyway.
403+
* clones/proxy/EIP-7702 delegates and therefore rely on initializers anyway.
404404
*/
405405
function _decodeFallbackData(
406406
bytes memory data

contracts/account/utils/EIP7702Utils.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pragma solidity ^0.8.20;
66
/**
77
* @dev Library with common EIP-7702 utility functions.
88
*
9-
* See https://eips.ethereum.org/EIPS/eip-7702[ERC-7702].
9+
* See https://eips.ethereum.org/EIPS/eip-7702[EIP-7702].
1010
*/
1111
library EIP7702Utils {
1212
bytes3 internal constant EIP7702_PREFIX = 0xef0100;

contracts/mocks/account/AccountMock.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ abstract contract AccountWebAuthnMock is Account, SignerWebAuthn, ERC7739, ERC78
8181
}
8282
}
8383

84-
abstract contract AccountERC7702Mock is Account, SignerEIP7702, ERC7739, ERC7821, ERC721Holder, ERC1155Holder {
84+
abstract contract AccountEIP7702Mock is Account, SignerEIP7702, ERC7739, ERC7821, ERC721Holder, ERC1155Holder {
8585
/// @inheritdoc ERC7821
8686
function _erc7821AuthorizedExecutor(
8787
address caller,
@@ -92,7 +92,7 @@ abstract contract AccountERC7702Mock is Account, SignerEIP7702, ERC7739, ERC7821
9292
}
9393
}
9494

95-
abstract contract AccountERC7702WithModulesMock is
95+
abstract contract AccountEIP7702WithModulesMock is
9696
Account,
9797
AccountERC7579,
9898
SignerEIP7702,
@@ -119,7 +119,7 @@ abstract contract AccountERC7702WithModulesMock is
119119
return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;
120120
}
121121

122-
/// @dev Enable signature using the ERC-7702 signer.
122+
/// @dev Enable signature using the EIP-7702 signer.
123123
function _rawSignatureValidation(
124124
bytes32 hash,
125125
bytes calldata signature

contracts/mocks/docs/account/MyAccountERC7702.sol renamed to contracts/mocks/docs/account/MyAccountEIP7702.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// contracts/MyAccountERC7702.sol
1+
// contracts/MyAccountEIP7702.sol
22
// SPDX-License-Identifier: MIT
33
pragma solidity ^0.8.20;
44

@@ -8,7 +8,7 @@ import {ERC1155Holder} from "../../../token/ERC1155/utils/ERC1155Holder.sol";
88
import {ERC7821} from "../../../account/extensions/draft-ERC7821.sol";
99
import {SignerEIP7702} from "../../../utils/cryptography/signers/SignerEIP7702.sol";
1010

11-
contract MyAccountERC7702 is Account, SignerEIP7702, ERC7821, ERC721Holder, ERC1155Holder {
11+
contract MyAccountEIP7702 is Account, SignerEIP7702, ERC7821, ERC721Holder, ERC1155Holder {
1212
/// @dev Allows the entry point as an authorized executor.
1313
function _erc7821AuthorizedExecutor(
1414
address caller,

contracts/utils/cryptography/signers/SignerEIP7702.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {AbstractSigner} from "./AbstractSigner.sol";
77
import {ECDSA} from "../ECDSA.sol";
88

99
/**
10-
* @dev Implementation of {AbstractSigner} for implementation for an EOA. Useful for ERC-7702 accounts.
10+
* @dev Implementation of {AbstractSigner} for implementation for an EOA. Useful for EIP-7702 accounts.
1111
*
1212
* @custom:stateless
1313
*/

docs/modules/ROOT/pages/accounts.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ https://eips.ethereum.org/EIPS/eip-7702[EIP-7702] lets EOAs delegate to smart co
343343

344344
The signature verification stays compatible: delegated EOAs are treated as contracts using ERC-1271, making it easy to redelegate to a contract with ERC-1271 support with little overhead by reusing the validation mechanism of the account.
345345

346-
TIP: Learn more about delegating to an ERC-7702 account in our xref:eoa-delegation.adoc[EOA Delegation] section.
346+
TIP: Learn more about delegating to an EIP-7702 account in our xref:eoa-delegation.adoc[EOA Delegation] section.
347347

348348
=== ERC-7579 Modules
349349

docs/modules/ROOT/pages/eoa-delegation.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ https://eips.ethereum.org/EIPS/eip-7702[EIP-7702] introduces a new transaction t
66
* Sponsoring transactions for other users.
77
* Implementing privilege de-escalation (e.g., sub-keys with limited permissions)
88
9-
This section walks you through the process of delegating an EOA to a contract following https://eips.ethereum.org/EIPS/eip-7702[ERC-7702]. This allows you to use your EOA's private key to sign and execute operations with custom execution logic. Combined with https://eips.ethereum.org/EIPS/eip-4337[ERC-4337] infrastructure, users can achieve gas sponsoring through https://docs.openzeppelin.com/community-contracts/paymasters[paymasters].
9+
This section walks you through the process of delegating an EOA to a contract following https://eips.ethereum.org/EIPS/eip-7702[EIP-7702]. This allows you to use your EOA's private key to sign and execute operations with custom execution logic. Combined with https://eips.ethereum.org/EIPS/eip-4337[ERC-4337] infrastructure, users can achieve gas sponsoring through https://docs.openzeppelin.com/community-contracts/paymasters[paymasters].
1010

1111
== Delegating execution
1212

1313
EIP-7702 enables EOAs to delegate their execution capabilities to smart contracts, effectively bridging the gap between traditional and xref:accounts.adoc[Smart Accounts]. The xref:api:utils/cryptography.adoc#[`SignerEIP7702`] utility facilitates this delegation by verifying signatures against the EOA's address (`address(this)`), making it easier to implement EIP-7702 in smart contract accounts.
1414

1515
[source,solidity]
1616
----
17-
include::api:example$account/MyAccountERC7702.sol[]
17+
include::api:example$account/MyAccountEIP7702.sol[]
1818
----
1919

2020
TIP: Users can delegate to an instance of xref:api:account.adoc#ERC7821[`ERC-7821`] for a minimal batch executor that does not use ERC-4337 related code.

scripts/upgradeable/upgradeable.patch

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -361,30 +361,30 @@ index 304d1386a..a1cd63bee 100644
361361
-@openzeppelin/contracts/=contracts/
362362
+@openzeppelin/contracts-upgradeable/=contracts/
363363
+@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/
364-
diff --git a/test/account/AccountERC7702.test.js b/test/account/AccountERC7702.test.js
364+
diff --git a/test/account/AccountEIP7702.test.js b/test/account/AccountEIP7702.test.js
365365
index f442d49af..8f22dc926 100644
366-
--- a/test/account/AccountERC7702.test.js
367-
+++ b/test/account/AccountERC7702.test.js
366+
--- a/test/account/AccountEIP7702.test.js
367+
+++ b/test/account/AccountEIP7702.test.js
368368
@@ -26,8 +26,8 @@ async function fixture() {
369369

370370
// domain cannot be fetched using getDomain(mock) before the mock is deployed
371371
const domain = {
372-
- name: 'AccountERC7702Mock',
372+
- name: 'AccountEIP7702Mock',
373373
- version: '1',
374374
+ name: '', // Not initialized in the context of signer
375375
+ version: '', // Not initialized in the context of signer
376376
chainId: entrypointDomain.chainId,
377377
verifyingContract: mock.address,
378378
};
379-
diff --git a/test/account/examples/AccountERC7702WithModulesMock.test.js b/test/account/examples/AccountERC7702WithModulesMock.test.js
379+
diff --git a/test/account/examples/AccountEIP7702WithModulesMock.test.js b/test/account/examples/AccountEIP7702WithModulesMock.test.js
380380
index 8ceab19d1..c3f4194a6 100644
381-
--- a/test/account/examples/AccountERC7702WithModulesMock.test.js
382-
+++ b/test/account/examples/AccountERC7702WithModulesMock.test.js
381+
--- a/test/account/examples/AccountEIP7702WithModulesMock.test.js
382+
+++ b/test/account/examples/AccountEIP7702WithModulesMock.test.js
383383
@@ -36,8 +36,8 @@ async function fixture() {
384384

385385
// domain cannot be fetched using getDomain(mock) before the mock is deployed
386386
const domain = {
387-
- name: 'AccountERC7702WithModulesMock',
387+
- name: 'AccountEIP7702WithModulesMock',
388388
- version: '1',
389389
+ name: '', // Not initialized in the context of signer
390390
+ version: '', // Not initialized in the context of signer

test/account/AccountERC7702.t.sol renamed to test/account/AccountEIP7702.t.sol

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pragma solidity ^0.8.20;
33

44
import {Test} from "forge-std/Test.sol";
5-
import {AccountERC7702Mock} from "@openzeppelin/contracts/mocks/account/AccountMock.sol";
5+
import {AccountEIP7702Mock} from "@openzeppelin/contracts/mocks/account/AccountMock.sol";
66
import {CallReceiverMock} from "@openzeppelin/contracts/mocks/CallReceiverMock.sol";
77
import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
88
import {
@@ -17,11 +17,11 @@ import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
1717
import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";
1818
import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";
1919

20-
contract AccountERC7702MockConstructor is AccountERC7702Mock {
20+
contract AccountEIP7702MockConstructor is AccountEIP7702Mock {
2121
constructor() EIP712("MyAccount", "1") {}
2222
}
2323

24-
contract AccountERC7702Test is Test {
24+
contract AccountEIP7702Test is Test {
2525
using ERC7579Utils for *;
2626
using ERC4337Utils for PackedUserOperation;
2727
using Strings for *;
@@ -33,19 +33,19 @@ contract AccountERC7702Test is Test {
3333

3434
// ERC-4337 signer
3535
uint256 private _signerPrivateKey;
36-
AccountERC7702MockConstructor private _signer;
36+
AccountEIP7702MockConstructor private _signer;
3737

3838
function setUp() public {
3939
// Deploy target contract
4040
_target = new CallReceiverMock();
4141

4242
// Setup signer
4343
_signerPrivateKey = 0x1234;
44-
_signer = AccountERC7702MockConstructor(payable(vm.addr(_signerPrivateKey)));
44+
_signer = AccountEIP7702MockConstructor(payable(vm.addr(_signerPrivateKey)));
4545
vm.deal(address(_signer), MAX_ETH);
4646

4747
// Sign and attach delegation
48-
vm.signAndAttachDelegation(address(new AccountERC7702MockConstructor()), _signerPrivateKey);
48+
vm.signAndAttachDelegation(address(new AccountEIP7702MockConstructor()), _signerPrivateKey);
4949

5050
// Setup entrypoint
5151
address entrypoint = address(ERC4337Utils.ENTRYPOINT_V08);

0 commit comments

Comments
 (0)