StErMi / forge-sol-challenge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sol-Challenge Solutions CI

Recognitions

Sol challenge is a collection of CTF challenges made by massun-onibakuchi.

What's inside this repository?

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.

Getting Started

npm install
npm run test:local # run local tests
npm run test:fork # run tests that needs to use a mainnet fork

Configure FOUNDRY_ETH_RPC_URL for local testing

  1. Rename the .env.example file to .env via mv .env.example .env
  2. 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

Configure GitHub CI

This is my pesonal configuration:

  1. Create an environment called CI
  2. 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.

Development

This project uses Foundry. See the book for instructions on how to install and use Foundry.

About

License:The Unlicense


Languages

Language:Solidity 99.9%Language:Shell 0.1%