diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..1b4d255 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,5 @@ +[submodule "foundry_exploits/lib/forge-std"] + path = foundry_exploits/lib/forge-std + url = https://github.com/foundry-rs/forge-std +[submodule "lib/forge-std"] + branch = v1.4.0 diff --git a/README.md b/README.md index f261e56..ce6a7ae 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# 🧱⛓☠️ blockchain hacking +# ⛓🍕 blockchain hacking
diff --git a/hardhat/README.md b/environments/hardhat/README.md similarity index 100% rename from hardhat/README.md rename to environments/hardhat/README.md diff --git a/hardhat/set_usdc_balance.js b/environments/hardhat/set_usdc_balance.js similarity index 100% rename from hardhat/set_usdc_balance.js rename to environments/hardhat/set_usdc_balance.js diff --git a/foundry_exploits/lib/forge-std b/foundry_exploits/lib/forge-std new file mode 160000 index 0000000..a2edd39 --- /dev/null +++ b/foundry_exploits/lib/forge-std @@ -0,0 +1 @@ +Subproject commit a2edd39db95df7e9dd3f9ef9edc8c55fefddb6df diff --git a/foundry_exploits/script/Counter.s.sol b/foundry_exploits/script/Counter.s.sol deleted file mode 100644 index 0e546ab..0000000 --- a/foundry_exploits/script/Counter.s.sol +++ /dev/null @@ -1,12 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.13; - -import "forge-std/Script.sol"; - -contract CounterScript is Script { - function setUp() public {} - - function run() public { - vm.broadcast(); - } -} diff --git a/foundry_exploits/src/Counter.sol b/foundry_exploits/src/Counter.sol deleted file mode 100644 index aded799..0000000 --- a/foundry_exploits/src/Counter.sol +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.13; - -contract Counter { - uint256 public number; - - function setNumber(uint256 newNumber) public { - number = newNumber; - } - - function increment() public { - number++; - } -} diff --git a/foundry_exploits/test/Counter.t.sol b/foundry_exploits/test/Counter.t.sol deleted file mode 100644 index 30235e8..0000000 --- a/foundry_exploits/test/Counter.t.sol +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.13; - -import "forge-std/Test.sol"; -import "../src/Counter.sol"; - -contract CounterTest is Test { - Counter public counter; - - function setUp() public { - counter = new Counter(); - counter.setNumber(0); - } - - function testIncrement() public { - counter.increment(); - assertEq(counter.number(), 1); - } - - function testSetNumber(uint256 x) public { - counter.setNumber(x); - assertEq(counter.number(), x); - } -} diff --git a/cosmos/README.md b/hacking_by_chains/cosmos/README.md similarity index 100% rename from cosmos/README.md rename to hacking_by_chains/cosmos/README.md diff --git a/solana/README.md b/hacking_by_chains/solana/README.md similarity index 100% rename from solana/README.md rename to hacking_by_chains/solana/README.md