Skip to content

Commit e30bd56

Browse files
committed
Rename ERC7739Signer to ERC7739
1 parent 32e3c49 commit e30bd56

File tree

14 files changed

+47
-43
lines changed

14 files changed

+47
-43
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 13-01-2025
2+
3+
- Rename `ERC7739Signer` into `ERC7739` to avoid confusion with the `AbstractSigner` family of contracts.
4+
15
## 23-12-2024
26

37
- `AccountERC7821`: Account implementation that implements ERC-7821 for minimal batch execution interface. No support for additional `opData` is included.

contracts/account/Account.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pragma solidity ^0.8.20;
44

55
import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";
66
import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
7-
import {ERC7739Signer} from "../utils/cryptography/ERC7739Signer.sol";
7+
import {ERC7739} from "../utils/cryptography/ERC7739.sol";
88
import {AccountCore} from "./AccountCore.sol";
99
import {AccountERC7821} from "./extensions/AccountERC7821.sol";
1010

@@ -13,9 +13,9 @@ import {AccountERC7821} from "./extensions/AccountERC7821.sol";
1313
*
1414
* * {AccountERC7821} for performing external calls in batches.
1515
* * {ERC721Holder} and {ERC1155Holder} to accept ERC-712 and ERC-1155 token transfers transfers.
16-
* * {ERC7739Signer} for ERC-1271 signature support with ERC-7739 replay protection
16+
* * {ERC7739} for ERC-1271 signature support with ERC-7739 replay protection
1717
*
18-
* NOTE: To use this contract, the {ERC7739Signer-_rawSignatureValidation} function must be
18+
* NOTE: To use this contract, the {ERC7739-_rawSignatureValidation} function must be
1919
* implemented using a specific signature verification algorithm. See {SignerECDSA}, {SignerP256} or {SignerRSA}.
2020
*/
21-
abstract contract Account is AccountCore, AccountERC7821, ERC721Holder, ERC1155Holder, ERC7739Signer {}
21+
abstract contract Account is AccountCore, AccountERC7821, ERC721Holder, ERC1155Holder, ERC7739 {}

contracts/mocks/docs/utils/cryptography/ERC7739SignerECDSA.sol

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

55
import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
66
import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
77

8-
import {ERC7739Signer} from "../../../../utils/cryptography/ERC7739Signer.sol";
8+
import {ERC7739} from "../../../../utils/cryptography/ERC7739.sol";
99

10-
contract ERC7739SignerECDSA is ERC7739Signer {
10+
contract ERC7739ECDSA is ERC7739 {
1111
address private immutable _signer;
1212

13-
constructor(address signerAddr) EIP712("ERC7739SignerECDSA", "1") {
13+
constructor(address signerAddr) EIP712("ERC7739ECDSA", "1") {
1414
_signer = signerAddr;
1515
}
1616

contracts/mocks/utils/cryptography/ERC7739SignerECDSAMock.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ pragma solidity ^0.8.20;
44

55
import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
66
import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
7-
import {ERC7739Signer} from "../../../utils/cryptography/ERC7739Signer.sol";
7+
import {ERC7739} from "../../../utils/cryptography/ERC7739.sol";
88
import {SignerECDSA} from "../../../utils/cryptography/SignerECDSA.sol";
99

10-
contract ERC7739SignerECDSAMock is ERC7739Signer, SignerECDSA {
11-
constructor(address signerAddr) EIP712("ERC7739SignerECDSA", "1") {
10+
contract ERC7739ECDSAMock is ERC7739, SignerECDSA {
11+
constructor(address signerAddr) EIP712("ERC7739ECDSA", "1") {
1212
_initializeSigner(signerAddr);
1313
}
1414
}

contracts/mocks/utils/cryptography/ERC7739SignerP256Mock.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
pragma solidity ^0.8.20;
44

55
import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
6-
import {ERC7739Signer} from "../../../utils/cryptography/ERC7739Signer.sol";
6+
import {ERC7739} from "../../../utils/cryptography/ERC7739.sol";
77
import {SignerP256} from "../../../utils/cryptography/SignerP256.sol";
88

9-
contract ERC7739SignerP256Mock is ERC7739Signer, SignerP256 {
10-
constructor(bytes32 qx, bytes32 qy) EIP712("ERC7739SignerP256", "1") {
9+
contract ERC7739P256Mock is ERC7739, SignerP256 {
10+
constructor(bytes32 qx, bytes32 qy) EIP712("ERC7739P256", "1") {
1111
_initializeSigner(qx, qy);
1212
}
1313
}

contracts/mocks/utils/cryptography/ERC7739SignerRSAMock.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
pragma solidity ^0.8.20;
44

55
import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
6-
import {ERC7739Signer} from "../../../utils/cryptography/ERC7739Signer.sol";
6+
import {ERC7739} from "../../../utils/cryptography/ERC7739.sol";
77
import {SignerRSA} from "../../../utils/cryptography/SignerRSA.sol";
88

9-
contract ERC7739SignerRSAMock is ERC7739Signer, SignerRSA {
10-
constructor(bytes memory e, bytes memory n) EIP712("ERC7739SignerRSA", "1") {
9+
contract ERC7739RSAMock is ERC7739, SignerRSA {
10+
constructor(bytes memory e, bytes memory n) EIP712("ERC7739RSA", "1") {
1111
_initializeSigner(e, n);
1212
}
1313
}

contracts/utils/README.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ NOTE: This document is better viewed at https://docs.openzeppelin.com/community-
66
Miscellaneous contracts and libraries containing utility functions you can use to improve security, work with new data types, or safely use low-level primitives.
77

88
* {AbstractSigner}: Abstract contract for internal signature validation in smart contracts.
9-
* {ERC7739Signer}: An abstract contract to validate signatures following the rehashing scheme from `ERC7739Utils`.
9+
* {ERC7739}: An abstract contract to validate signatures following the rehashing scheme from `ERC7739Utils`.
1010
* {ERC7739Utils}: Utilities library that implements a defensive rehashing mechanism to prevent replayability of smart contract signatures based on ERC-7739.
1111
* {SignerECDSA}, {SignerP256}, {SignerRSA}: Implementations of an {AbstractSigner} with specific signature validation algorithms.
1212
* {Masks}: Library to handle `bytes32` masks.
@@ -15,7 +15,7 @@ Miscellaneous contracts and libraries containing utility functions you can use t
1515

1616
{{AbstractSigner}}
1717

18-
{{ERC7739Signer}}
18+
{{ERC7739}}
1919

2020
{{ERC7739Utils}}
2121

contracts/utils/cryptography/ERC7739Signer.sol renamed to contracts/utils/cryptography/ERC7739.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import {ERC7739Utils} from "./ERC7739Utils.sol";
2424
* may limit the ability of the signer to be used within the ERC-4337 validation phase (due to
2525
* https://eips.ethereum.org/EIPS/eip-7562#storage-rules[ERC-7562 storage access rules]).
2626
*/
27-
abstract contract ERC7739Signer is AbstractSigner, EIP712, IERC1271 {
27+
abstract contract ERC7739 is AbstractSigner, EIP712, IERC1271 {
2828
using ERC7739Utils for *;
2929
using MessageHashUtils for bytes32;
3030

test/account/AccountECDSA.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const {
88
shouldBehaveLikeAccountERC7821,
99
shouldBehaveLikeAccountHolder,
1010
} = require('./Account.behavior');
11-
const { shouldBehaveLikeERC7739Signer } = require('../utils/cryptography/ERC7739Signer.behavior');
11+
const { shouldBehaveLikeERC7739 } = require('../utils/cryptography/ERC7739.behavior');
1212

1313
async function fixture() {
1414
// EOAs and environment
@@ -48,12 +48,12 @@ describe('AccountECDSA', function () {
4848
shouldBehaveLikeAccountERC7821();
4949
shouldBehaveLikeAccountHolder();
5050

51-
describe('ERC7739Signer', function () {
51+
describe('ERC7739', function () {
5252
beforeEach(async function () {
5353
this.mock = await this.mock.deploy();
5454
this.signTypedData = this.signer.signTypedData.bind(this.signer);
5555
});
5656

57-
shouldBehaveLikeERC7739Signer();
57+
shouldBehaveLikeERC7739();
5858
});
5959
});

test/account/AccountERC7702.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const {
88
shouldBehaveLikeAccountERC7821,
99
shouldBehaveLikeAccountHolder,
1010
} = require('./Account.behavior');
11-
const { shouldBehaveLikeERC7739Signer } = require('../utils/cryptography/ERC7739Signer.behavior');
11+
const { shouldBehaveLikeERC7739 } = require('../utils/cryptography/ERC7739.behavior');
1212

1313
async function fixture() {
1414
// EOAs and environment
@@ -48,12 +48,12 @@ describe('AccountERC7702', function () {
4848
shouldBehaveLikeAccountERC7821({ deployable: false });
4949
shouldBehaveLikeAccountHolder();
5050

51-
describe('ERC7739Signer', function () {
51+
describe('ERC7739', function () {
5252
beforeEach(async function () {
5353
this.mock = await this.mock.deploy();
5454
this.signTypedData = this.signer.signTypedData.bind(this.signer);
5555
});
5656

57-
shouldBehaveLikeERC7739Signer();
57+
shouldBehaveLikeERC7739();
5858
});
5959
});

0 commit comments

Comments
 (0)