mirror of https://github.com/status-im/EIPs.git
Automatically merged updates to draft EIP(s) 712
Hi, I'm a bot! This change was automatically merged because: - It only modifies existing Draft or Last Call EIP(s) - The PR was approved or written by at least one author of each modified EIP - The build is passing
This commit is contained in:
parent
5ebb523d28
commit
9991f4689b
|
@ -375,19 +375,19 @@ function hashStruct(Mail memory mail) pure returns (bytes32 hash) {
|
|||
|
||||
assembly {
|
||||
// Back up select memory
|
||||
let temp1 := mload(sub(order, 32))
|
||||
let temp2 := mload(add(order, 128))
|
||||
let temp1 := mload(sub(mail, 32))
|
||||
let temp2 := mload(add(mail, 128))
|
||||
|
||||
// Write typeHash and sub-hashes
|
||||
mstore(sub(mail, 32), typeHash)
|
||||
mstore(add(order, 64), contentsHash)
|
||||
mstore(add(mail, 64), contentsHash)
|
||||
|
||||
// Compute hash
|
||||
hash := keccak256(sub(order, 32), 128)
|
||||
hash := keccak256(sub(mail, 32), 128)
|
||||
|
||||
// Restore memory
|
||||
mstore(sub(order, 32), temp1)
|
||||
mstore(add(order, 64), temp2)
|
||||
mstore(sub(mail, 32), temp1)
|
||||
mstore(add(mail, 64), temp2)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue