From 2c30e7452cc5d91f4122fb75dcdc1d24e473342b Mon Sep 17 00:00:00 2001 From: pabl0cks Date: Tue, 28 Jan 2025 11:30:28 +0100 Subject: [PATCH 1/2] Add setup explanations and extra extension info --- README.md | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 71 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d15ed3e..49f6636 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,80 @@ ⚡️ Live at https://ctf.buidlguidl.com -> [!NOTE] +> [!NOTE] > This branch contains the code for the BuidlGuidl CTF website. -> If you are looking for the stack to play the CTF, please check the [extension](https://github.com/buidlGuidl/ctf.buidlguidl.com/tree/extension) branch. +> +> If you are looking for the stack to play the CTF, please check the [extension](https://github.com/buidlGuidl/ctf.buidlguidl.com/tree/extension) branch, which includes: +> +> - A user-friendly frontend to interact with the contracts (/debug page). +> - Simplified workflow for deploying new contracts. +> - A local blockchain and a block explorer for testing. +> - Example scripts to interact with smart contracts via scripts. --- +This repository was built with [Scaffold-ETH 2](https://github.com/scaffold-eth/scaffold-eth-2). + ## Setting up the environment -ToDo +### Requirements + +You'll need to have the following tools installed on your machine: + +- [Node (>= v18.18)](https://nodejs.org/en/download/) +- Yarn ([v1](https://classic.yarnpkg.com/en/docs/install/) or [v2+](https://yarnpkg.com/getting-started/install)) +- [Git](https://git-scm.com/downloads) + +### Setting up your local testing environment + +First, you'll need to clone this repository and install dependencies: + +``` +git clone https://github.com/buidlguidl/ctf.buidlguidl.com.git +cd ctf.buidlguidl.com +yarn install +``` + +Now you will run the following commands in separate terminals: + +1. Run a local blockchain: + +``` +yarn chain +``` + +2. Deploy the challenges contracts locally: + +``` +yarn deploy +``` + +3. Start Ponder (event indexer): + +``` +yarn ponder:dev +``` + +> Note: This just runs the ponder indexer locally, which is used to keep track of all the events happening in the blockchain. + +4. Start the frontend (NextJS app): + +``` +yarn start +``` + +Visit the CTF local website on: `http://localhost:3000`. + +## Documentation + +Visit [Scaffold-ETH 2 docs](https://docs.scaffoldeth.io) to learn all the technical details and guides of Scaffold-ETH 2. + +To know more about its features, check the [Scaffold-ETH 2 website](https://scaffoldeth.io). + +For more information about the BuidlGuidl CTF, please visit the [BuidlGuidl CTF FAQs](https://ctf.buidlguidl.com/faqs). + +## Contributing to the BuidlGuidl CTF website + +We welcome contributions to the BuidlGuidl CTF website! + +Please see [CONTRIBUTING.MD](https://github.com/BuidlGuidl/ctf.buidlguidl.com/blob/main/CONTRIBUTING.md) for more information and guidelines for contributing to the BuidlGuidl CTF website. From 8bc5c758c4431ede52aa9f07c6f0346c4250c430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20S=C3=A1nchez?= Date: Tue, 28 Jan 2025 13:20:40 +0100 Subject: [PATCH 2/2] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 49f6636..3da1584 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,11 @@ yarn ponder:dev yarn start ``` -Visit the CTF local website on: `http://localhost:3000`. +Visit the CTF local website at: `http://localhost:3000`. Remember to switch to `hardhat` on `scaffold.config.ts`. + + +> [!NOTE] +> You can also test with the live data pointing to the Ponder live URL (update `NEXT_PUBLIC_PONDER_URL` env var) ## Documentation