|
4 | 4 |
|
5 | 5 | ⚡️ Live at https://ctf.buidlguidl.com
|
6 | 6 |
|
7 |
| -> [!NOTE] |
| 7 | +> [!NOTE] |
8 | 8 | > This branch contains the code for the BuidlGuidl CTF website.
|
9 |
| -> 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. |
| 9 | +> |
| 10 | +> 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: |
| 11 | +> |
| 12 | +> - A user-friendly frontend to interact with the contracts (/debug page). |
| 13 | +> - Simplified workflow for deploying new contracts. |
| 14 | +> - A local blockchain and a block explorer for testing. |
| 15 | +> - Example scripts to interact with smart contracts via scripts. |
10 | 16 |
|
11 | 17 | ---
|
12 | 18 |
|
| 19 | +This repository was built with [Scaffold-ETH 2](https://github.com/scaffold-eth/scaffold-eth-2). |
| 20 | + |
13 | 21 | ## Setting up the environment
|
14 | 22 |
|
15 |
| -ToDo |
| 23 | +### Requirements |
| 24 | + |
| 25 | +You'll need to have the following tools installed on your machine: |
| 26 | + |
| 27 | +- [Node (>= v18.18)](https://nodejs.org/en/download/) |
| 28 | +- Yarn ([v1](https://classic.yarnpkg.com/en/docs/install/) or [v2+](https://yarnpkg.com/getting-started/install)) |
| 29 | +- [Git](https://git-scm.com/downloads) |
| 30 | + |
| 31 | +### Setting up your local testing environment |
| 32 | + |
| 33 | +First, you'll need to clone this repository and install dependencies: |
| 34 | + |
| 35 | +``` |
| 36 | +git clone https://github.com/buidlguidl/ctf.buidlguidl.com.git |
| 37 | +cd ctf.buidlguidl.com |
| 38 | +yarn install |
| 39 | +``` |
| 40 | + |
| 41 | +Now you will run the following commands in separate terminals: |
| 42 | + |
| 43 | +1. Run a local blockchain: |
| 44 | + |
| 45 | +``` |
| 46 | +yarn chain |
| 47 | +``` |
| 48 | + |
| 49 | +2. Deploy the challenges contracts locally: |
| 50 | + |
| 51 | +``` |
| 52 | +yarn deploy |
| 53 | +``` |
| 54 | + |
| 55 | +3. Start Ponder (event indexer): |
| 56 | + |
| 57 | +``` |
| 58 | +yarn ponder:dev |
| 59 | +``` |
| 60 | + |
| 61 | +> Note: This just runs the ponder indexer locally, which is used to keep track of all the events happening in the blockchain. |
| 62 | +
|
| 63 | +4. Start the frontend (NextJS app): |
| 64 | + |
| 65 | +``` |
| 66 | +yarn start |
| 67 | +``` |
| 68 | + |
| 69 | +Visit the CTF local website at: `http://localhost:3000`. Remember to switch to `hardhat` on `scaffold.config.ts`. |
| 70 | + |
| 71 | + |
| 72 | +> [!NOTE] |
| 73 | +> You can also test with the live data pointing to the Ponder live URL (update `NEXT_PUBLIC_PONDER_URL` env var) |
| 74 | +
|
| 75 | +## Documentation |
| 76 | + |
| 77 | +Visit [Scaffold-ETH 2 docs](https://docs.scaffoldeth.io) to learn all the technical details and guides of Scaffold-ETH 2. |
| 78 | + |
| 79 | +To know more about its features, check the [Scaffold-ETH 2 website](https://scaffoldeth.io). |
| 80 | + |
| 81 | +For more information about the BuidlGuidl CTF, please visit the [BuidlGuidl CTF FAQs](https://ctf.buidlguidl.com/faqs). |
| 82 | + |
| 83 | +## Contributing to the BuidlGuidl CTF website |
| 84 | + |
| 85 | +We welcome contributions to the BuidlGuidl CTF website! |
| 86 | + |
| 87 | +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. |
0 commit comments