Awesome
Sol Challenge
CTF-Like Challenges of smart contracts
Installing
Prerequisites
- node
- yarn
Setup
Type on a terminal:
yarn
Compiling
Type:
yarn compile
Running Challenges
- Copy this template to
./test/<*Challenge>.test.ts
file. - Each
<*Challenge.sol>
file contains a description of the challenge. - Make
isSovled()
returnstrue
. Write tests to prove the solution works correctly.
Order of Challenges
- GuessTheNumberChallenge.sol
- WeirdVaultChallenge.sol
- OpenValutChallenge.sol
- NftSaleChallenge.sol
- BankChallenge.sol
- WrappedERC20Challenge.sol
- HodlChallenge.sol (state of the mainnet needs to be forked)
- GuessTheHashChallenge.sol
Testing
To run a test type:
# run test against local network
yarn test test/<*Challenge>.test.ts
Some of the challenges are required to be run on a forked network. You need access to an archive node like the free ones from Alchemy. Create .env
file and paste the API key.
Type:
cp .env.example .env
Then set the environment variable.
ALCHEMY_API_KEY=<Your Alchemy api key>