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.
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!
Foundry installed (foundryup command available) Git and a GitHub account
- Clone the repository:
git clone https://github.com/banasa44/ethernaut-Foundry.git
cd my-ethernaut
- Install dependencies:
forge install
- Build the contracts:
forge build
- Run tests:
forge test
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).