Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to solidity > 0.5.0 #36

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions contracts/LibSubmarineSimple.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
pragma solidity ^0.4.24;
pragma solidity ^0.5.0;

import "./openzeppelin-solidity/contracts/math/SafeMath.sol";
import "./proveth/ProvethVerifier.sol";
import "./proveth/RLP.sol";
import "./proveth/Solidity-RLP/contracts/RLPReader.sol";

contract LibSubmarineSimple is ProvethVerifier {

Expand Down Expand Up @@ -86,7 +86,7 @@ contract LibSubmarineSimple is ProvethVerifier {
address _user,
address _libsubmarine,
uint256 _commitValue,
bytes _embeddedDAppData,
bytes memory _embeddedDAppData,
bytes32 _witness,
uint256 _gasPrice,
uint256 _gasLimit
Expand Down Expand Up @@ -178,7 +178,7 @@ contract LibSubmarineSimple is ProvethVerifier {
*/
function onSubmarineReveal(
bytes32 _submarineId,
bytes _embeddedDAppData,
bytes memory _embeddedDAppData,
uint256 _value
) internal;

Expand All @@ -197,10 +197,10 @@ contract LibSubmarineSimple is ProvethVerifier {
*/
function reveal(
uint32 _commitTxBlockNumber,
bytes _embeddedDAppData,
bytes memory _embeddedDAppData,
bytes32 _witness,
bytes _rlpUnlockTxUnsigned,
bytes _proofBlob
bytes memory _rlpUnlockTxUnsigned,
bytes memory _proofBlob
) public {
bytes32 commitBlockHash = blockhash(_commitTxBlockNumber);
require(
Expand Down Expand Up @@ -263,8 +263,8 @@ contract LibSubmarineSimple is ProvethVerifier {
address submarine = ecrecover(
unsignedUnlockTxHash,
vee,
keccak256(abi.encodePacked(submarineId, byte(1))),
keccak256(abi.encodePacked(submarineId, byte(0)))
keccak256(abi.encodePacked(submarineId, byte(uint8(1)))),
keccak256(abi.encodePacked(submarineId, byte(uint8(0))))
);

require(provenCommitTx.to == submarine);
Expand Down
6 changes: 3 additions & 3 deletions contracts/LibSubmarineSimpleTestHelper.sol
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
pragma solidity ^0.4.24;
pragma solidity ^0.5.0;

import "LibSubmarineSimple.sol";

contract LibSubmarineSimpleTestHelper is LibSubmarineSimple {
function onSubmarineReveal(
bytes32 _submarineId,
bytes _embeddedDAppData,
bytes memory _embeddedDAppData,
uint256 _value
) internal {

}
}
}
2 changes: 1 addition & 1 deletion contracts/examples/erc721_auction/ERC721Auction.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.24;
pragma solidity ^0.5.0;

import "../../openzeppelin-solidity/contracts/token/ERC721/IERC721.sol";
import "../../openzeppelin-solidity/contracts/token/ERC721/IERC721Receiver.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.18;
pragma solidity ^0.5.0;

import "LibSubmarineSimple.sol";
import "../../openzeppelin-solidity/contracts/token/ERC721/IERC721.sol";
Expand Down
4 changes: 2 additions & 2 deletions contracts/examples/exchange/ERC20Interface.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.24;
pragma solidity ^0.5.0;


contract ERC20Interface {
Expand All @@ -10,4 +10,4 @@ contract ERC20Interface {
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
}
}
2 changes: 1 addition & 1 deletion contracts/examples/exchange/Exchange.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.24;
pragma solidity ^0.5.0;

import "../../LibSubmarineSimple.sol";
import "../../openzeppelin-solidity/contracts/math/SafeMath.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/examples/exchange/TestToken.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.24;
pragma solidity ^0.5.0;

import "../../openzeppelin-solidity/contracts/math/SafeMath.sol";
import "./ERC20Interface.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/openzeppelin-solidity
4 changes: 2 additions & 2 deletions test/test_LibSubmarineSimple.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def setUp(self):
'proveth/ProvethVerifier.sol')
]
},
'proveth/RLP.sol': {
'urls': [os.path.join(contract_dir, 'proveth/RLP.sol')]
'proveth/Solidity-RLP/contracts/RLPReader.sol': {
'urls': [os.path.join(contract_dir, 'proveth/Solidity-RLP/contracts/RLPReader.sol')]
}
},
allow_paths=root_repo_dir,
Expand Down