diff --git a/contracts/src/attacks/AlienCodexAttack.sol b/contracts/src/attacks/AlienCodexAttack.sol index ea9da1a9f..8b9b47700 100644 --- a/contracts/src/attacks/AlienCodexAttack.sol +++ b/contracts/src/attacks/AlienCodexAttack.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.5.0; +pragma solidity ^0.8.0; import "../levels/AlienCodex.sol"; diff --git a/contracts/src/attacks/HigherOrderAttack.sol b/contracts/src/attacks/HigherOrderAttack.sol index 8961c1a02..2101c146e 100644 --- a/contracts/src/attacks/HigherOrderAttack.sol +++ b/contracts/src/attacks/HigherOrderAttack.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.6.12; +pragma solidity ^0.8.0; contract HigherOrderAttack { function encodedData() public pure returns (bytes memory) { diff --git a/contracts/src/helpers/Ownable-05.sol b/contracts/src/helpers/Ownable-05.sol index 7dbc4742d..b9920704b 100644 --- a/contracts/src/helpers/Ownable-05.sol +++ b/contracts/src/helpers/Ownable-05.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.5.0; +pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where diff --git a/contracts/src/levels/AlienCodex.sol b/contracts/src/levels/AlienCodex.sol index 721cc3f8e..80731a2c3 100644 --- a/contracts/src/levels/AlienCodex.sol +++ b/contracts/src/levels/AlienCodex.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.5.0; +pragma solidity ^0.8.0; import "../helpers/Ownable-05.sol"; diff --git a/contracts/src/levels/AlienCodexFactory.sol b/contracts/src/levels/AlienCodexFactory.sol index ca085d90a..1890136f7 100644 --- a/contracts/src/levels/AlienCodexFactory.sol +++ b/contracts/src/levels/AlienCodexFactory.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.5.0; +pragma solidity ^0.8.0; import "./base/Level-05.sol"; import "./AlienCodex.sol"; diff --git a/contracts/src/levels/Fallout.sol b/contracts/src/levels/Fallout.sol index ff9d87765..7a0043bfc 100644 --- a/contracts/src/levels/Fallout.sol +++ b/contracts/src/levels/Fallout.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.6.0; +pragma solidity ^0.8.0; -import "openzeppelin-contracts-06/math/SafeMath.sol"; contract Fallout { using SafeMath for uint256; @@ -21,7 +20,7 @@ contract Fallout { } function allocate() public payable { - allocations[msg.sender] = allocations[msg.sender].add(msg.value); + allocations[msg.sender] = allocations[msg.sender] + (msg.value); } function sendAllocation(address payable allocator) public { diff --git a/contracts/src/levels/FalloutFactory.sol b/contracts/src/levels/FalloutFactory.sol index 316e64ec5..930dee769 100644 --- a/contracts/src/levels/FalloutFactory.sol +++ b/contracts/src/levels/FalloutFactory.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.6.0; +pragma solidity ^0.8.0; import "./base/Level-06.sol"; import "./Fallout.sol"; diff --git a/contracts/src/levels/HigherOrder.sol b/contracts/src/levels/HigherOrder.sol index 2cc011a19..8ebdf7dbd 100644 --- a/contracts/src/levels/HigherOrder.sol +++ b/contracts/src/levels/HigherOrder.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.6.12; +pragma solidity ^0.8.0; contract HigherOrder { address public commander; diff --git a/contracts/src/levels/HigherOrderFactory.sol b/contracts/src/levels/HigherOrderFactory.sol index 18cdb0acc..cdfe22dc2 100644 --- a/contracts/src/levels/HigherOrderFactory.sol +++ b/contracts/src/levels/HigherOrderFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.6.12; +pragma solidity ^0.8.0; import "./base/Level-06.sol"; import "./HigherOrder.sol"; diff --git a/contracts/src/levels/Reentrance.sol b/contracts/src/levels/Reentrance.sol index b6e2993d8..4595af745 100644 --- a/contracts/src/levels/Reentrance.sol +++ b/contracts/src/levels/Reentrance.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.6.12; +pragma solidity ^0.8.0; -import "openzeppelin-contracts-06/math/SafeMath.sol"; contract Reentrance { using SafeMath for uint256; @@ -9,7 +8,7 @@ contract Reentrance { mapping(address => uint256) public balances; function donate(address _to) public payable { - balances[_to] = balances[_to].add(msg.value); + balances[_to] = balances[_to] + (msg.value); } function balanceOf(address _who) public view returns (uint256 balance) { diff --git a/contracts/src/levels/ReentranceFactory.sol b/contracts/src/levels/ReentranceFactory.sol index e0ee302d8..6cb6e95ad 100644 --- a/contracts/src/levels/ReentranceFactory.sol +++ b/contracts/src/levels/ReentranceFactory.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.6.0; +pragma solidity ^0.8.0; import "./base/Level-06.sol"; import "./Reentrance.sol"; diff --git a/contracts/src/levels/Token.sol b/contracts/src/levels/Token.sol index 5afd99cff..ce2ed2371 100644 --- a/contracts/src/levels/Token.sol +++ b/contracts/src/levels/Token.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.6.0; +pragma solidity ^0.8.0; contract Token { mapping(address => uint256) balances; diff --git a/contracts/src/levels/TokenFactory.sol b/contracts/src/levels/TokenFactory.sol index 87432a826..ea5d22852 100644 --- a/contracts/src/levels/TokenFactory.sol +++ b/contracts/src/levels/TokenFactory.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.6.0; +pragma solidity ^0.8.0; import "./base/Level-06.sol"; import "./Token.sol"; diff --git a/contracts/src/levels/base/Level-05.sol b/contracts/src/levels/base/Level-05.sol index 9e811e3bb..9c61a543e 100644 --- a/contracts/src/levels/base/Level-05.sol +++ b/contracts/src/levels/base/Level-05.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.5.0; +pragma solidity ^0.8.0; import "../../helpers/Ownable-05.sol"; diff --git a/contracts/src/levels/base/Level-06.sol b/contracts/src/levels/base/Level-06.sol index 77314162b..f528c8de1 100644 --- a/contracts/src/levels/base/Level-06.sol +++ b/contracts/src/levels/base/Level-06.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.6.0; +pragma solidity ^0.8.0; import "openzeppelin-contracts-06/access/Ownable.sol";