CTF-Like Challenges of smart contracts
- node
- yarn
Type on a terminal:
yarn
Type:
yarn compile
- 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.
- GuessTheNumberChallenge.sol
- WeirdVaultChallenge.sol
- OpenValutChallenge.sol
- NftSaleChallenge.sol
- BankChallenge.sol
- WrappedERC20Challenge.sol
- HodlChallenge.sol (state of the mainnet needs to be forked)
- GuessTheHashChallenge.sol
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>