11// SPDX-License-Identifier: LGPL-3.0-only
2- pragma solidity >= 0.7.0 < 0.8 .0 ;
2+ pragma solidity >= 0.7.0 < 0.9 .0 ;
33
44import "./base/ModuleManager.sol " ;
55import "./base/OwnerManager.sol " ;
66import "./base/FallbackManager.sol " ;
77import "./common/EtherPaymentFallback.sol " ;
8- import "./common/MasterCopy .sol " ;
8+ import "./common/Singleton .sol " ;
99import "./common/SignatureDecoder.sol " ;
1010import "./common/SecuredTokenTransfer.sol " ;
1111import "./common/StorageAccessible.sol " ;
@@ -16,7 +16,7 @@ import "./external/GnosisSafeMath.sol";
1616/// @author Stefan George - <stefan@gnosis.io>
1717/// @author Richard Meissner - <richard@gnosis.io>
1818contract GnosisSafe
19- is EtherPaymentFallback , MasterCopy , ModuleManager , OwnerManager , SignatureDecoder , SecuredTokenTransfer , ISignatureValidatorConstants , FallbackManager , StorageAccessible {
19+ is EtherPaymentFallback , Singleton , ModuleManager , OwnerManager , SignatureDecoder , SecuredTokenTransfer , ISignatureValidatorConstants , FallbackManager , StorageAccessible {
2020
2121 using GnosisSafeMath for uint256 ;
2222
@@ -63,7 +63,7 @@ contract GnosisSafe
6363 constructor () {
6464 // By setting the threshold it is not possible to call setup anymore,
6565 // so we create a Safe with 0 owners and threshold 1.
66- // This is an unusable Safe, perfect for the mastercopy
66+ // This is an unusable Safe, perfect for the singleton
6767 threshold = 1 ;
6868 }
6969
@@ -116,16 +116,16 @@ contract GnosisSafe
116116 function execTransaction (
117117 address to ,
118118 uint256 value ,
119- bytes calldata data ,
119+ bytes memory data ,
120120 Enum.Operation operation ,
121121 uint256 safeTxGas ,
122122 uint256 baseGas ,
123123 uint256 gasPrice ,
124124 address gasToken ,
125125 address payable refundReceiver ,
126- bytes calldata signatures
126+ bytes memory signatures
127127 )
128- external
128+ public
129129 payable
130130 returns (bool success )
131131 {
@@ -307,29 +307,6 @@ contract GnosisSafe
307307 signedMessages[msgHash] = 1 ;
308308 emit SignMsg (msgHash);
309309 }
310-
311- /**
312- * Implementation of ISignatureValidator (see `interfaces/ISignatureValidator.sol`)
313- * @dev Should return whether the signature provided is valid for the provided data.
314- * The save does not implement the interface since `checkSignatures` is not a view method.
315- * The method will not perform any state changes (see parameters of `checkSignatures`)
316- * @param _data Arbitrary length data signed on the behalf of address(this)
317- * @param _signature Signature byte array associated with _data
318- * @return a bool upon valid or invalid signature with corresponding _data
319- */
320- function isValidSignature (bytes calldata _data , bytes calldata _signature )
321- external
322- view
323- returns (bytes4 )
324- {
325- bytes32 messageHash = getMessageHash (_data);
326- if (_signature.length == 0 ) {
327- require (signedMessages[messageHash] != 0 , "Hash not approved " );
328- } else {
329- checkSignatures (messageHash, _data, _signature);
330- }
331- return EIP1271_MAGIC_VALUE;
332- }
333310
334311 /// @dev Returns the chain id used by this contract.
335312 function getChainId () public view returns (uint256 ) {
0 commit comments