Giter VIP home page Giter VIP logo

local-ethernauts's Introduction

local-ethernauts

This challenge is based on https://ethernaut.openzeppelin.com/

Setup

  1. Get all the dependencies installed with yarn install
  2. Compile all contracts by running npx hardhat compile
  3. Run a local node by running npx hardhat node

How to solve each level

  • If you look inside the contracts/ directory you'll find 8 levels for you to solve!
  • Each level directory consists of the same structure, let's check out the first one to illustrate this:
    • CoinFlip.sol: This is the contract you're supposed to hack!
    • AttackingCoinFlip.sol: This is the malicious contract where you'll code the logic to exploit the vulnerable contract!
    • CoinFlip.test.ts: This is the file where you'll be able to test if the contract has been breached
    • CoinFlipHelper.ts: Not all challenges have this Helper file! Only the ones that require you to use ethers to interact with your contract do, which you can do right here! This function is already imported into the tests, so don't worry about anything other than coding!
    • And finally, the README. On this one you'll get all level instructions!
  • After you're done writing your hack, run the following command to run the tests and see if you succesfully breached the contract:
    • npx hardhat test contracts/{contract directory}/{contract name}.test.ts
    • Example: npx hardhat test "contracts/1. CoinFlip/CoinFlip.test.ts"

Helpful Tip

local-ethernauts's People

Contributors

chilldude avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.