Skip to content

Commit

Permalink
Better variable naming of the SafeTx struct hash in EIP-712 hashing (#…
Browse files Browse the repository at this point in the history
…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)
  • Loading branch information
mmv08 authored Oct 18, 2024
1 parent 95c0ce1 commit a0a1d42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/Safe.sol
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ contract Safe is
address refundReceiver,
uint256 _nonce
) private view returns (bytes memory) {
bytes32 safeTxHash = keccak256(
bytes32 safeTxStructHash = keccak256(
abi.encode(
SAFE_TX_TYPEHASH,
to,
Expand All @@ -427,7 +427,7 @@ contract Safe is
_nonce
)
);
return abi.encodePacked(bytes1(0x19), bytes1(0x01), domainSeparator(), safeTxHash);
return abi.encodePacked(bytes1(0x19), bytes1(0x01), domainSeparator(), safeTxStructHash);
}

/**
Expand Down

0 comments on commit a0a1d42

Please sign in to comment.