Skip to content

PoCInnovation/PoCEther

Repository files navigation

PoCEther

A front-end to use cyber security blockchain challenges.

🚀 Quick Start with Docker (Recommended)

The easiest way to run PoCEther is with Docker:

# 1. Start all services (Anvil + Smart Contracts + Frontend)
docker-compose up

# 2. Open your browser at http://localhost:3000

# 3. Configure MetaMask:
#    - Network: Anvil (localhost)
#    - RPC URL: http://localhost:8545
#    - Chain ID: 31337
#    - Import an Anvil account (private keys shown in Anvil logs)

That's it! The platform will automatically:

  • Launch Anvil (local Ethereum node)
  • Clean old contract artifacts from previous sessions
  • Deploy all smart contracts fresh
  • Start the React frontend with hot reload

Stop the platform:

docker-compose down

Important: Anvil is an ephemeral blockchain - all data is lost when stopped. When you restart with docker compose up, the platform automatically:

  • ✅ Cleans old contract artifacts
  • ✅ Redeploys all contracts with fresh addresses
  • ✅ Resets the blockchain state

If you need to manually clean artifacts:

./clean-anvil.sh

📋 Manual Installation (Without Docker)

Prerequisites

Setup

  1. Configure environment variables:

    # Copy .env examples
    cp .env.example .env
    cp client/.env.example client/.env
    
    # Edit .env files if needed (default values work for Anvil)
  2. Install dependencies:

    # Root dependencies
    npm install
    
    # Client dependencies
    cd client && npm install && cd ..
  3. Run the platform:

    Terminal 1 - Start Anvil:

    anvil

    Terminal 2 - Deploy contracts:

    npx truffle migrate --network anvil

    Terminal 3 - Start frontend:

    cd client && npm start

🌐 Deploying to Sepolia Testnet

  1. Get Sepolia ETH:

  2. Configure .env:

    # Add your private key or mnemonic
    PRIVATE_KEY=your_private_key_here
    
    # Add Sepolia RPC URL (get from Infura or Alchemy)
    SEPOLIA_RPC_URL=https://sepolia.infura.io/v3/YOUR_PROJECT_ID
  3. Configure client/.env:

    # Uncomment Sepolia configuration
    REACT_APP_NETWORK_ID=11155111
    REACT_APP_CHAIN_ID=11155111
    REACT_APP_NETWORK_NAME=Sepolia
    REACT_APP_RPC_URL=https://sepolia.infura.io/v3/YOUR_PROJECT_ID
  4. Deploy:

    npx truffle migrate --network sepolia

🎮 Using the Platform

You are now ready to access your blockchain security platform !!!

Deploy new challenge

To be able to deploy a new challenge for the app you are going to need to do a few things

  • Add your challenge contract inside contracts/levels and into the subdirectory of your choice depending of the difficulty of the challenge.
  • Add factory challenge that will create instances of the challenge based on another factory contract you can find in the contracys/levels directory.
  • Add attack contract that will solve the challenge inside contracts/attacks and into the subdirectory of your choice depending of the difficulty of the challenges.
  • Add the necessary elements into the client/src/gamedata/levels.json for exemple:
{
    "name": "BecomeTheNewOwner",
    "description": "The goal of this challenge is to become the owner of the contract.",
    "code": [
        "BecomeTheNewOwner"
    ],
    "value": "0"
},
  • And the final step is to add the write up of the challenge in markdown type.

How ? 🤔

Technologies 🧑‍💻

Our PoC team 👌

Developers:


Lucas Louis

Matéo Viel

Organization

🚀 Don't hesitate to follow us on our different networks, and put a star 🌟 on PoC's repositories

About

Plateforme de chall Blockchain

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5