Solidity CTFs by RareSkills
A set of CTFs in a foundry environment setup, except puppet-v2, to practice the problems on Ethernaut, Damn Vulnerable DeFi and Capture the Ether. Some of them are directly ported, some of them are modified to have compatibility with Foundry and some of them are new. Most challenges require solving in one transaction, pay close attention to the restrictions in the tests.
Make sure foundry is installed. instructions
cd
to the directory, then add your solution where the comment says /** CODE YOUR SOLUTION HERE */
inside the .sol
file. We've also set up an Attacker
contract for you. You need to write code inside Attacker
contract in the source files and then write tests under function testExploit()
in the corresponding test files. If the tests pass, you won.
There is a player
address that you can prank and call transaction from.
To run the tests:
forge test --match-contract <TEST_NAME>