Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Certora Audit] I-02. Some comments say keccak instead of keccak256 #886

Merged
merged 2 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contracts/common/SecuredTokenTransfer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ abstract contract SecuredTokenTransfer {
* @return transferred Returns true if the transfer was successful
*/
function transferToken(address token, address receiver, uint256 amount) internal returns (bool transferred) {
// 0xa9059cbb - keccak("transfer(address,uint256)")
// 0xa9059cbb - bytes4(keccak256("transfer(address,uint256)"))
bytes memory data = abi.encodeWithSelector(0xa9059cbb, receiver, amount);
/* solhint-disable no-inline-assembly */
/// @solidity memory-safe-assembly
Expand Down
2 changes: 1 addition & 1 deletion contracts/proxies/SafeProxy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ contract SafeProxy {
/* solhint-disable no-inline-assembly */
assembly {
let _singleton := sload(0)
// 0xa619486e == keccak("masterCopy()"). The value is right padded to 32-bytes with 0s
// 0xa619486e == bytes4(keccak256("masterCopy()")). The value is right padded to 32-bytes with 0s
if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) {
// We mask the singleton address when handling the `masterCopy()` call to ensure that it is correctly
// ABI-encoded. We do this by shifting the address left by 96 bits (or 12 bytes) and then storing it in
Expand Down
Loading