diff --git a/contracts/common/SecuredTokenTransfer.sol b/contracts/common/SecuredTokenTransfer.sol index 359eb231a..382bcb059 100644 --- a/contracts/common/SecuredTokenTransfer.sol +++ b/contracts/common/SecuredTokenTransfer.sol @@ -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 diff --git a/contracts/proxies/SafeProxy.sol b/contracts/proxies/SafeProxy.sol index 42e0f477c..10c4931af 100644 --- a/contracts/proxies/SafeProxy.sol +++ b/contracts/proxies/SafeProxy.sol @@ -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