Move ECDSA message hash methods to its own MessageHashUtils library (#4430)
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com> Co-authored-by: Francisco <fg@frang.io>
This commit is contained in:
@ -126,20 +126,20 @@ index df141192..1cf90ad1 100644
|
||||
"keywords": [
|
||||
"solidity",
|
||||
diff --git a/contracts/utils/cryptography/EIP712.sol b/contracts/utils/cryptography/EIP712.sol
|
||||
index ff34e814..a9d08d5c 100644
|
||||
index 36f076e5..90c1db78 100644
|
||||
--- a/contracts/utils/cryptography/EIP712.sol
|
||||
+++ b/contracts/utils/cryptography/EIP712.sol
|
||||
@@ -4,7 +4,6 @@
|
||||
pragma solidity ^0.8.19;
|
||||
|
||||
import {ECDSA} from "./ECDSA.sol";
|
||||
import {MessageHashUtils} from "./MessageHashUtils.sol";
|
||||
-import {ShortStrings, ShortString} from "../ShortStrings.sol";
|
||||
import {IERC5267} from "../../interfaces/IERC5267.sol";
|
||||
|
||||
/**
|
||||
@@ -27,28 +26,18 @@ import {IERC5267} from "../../interfaces/IERC5267.sol";
|
||||
@@ -28,28 +27,18 @@ import {IERC5267} from "../../interfaces/IERC5267.sol";
|
||||
* NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain
|
||||
* separator of the implementation contract. This will cause the `_domainSeparatorV4` function to always rebuild the
|
||||
* separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the
|
||||
* separator from the immutable values, which is cheaper than accessing a cached version in cold storage.
|
||||
- *
|
||||
- * @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment
|
||||
@ -170,7 +170,7 @@ index ff34e814..a9d08d5c 100644
|
||||
|
||||
/**
|
||||
* @dev Initializes the domain separator and parameter caches.
|
||||
@@ -63,29 +52,23 @@ abstract contract EIP712 is IERC5267 {
|
||||
@@ -64,29 +53,23 @@ abstract contract EIP712 is IERC5267 {
|
||||
* contract upgrade].
|
||||
*/
|
||||
constructor(string memory name, string memory version) {
|
||||
@ -208,7 +208,7 @@ index ff34e814..a9d08d5c 100644
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -124,6 +107,10 @@ abstract contract EIP712 is IERC5267 {
|
||||
@@ -125,6 +108,10 @@ abstract contract EIP712 is IERC5267 {
|
||||
uint256[] memory extensions
|
||||
)
|
||||
{
|
||||
@ -219,7 +219,7 @@ index ff34e814..a9d08d5c 100644
|
||||
return (
|
||||
hex"0f", // 01111
|
||||
_EIP712Name(),
|
||||
@@ -138,22 +125,62 @@ abstract contract EIP712 is IERC5267 {
|
||||
@@ -139,22 +126,62 @@ abstract contract EIP712 is IERC5267 {
|
||||
/**
|
||||
* @dev The name parameter for the EIP712 domain.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user