Skip to content

OpenTechne/ethernaut-solutions-with-foundry

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Solidity 98.9%
  • Python 1.1%