Sol challenge is a collection of CTF challenges made by massun-onibakuchi.
I have refactored all the tests to use foundry.
Inside each test
file you will find a working solution for each challenge with a brief explanation about it.
I'll create a blog post about a full explanation for each challenge in the upcoming weeks.
npm install
npm run test:local # run local tests
npm run test:fork # run tests that needs to use a mainnet fork
- Rename the
.env.example
file to.env
viamv .env.example .env
- Update the
FOUNDRY_ETH_RPC_URL
with the mainnet RPC url. You can get one directly from Alchemy or Infura
FOUNDRY_ETH_RPC_URL=YOUR_RPC_URL_FROM_ALCHEMY_OR_INFURA
This is my pesonal configuration:
- Create an environment called
CI
- Add a secret env variable named
FOUNDRY_ETH_RPC_URL
and set the value equal to the Infura/Alchemy RPC url.
The GitHub CI will run the test:forkci
that is different compared to test:fork
just because GitHub "inject" env variables directly from the action.
This project uses Foundry. See the book for instructions on how to install and use Foundry.