GianfrancoBazzani / ethernaut-solutions-with-foundry

Ethernaut OZ solidity ctf attacks with foundry

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenZeppelin ethernaut solutions with foundry

Setup

Create an .env file following .env_example and fill it with your api keys

To test attacks

forge test --match-path test/<level name>.sol 

To attack a real contract

Be careful when loading your private key to the environment!

Insert the target contract address in script/<level name>.s.sol

source .env
forge script script/<level name>.s.sol --rpc-url <network name> --broadcast --private-key $PRIVATE_KEY --tc <level name>AttackScript

for network names check [rpc_endpoints] aliases in foundry.toml

About

Ethernaut OZ solidity ctf attacks with foundry

License:GNU General Public License v3.0


Languages

Language:Solidity 100.0%Language:Makefile 0.0%Language:Nix 0.0%