Skip to content

Latest commit

 

History

History
68 lines (50 loc) · 1.83 KB

README.md

File metadata and controls

68 lines (50 loc) · 1.83 KB

Ethernaut Capture the Flag with Foundry 🧑‍💻🏴‍☠️

This project is dedicated to solving Ethernaut exercises using Foundry. Each level from Ethernaut will have its own contract, test, and deployment script. This repo is for personal purposes, te learn about Foundry while practicing Solidity.

Project Structure 🏗️

ethernaut-foundry/
├── src/             # Contains the Solidity contracts for each level
│   ├── level1/
│   │   └── Level1.sol
│   ├── level2/
│   │   └── Level2.sol
│   └── ...
├── test/            # Tests written in Solidity for each level
│   ├── level1/
│   │   └── Level1.t.sol
│   ├── level2/
│   │   └── Level2.t.sol
│   └── ...
├── scripts/         # Deployment and interaction scripts
│   └── DeployLevel1.s.sol
├── foundry.toml     # Foundry configuration file
├── .gitignore       # Ignored files for version control
└── README.md        # This file!

Installation & Setup 🛠️

Prerequisites

Foundry installed (foundryup command available) Git and a GitHub account

Steps

  1. Clone the repository:
git clone https://github.com/banasa44/ethernaut-Foundry.git
cd my-ethernaut
  1. Install dependencies:
forge install
  1. Build the contracts:
forge build
  1. Run tests:
forge test

Solving Ethernaut Levels 🔐

Each level in Ethernaut is represented by a folder under src/ and test/. The solution process will involve writing:

  • A contract representing the challenge from Ethernaut.
  • A test for solving and verifying the challenge.
  • (Optionally) a script to automate deployment and interaction with the contract on a live testnet (like Sepolia).