We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b9d6cb commit 6faa4b6Copy full SHA for 6faa4b6
src/modules/ReplaySafeWrapper.sol
@@ -26,7 +26,13 @@ abstract contract ReplaySafeWrapper is ModuleEIP712 {
26
});
27
}
28
29
- function _hashStruct(bytes32 hash) internal view virtual returns (bytes32) {
30
- return keccak256(abi.encode(_REPLAY_SAFE_HASH_TYPEHASH, hash));
+ function _hashStruct(bytes32 hash) internal pure virtual returns (bytes32) {
+ bytes32 res;
31
+ assembly ("memory-safe") {
32
+ mstore(0x00, _REPLAY_SAFE_HASH_TYPEHASH)
33
+ mstore(0x20, hash)
34
+ res := keccak256(0x00, 0x40)
35
+ }
36
+ return res;
37
38
0 commit comments