Skip to content

Commit a0a1d42

Browse files
authored
Better variable naming of the SafeTx struct hash in EIP-712 hashing (#846)
This pull request includes changes in the `Safe` contract in the `contracts/Safe.sol` file. The changes involve renaming a variable for clarity. Variable renaming for clarity: * [`contracts/Safe.sol`](diffhunk://#diff-587b494ea631bb6b7adf4fc3e1a2e6a277a385ff16e1163b26e39de24e9483deL415-R415): Renamed the variable `safeTxHash` to `safeTxStructHash` to better reflect its purpose in the `encodeTransactionData` function. [[1]](diffhunk://#diff-587b494ea631bb6b7adf4fc3e1a2e6a277a385ff16e1163b26e39de24e9483deL415-R415) [[2]](diffhunk://#diff-587b494ea631bb6b7adf4fc3e1a2e6a277a385ff16e1163b26e39de24e9483deL430-R430)
1 parent 95c0ce1 commit a0a1d42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contracts/Safe.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ contract Safe is
412412
address refundReceiver,
413413
uint256 _nonce
414414
) private view returns (bytes memory) {
415-
bytes32 safeTxHash = keccak256(
415+
bytes32 safeTxStructHash = keccak256(
416416
abi.encode(
417417
SAFE_TX_TYPEHASH,
418418
to,
@@ -427,7 +427,7 @@ contract Safe is
427427
_nonce
428428
)
429429
);
430-
return abi.encodePacked(bytes1(0x19), bytes1(0x01), domainSeparator(), safeTxHash);
430+
return abi.encodePacked(bytes1(0x19), bytes1(0x01), domainSeparator(), safeTxStructHash);
431431
}
432432

433433
/**

0 commit comments

Comments
 (0)