Skip to content

Commit 1449542

Browse files
committed
Update to lastest solc changes
1 parent e237ceb commit 1449542

29 files changed

+1889
-2046
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ cache:
55
directories:
66
- node_modules
77
before_script:
8+
- cd node_modules/truffle && npm install [email protected]
89
- truffle compile

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ solidity_flattener contracts/modules/SocialRecoveryModule.sol --output build/fla
5050
solidity_flattener contracts/modules/StateChannelModule.sol --output build/flattened_contracts/StateChannelModule.sol --solc-paths="="
5151
solidity_flattener contracts/modules/WhitelistModule.sol --output build/flattened_contracts/WhitelistModule.sol --solc-paths="="
5252
solidity_flattener contracts/proxies/ProxyFactory.sol --output build/flattened_contracts/ProxyFactory.sol
53-
find build/flattened_contracts -name '*.sol' -exec sed -i '' 's/pragma solidity ^0.4.13;/pragma solidity ^0.4.24;/g' {} \;
53+
find build/flattened_contracts -name '*.sol' -exec sed -i '' 's/pragma solidity ^0.4.13;/pragma solidity ^0.5.0;/g' {} \;
5454
```
5555

5656
Zeppelin OS

contracts/GnosisSafe.sol

Lines changed: 8 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
pragma solidity ^0.4.24;
1+
pragma solidity ^0.5.0;
22
import "./base/BaseSafe.sol";
33
import "./common/MasterCopy.sol";
44
import "./common/SignatureDecoder.sol";
55
import "./common/SecuredTokenTransfer.sol";
66
import "./interfaces/ISignatureValidator.sol";
7-
import "openzeppelin-solidity/contracts/math/SafeMath.sol";
7+
import "./external/SafeMath.sol";
88

99
/// @title Gnosis Safe - A multisignature wallet with support for confirmations using signed messages based on ERC191.
1010
/// @author Stefan George - <[email protected]>
@@ -67,22 +67,15 @@ contract GnosisSafe is MasterCopy, BaseSafe, SignatureDecoder, SecuredTokenTrans
6767
/// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).
6868
/// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})
6969
function execTransaction(
70-
<<<<<<< HEAD
7170
address to,
7271
uint256 value,
73-
bytes data,
72+
bytes memory data,
7473
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
8174
uint256 safeTxGas,
8275
uint256 dataGas,
8376
uint256 gasPrice,
8477
address gasToken,
85-
address refundReceiver,
78+
address payable refundReceiver,
8679
bytes memory signatures
8780
)
8881
public
@@ -115,13 +108,13 @@ contract GnosisSafe is MasterCopy, BaseSafe, SignatureDecoder, SecuredTokenTrans
115108
uint256 dataGas,
116109
uint256 gasPrice,
117110
address gasToken,
118-
address refundReceiver
111+
address payable refundReceiver
119112
)
120113
private
121114
{
122115
uint256 amount = startGas.sub(gasleft()).add(dataGas).mul(gasPrice);
123116
// 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;
125118
if (gasToken == address(0)) {
126119
// solium-disable-next-line security/no-send
127120
require(receiver.send(amount), "Could not pay gas costs with ether");
@@ -231,13 +224,8 @@ contract GnosisSafe is MasterCopy, BaseSafe, SignatureDecoder, SecuredTokenTrans
231224
/**
232225
* @dev Marks a message as signed
233226
* @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-
=======
238227
*/
239228
function signMessage(bytes memory _data)
240-
>>>>>>> dd768ad... Fix solidity 0.5.0 errors
241229
public
242230
authorized
243231
{
@@ -249,13 +237,8 @@ contract GnosisSafe is MasterCopy, BaseSafe, SignatureDecoder, SecuredTokenTrans
249237
* @param _data Arbitrary length data signed on the behalf of address(this)
250238
* @param _signature Signature byte array associated with _data
251239
* @return a bool upon valid or invalid signature with corresponding _data
252-
<<<<<<< HEAD
253-
*/
254-
function isValidSignature(bytes _data, bytes _signature)
255-
=======
256240
*/
257241
function isValidSignature(bytes memory _data, bytes memory _signature)
258-
>>>>>>> dd768ad... Fix solidity 0.5.0 errors
259242
public
260243
returns (bool isValid)
261244
{
@@ -299,23 +282,13 @@ contract GnosisSafe is MasterCopy, BaseSafe, SignatureDecoder, SecuredTokenTrans
299282
/// @param _nonce Transaction nonce.
300283
/// @return Transaction hash bytes.
301284
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-
=======
311285
address to,
312286
uint256 value,
313287
bytes memory data,
314288
Enum.Operation operation,
315289
uint256 safeTxGas,
316290
uint256 dataGas,
317-
uint256 gasPrice,
318-
>>>>>>> dd768ad... Fix solidity 0.5.0 errors
291+
uint256 gasPrice,
319292
address gasToken,
320293
address refundReceiver,
321294
uint256 _nonce
@@ -343,23 +316,13 @@ contract GnosisSafe is MasterCopy, BaseSafe, SignatureDecoder, SecuredTokenTrans
343316
/// @param _nonce Transaction nonce.
344317
/// @return Transaction hash.
345318
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-
=======
355319
address to,
356320
uint256 value,
357321
bytes memory data,
358322
Enum.Operation operation,
359323
uint256 safeTxGas,
360324
uint256 dataGas,
361-
uint256 gasPrice,
362-
>>>>>>> dd768ad... Fix solidity 0.5.0 errors
325+
uint256 gasPrice,
363326
address gasToken,
364327
address refundReceiver,
365328
uint256 _nonce

contracts/base/BaseSafe.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pragma solidity ^0.4.24;
1+
pragma solidity ^0.5.0;
22
import "./Module.sol";
33
import "./ModuleManager.sol";
44
import "./OwnerManager.sol";

contracts/base/Executor.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pragma solidity ^0.4.24;
1+
pragma solidity ^0.5.0;
22
import "../common/Enum.sol";
33
import "../common/EtherPaymentFallback.sol";
44

contracts/base/Module.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pragma solidity ^0.4.24;
1+
pragma solidity ^0.5.0;
22
import "../common/MasterCopy.sol";
33
import "./ModuleManager.sol";
44

contracts/base/ModuleManager.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pragma solidity ^0.4.24;
1+
pragma solidity ^0.5.0;
22
import "../common/Enum.sol";
33
import "../common/SelfAuthorized.sol";
44
import "./Executor.sol";

contracts/base/OwnerManager.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pragma solidity ^0.4.24;
1+
pragma solidity ^0.5.0;
22
import "../common/SelfAuthorized.sol";
33

44
/// @title OwnerManager - Manages a set of owners and a threshold to perform actions.

contracts/common/Enum.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pragma solidity ^0.4.24;
1+
pragma solidity ^0.5.0;
22

33

44
/// @title Enum - Collection of enums

contracts/common/EtherPaymentFallback.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pragma solidity ^0.4.24;
1+
pragma solidity ^0.5.0;
22

33

44
/// @title EtherPaymentFallback - A contract that has a fallback to accept ether payments

0 commit comments

Comments
 (0)