Installation
Requirementsโ
Before you begin, you need to install the following tools:
- Node (>= v18.17)
- Yarn (v1 or v2+)
- Git
Setupโ
To get started with Scaffold-ETH 2, you have two options:
- Use the npx command:
npx create-eth@latest
to bootstrap the project directly. - Use git clone to clone the repository.
Option 1: Setup using npx create-eth@latest
โ
For a simplified setup, Scaffold-ETH 2 offers a 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
foryes
(default option) or typen
and pressEnter
for no
Once the setup is complete, navigate to the project directory:
cd project-name
Hint
If you choose Foundry as solidity framework in the CLI, you'll also need Foundryup installed on your machine. Checkout: getfoundry.sh
If you want to use extensions, you can add the -e flag followed by the extension name:
npx create-eth@latest -e extension-name
For more information about available extensions and how to use them, check out the Extensions section.
Option 2: 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