@@ -42,11 +42,6 @@ contract GnosisSafe is
4242 // );
4343 bytes32 private constant SAFE_TX_TYPEHASH = 0xbb8310d486368db6bd6f849402fdd73ad53d316b5a4b2644ad6efe0f941286d8 ;
4444
45- //keccak256(
46- // "SafeMessage(bytes message)"
47- //);
48- bytes32 private constant SAFE_MSG_TYPEHASH = 0x60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca ;
49-
5045 event SafeSetup (address indexed initiator , address [] owners , uint256 threshold , address initializer , address fallbackHandler );
5146 event ApproveHash (bytes32 indexed approvedHash , address indexed owner );
5247 event SignMsg (bytes32 indexed msgHash );
@@ -149,8 +144,8 @@ contract GnosisSafe is
149144 txHash = keccak256 (txHashData);
150145 checkSignatures (txHash, txHashData, signatures);
151146 }
147+ address guard = getGuard ();
152148 {
153- address guard = getGuard ();
154149 if (guard != address (0 )) {
155150 Guard (guard).checkTransaction (
156151 // Transaction info
@@ -191,6 +186,11 @@ contract GnosisSafe is
191186 if (success) emit ExecutionSuccess (txHash, payment);
192187 else emit ExecutionFailure (txHash, payment);
193188 }
189+ {
190+ if (guard != address (0 )) {
191+ Guard (guard).checkAfterExecution (txHash, success);
192+ }
193+ }
194194 }
195195
196196 function handlePayment (
@@ -336,17 +336,6 @@ contract GnosisSafe is
336336 emit ApproveHash (hashToApprove, msg .sender );
337337 }
338338
339- /**
340- * @dev Marks a message as signed, so that it can be used with EIP-1271
341- * @notice Marks a message (`_data`) as signed.
342- * @param _data Arbitrary length data that should be marked as signed on the behalf of address(this)
343- */
344- function signMessage (bytes calldata _data ) external authorized {
345- bytes32 msgHash = getMessageHash (_data);
346- signedMessages[msgHash] = 1 ;
347- emit SignMsg (msgHash);
348- }
349-
350339 /// @dev Returns the chain id used by this contract.
351340 function getChainId () public view returns (uint256 ) {
352341 uint256 id;
@@ -361,14 +350,6 @@ contract GnosisSafe is
361350 return keccak256 (abi.encode (DOMAIN_SEPARATOR_TYPEHASH, getChainId (), this ));
362351 }
363352
364- /// @dev Returns hash of a message that can be signed by owners.
365- /// @param message Message that should be hashed
366- /// @return Message hash.
367- function getMessageHash (bytes memory message ) public view returns (bytes32 ) {
368- bytes32 safeMessageHash = keccak256 (abi.encode (SAFE_MSG_TYPEHASH, keccak256 (message)));
369- return keccak256 (abi.encodePacked (bytes1 (0x19 ), bytes1 (0x01 ), domainSeparator (), safeMessageHash));
370- }
371-
372353 /// @dev Returns the bytes that are hashed to be signed by owners.
373354 /// @param to Destination address.
374355 /// @param value Ether value.
0 commit comments