This repository is a Solidity-first workspace for solving OpenZeppelin Ethernaut levels with reproducible tests, scripts, and supporting research notes.
- Numbered challenge folders in
src/with vulnerable contracts, solver contracts, tests (*.t.sol), and deployment/automation scripts (*.s.sol) where relevant. - TypeScript helpers in
src/ts/for specific challenges (currently challenge 37). - Yul and Assembly practice exercises in
src/yul-course/. - Long-form walkthrough notes and onchain execution logs in
solutions.md.
src/: Ethernaut challenge implementations and solutions.src/helpers/: shared utilities used by advanced exercises.src/ts/: TypeScript-based helper scripts.lib/: Git submodules (OpenZeppelin versions + Forge Std dependencies).
- Foundry
git- Node.js and
pnpm(repo pinspnpm@10.27.0inpackage.json)
git clone https://github.com/<your-org-or-user>/ethernaut.git
cd ethernaut
git submodule update --init --recursive
forge build
forge test -vvvCI runs the following checks:
forge fmt --checkforge build --sizesforge test -vvv
You can run the same commands locally before opening a PR.
pnpm install
pnpm build
pnpm run 37Notes:
pnpm buildruns TypeScript type-checking only (noEmit: true).- There is a known
TS6133(unused variable) note incustomKSigner.ts.
Project defaults are defined in foundry.toml, including:
- optimizer enabled (
optimizer_runs = 200) evm_version = "prague"- remappings for OpenZeppelin and Forge Std submodules
- Ethernaut problem set: https://ethernaut.openzeppelin.com/
- Repo walkthrough notes:
solutions.md - Yul course reference: Udemy Advanced Solidity: Yul and Assembly
- Yul exercises folder:
src/yul-course/ - Maintainer automation notes:
AGENTS.md
- Level 25 (Motorbike): upstream context in OpenZeppelin/ethernaut issue #701
- Level 40 (NotOptimisticPortal): currently tracked as remaining/in-progress in this repo
This repository is for security education and CTF-style practice. Some code demonstrates exploit patterns and intentionally vulnerable designs. Do not treat these solutions as production-ready smart contract patterns.
MIT. See LICENSE.