1
- pragma solidity ^ 0.4.24 ;
1
+ pragma solidity ^ 0.5.0 ;
2
2
import "./base/BaseSafe.sol " ;
3
3
import "./common/MasterCopy.sol " ;
4
4
import "./common/SignatureDecoder.sol " ;
5
5
import "./common/SecuredTokenTransfer.sol " ;
6
6
import "./interfaces/ISignatureValidator.sol " ;
7
- import "openzeppelin-solidity/contracts/math /SafeMath.sol " ;
7
+ import "./external /SafeMath.sol " ;
8
8
9
9
/// @title Gnosis Safe - A multisignature wallet with support for confirmations using signed messages based on ERC191.
10
10
/// @author Stefan George - <[email protected] >
@@ -67,22 +67,15 @@ contract GnosisSafe is MasterCopy, BaseSafe, SignatureDecoder, SecuredTokenTrans
67
67
/// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).
68
68
/// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})
69
69
function execTransaction (
70
- <<<<<<< HEAD
71
70
address to ,
72
71
uint256 value ,
73
- bytes data ,
72
+ bytes memory data ,
74
73
Enum.Operation operation ,
75
- =======
76
- address to ,
77
- uint256 value ,
78
- bytes memory data ,
79
- Enum.Operation operation ,
80
- >>>>>>> dd768ad... Fix solidity 0.5.0 errors
81
74
uint256 safeTxGas ,
82
75
uint256 dataGas ,
83
76
uint256 gasPrice ,
84
77
address gasToken ,
85
- address refundReceiver ,
78
+ address payable refundReceiver ,
86
79
bytes memory signatures
87
80
)
88
81
public
@@ -115,13 +108,13 @@ contract GnosisSafe is MasterCopy, BaseSafe, SignatureDecoder, SecuredTokenTrans
115
108
uint256 dataGas ,
116
109
uint256 gasPrice ,
117
110
address gasToken ,
118
- address refundReceiver
111
+ address payable refundReceiver
119
112
)
120
113
private
121
114
{
122
115
uint256 amount = startGas.sub (gasleft ()).add (dataGas).mul (gasPrice);
123
116
// solium-disable-next-line security/no-tx-origin
124
- address receiver = refundReceiver == address (0 ) ? tx .origin : refundReceiver;
117
+ address payable receiver = refundReceiver == address (0 ) ? tx .origin : refundReceiver;
125
118
if (gasToken == address (0 )) {
126
119
// solium-disable-next-line security/no-send
127
120
require (receiver.send (amount), "Could not pay gas costs with ether " );
@@ -231,13 +224,8 @@ contract GnosisSafe is MasterCopy, BaseSafe, SignatureDecoder, SecuredTokenTrans
231
224
/**
232
225
* @dev Marks a message as signed
233
226
* @param _data Arbitrary length data that should be marked as signed on the behalf of address(this)
234
- <<<<<<< HEAD
235
- */
236
- function signMessage (bytes _data )
237
- =======
238
227
*/
239
228
function signMessage (bytes memory _data )
240
- >>>>>>> dd768ad... Fix solidity 0.5.0 errors
241
229
public
242
230
authorized
243
231
{
@@ -249,13 +237,8 @@ contract GnosisSafe is MasterCopy, BaseSafe, SignatureDecoder, SecuredTokenTrans
249
237
* @param _data Arbitrary length data signed on the behalf of address(this)
250
238
* @param _signature Signature byte array associated with _data
251
239
* @return a bool upon valid or invalid signature with corresponding _data
252
- <<<<<<< HEAD
253
- */
254
- function isValidSignature (bytes _data , bytes _signature )
255
- =======
256
240
*/
257
241
function isValidSignature (bytes memory _data , bytes memory _signature )
258
- >>>>>>> dd768ad... Fix solidity 0.5.0 errors
259
242
public
260
243
returns (bool isValid )
261
244
{
@@ -299,23 +282,13 @@ contract GnosisSafe is MasterCopy, BaseSafe, SignatureDecoder, SecuredTokenTrans
299
282
/// @param _nonce Transaction nonce.
300
283
/// @return Transaction hash bytes.
301
284
function encodeTransactionData (
302
- <<<<<<< HEAD
303
- address to ,
304
- uint256 value ,
305
- bytes data ,
306
- Enum.Operation operation ,
307
- uint256 safeTxGas ,
308
- uint256 dataGas ,
309
- uint256 gasPrice ,
310
- =======
311
285
address to ,
312
286
uint256 value ,
313
287
bytes memory data ,
314
288
Enum.Operation operation ,
315
289
uint256 safeTxGas ,
316
290
uint256 dataGas ,
317
- uint256 gasPrice ,
318
- >>>>>>> dd768ad... Fix solidity 0.5.0 errors
291
+ uint256 gasPrice ,
319
292
address gasToken ,
320
293
address refundReceiver ,
321
294
uint256 _nonce
@@ -343,23 +316,13 @@ contract GnosisSafe is MasterCopy, BaseSafe, SignatureDecoder, SecuredTokenTrans
343
316
/// @param _nonce Transaction nonce.
344
317
/// @return Transaction hash.
345
318
function getTransactionHash (
346
- <<<<<<< HEAD
347
- address to ,
348
- uint256 value ,
349
- bytes data ,
350
- Enum.Operation operation ,
351
- uint256 safeTxGas ,
352
- uint256 dataGas ,
353
- uint256 gasPrice ,
354
- =======
355
319
address to ,
356
320
uint256 value ,
357
321
bytes memory data ,
358
322
Enum.Operation operation ,
359
323
uint256 safeTxGas ,
360
324
uint256 dataGas ,
361
- uint256 gasPrice ,
362
- >>>>>>> dd768ad... Fix solidity 0.5.0 errors
325
+ uint256 gasPrice ,
363
326
address gasToken ,
364
327
address refundReceiver ,
365
328
uint256 _nonce
0 commit comments