-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cea9d72
commit 85fd09a
Showing
4 changed files
with
108 additions
and
55 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"label": "🚀 QuickStart", | ||
"position": 2, | ||
"link": { | ||
"type": "generated-index", | ||
"title": "🚀 QuickStart", | ||
"slug": "quick-start" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
sidebar_position: 2 | ||
description: How to set up your development environment for Scaffold ETH-2. | ||
--- | ||
|
||
# Environment | ||
|
||
Now that our installation is complete, let's configure the development environment for Scaffold ETH-2. | ||
|
||
### 1. **Initialize a Local Blockchain**: | ||
|
||
In the first terminal, run a local network: | ||
|
||
``` | ||
yarn chain | ||
``` | ||
|
||
This command starts a local Ethereum network using Hardhat. The network runs on your local machine and can be used for testing and development. You can customize the network configuration in `hardhat.config.ts`. | ||
|
||
### 2. **Deploy Your Smart Contract**: | ||
|
||
In the second terminal, deploy the test contract: | ||
|
||
``` | ||
yarn deploy | ||
``` | ||
|
||
This command deploys a test smart contract to the local network. The contract is located in `packages/hardhat/contracts` and can be modified to suit your needs. The `yarn deploy` command uses the deploy script located in `packages/hardhat/deploy` to deploy the contract to the network. You can also customize the deploy script. | ||
|
||
### 3. **Launch your NextJS Application**: | ||
|
||
In the third terminal, start your NextJS app: | ||
|
||
``` | ||
yarn start | ||
``` | ||
|
||
Visit your app on `http://localhost:3000`. You can interact with your smart contract using the contract component or the example ui in the frontend. | ||
|
||
## What's Next: | ||
|
||
- Edit your smart contract `YourContract.sol` in `packages/hardhat/contracts` | ||
- Edit your deployment scripts in `packages/hardhat/deploy` | ||
- Edit your frontend in `packages/nextjs/pages` | ||
- Edit the app config in `packages/nextjs/scaffold.config.ts` | ||
- Run smart contract test with `yarn hardhat:test` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
sidebar_position: 1 | ||
description: Requirements and installation methods to get started with Scaffold ETH-2. | ||
--- | ||
|
||
# Installation | ||
|
||
## Requirements | ||
|
||
Before you begin, you need to install the following tools: | ||
|
||
- [Node (v18 LTS)](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) | ||
|
||
## Setup | ||
|
||
To get started with Scaffold-ETH 2, you have two options: | ||
|
||
1. Use git clone to clone the repository. | ||
2. **[Beta]** Use the npx command: `npx create-eth@latest` to bootstrap the project directly. | ||
|
||
### Option 1: Setup using `git clone` | ||
|
||
Clone this repo & install dependencies: | ||
|
||
``` | ||
git clone https://github.com/scaffold-eth/scaffold-eth-2.git | ||
cd scaffold-eth-2 | ||
yarn install | ||
``` | ||
|
||
### Option 2: [Beta] Setup using `npx create-eth@latest` | ||
|
||
For a simplified setup, Scaffold-ETH 2 offers a beta npx method that guides you interactively through the setup. | ||
|
||
Bootstrap the project: | ||
|
||
``` | ||
npx create-eth@latest | ||
``` | ||
|
||
You will be presented with a series of prompts: | ||
|
||
- **Project Name:** Input your project name: Enter a name for your project, e.g., my-dapp-example. | ||
- **Solidity Framework** What solidity framework do you want to use?: Choose your preferred solidity framework (Hardhat, Foundry) | ||
- **Install packages?:** Press `Enter` for `yes` (default option) or type `n` and press `Enter` for no | ||
|
||
Once the setup is complete, navigate to the project directory: | ||
|
||
``` | ||
cd project-name | ||
``` |