From 90c6ae7298aaf7a23c100fcf891db4950eab4685 Mon Sep 17 00:00:00 2001 From: juliustranquilli Date: Thu, 5 Dec 2024 14:39:35 -0500 Subject: [PATCH 01/15] update contracts/src/levels/Fallout.sol: updated pragma, removed SafeMath --- contracts/src/levels/Fallout.sol | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 { From 6f65371246b756f459dcbf0eeeb8ac4d3c8dfe6a Mon Sep 17 00:00:00 2001 From: juliustranquilli Date: Thu, 5 Dec 2024 14:39:36 -0500 Subject: [PATCH 02/15] update contracts/src/levels/Token.sol: updated pragma --- contracts/src/levels/Token.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; From 73a74447c20a1aa73cabb36bd5bca8cb482470d3 Mon Sep 17 00:00:00 2001 From: juliustranquilli Date: Thu, 5 Dec 2024 14:39:37 -0500 Subject: [PATCH 03/15] update contracts/src/levels/HigherOrder.sol: updated pragma --- contracts/src/levels/HigherOrder.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; From 776745d80f61c78d41640210f63587bc097ceeac Mon Sep 17 00:00:00 2001 From: juliustranquilli Date: Thu, 5 Dec 2024 14:39:37 -0500 Subject: [PATCH 04/15] update contracts/src/levels/FalloutFactory.sol: updated pragma --- contracts/src/levels/FalloutFactory.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"; From 5a6cc1aee037826415547a0889c2049680c3a863 Mon Sep 17 00:00:00 2001 From: juliustranquilli Date: Thu, 5 Dec 2024 14:39:38 -0500 Subject: [PATCH 05/15] update contracts/src/levels/Reentrance.sol: updated pragma, removed SafeMath --- contracts/src/levels/Reentrance.sol | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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) { From ebdfb31fae01e33325acaec7e76fbfd502010fe8 Mon Sep 17 00:00:00 2001 From: juliustranquilli Date: Thu, 5 Dec 2024 14:39:39 -0500 Subject: [PATCH 06/15] update contracts/src/levels/AlienCodex.sol: updated pragma --- contracts/src/levels/AlienCodex.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"; From a0309dd2098ff4bcb37863c5ec6e97665c87d009 Mon Sep 17 00:00:00 2001 From: juliustranquilli Date: Thu, 5 Dec 2024 14:39:40 -0500 Subject: [PATCH 07/15] update contracts/src/levels/ReentranceFactory.sol: updated pragma --- contracts/src/levels/ReentranceFactory.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"; From dbc7277566c34113c51df5e1188ef2b0364c0ebd Mon Sep 17 00:00:00 2001 From: juliustranquilli Date: Thu, 5 Dec 2024 14:39:41 -0500 Subject: [PATCH 08/15] update contracts/src/levels/AlienCodexFactory.sol: updated pragma --- contracts/src/levels/AlienCodexFactory.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"; From 0660b7f793176c65fc2b53955b2386f2da321f8a Mon Sep 17 00:00:00 2001 From: juliustranquilli Date: Thu, 5 Dec 2024 14:39:42 -0500 Subject: [PATCH 09/15] update contracts/src/levels/HigherOrderFactory.sol: updated pragma --- contracts/src/levels/HigherOrderFactory.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"; From 425e677c6bbddf95eee747b390c24f8e1d0b4947 Mon Sep 17 00:00:00 2001 From: juliustranquilli Date: Thu, 5 Dec 2024 14:39:43 -0500 Subject: [PATCH 10/15] update contracts/src/levels/TokenFactory.sol: updated pragma --- contracts/src/levels/TokenFactory.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"; From b455707f3ae6e6d13bf7f3eda50c3cd1fe0e1e63 Mon Sep 17 00:00:00 2001 From: juliustranquilli Date: Thu, 5 Dec 2024 14:39:43 -0500 Subject: [PATCH 11/15] update contracts/src/levels/base/Level-05.sol: updated pragma --- contracts/src/levels/base/Level-05.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"; From 15507bd0ac4cb1b46d9c734691e2fa0cf9579a80 Mon Sep 17 00:00:00 2001 From: juliustranquilli Date: Thu, 5 Dec 2024 14:39:44 -0500 Subject: [PATCH 12/15] update contracts/src/levels/base/Level-06.sol: updated pragma --- contracts/src/levels/base/Level-06.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"; From 430ffaf13f6a220f1e5c17c96caf7388dbc4aeea Mon Sep 17 00:00:00 2001 From: juliustranquilli Date: Thu, 5 Dec 2024 14:39:45 -0500 Subject: [PATCH 13/15] update contracts/src/helpers/Ownable-05.sol: updated pragma --- contracts/src/helpers/Ownable-05.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From e752a527f9e659e87e599b6a849d40a0bdb0f2f7 Mon Sep 17 00:00:00 2001 From: juliustranquilli Date: Thu, 5 Dec 2024 14:39:46 -0500 Subject: [PATCH 14/15] update contracts/src/attacks/HigherOrderAttack.sol: updated pragma --- contracts/src/attacks/HigherOrderAttack.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { From 8574c5985b7ce0cd200c2d0fb4c019b7ed5dab02 Mon Sep 17 00:00:00 2001 From: juliustranquilli Date: Thu, 5 Dec 2024 14:39:47 -0500 Subject: [PATCH 15/15] update contracts/src/attacks/AlienCodexAttack.sol: updated pragma --- contracts/src/attacks/AlienCodexAttack.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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";