Grant platform for the BuidlGuidl community.
⚙️ Built using 🏗 Scaffold-ETH 2 crane emoji
Before you begin, you need to install the following tools:
- Node (>= v18.17)
- Yarn (v1 or v2+)
- Git
To get started follow the steps below:
-
Clone this repo & install dependencies
git clone https://github.com/BuidlGuidl/grants.buidlguidl.com.git cd grants.buidlguidl.com yarn install -
Set up your environment variables (and optionally, a local Firebase instance): Copy the
packages/nextjs/.env.examplefile topackages/nextjs/.env.localand fill in the required environment variables.(Optional) Start the firebase emulators (vs set up a live Firebase instance). You will need to install the firebase CLI and run the following command:
# You might need to add a real "--project <projectName>" (run firebase projects:list) firebase emulators:start -
Seed data in your local Firebase instance:
Copy the
packages/local_db/seed.sample.jsontopackages/local_db/seed.jsonand tweak the data as you see fit. Then run the following command:yarn seed
To seed it to empty live firestore instance you can use
yarn seed --force-prod. If there is data in the live instance, it will not seed it again to bypass it useyarn seed --reset --force-prod -
Run a local network in the first terminal:
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. -
On a second terminal, deploy the test contract:
yarn deployThis command deploys a test smart contract to the local network. The contract is located in
packages/hardhat/contractsand can be modified to suit your needs. Theyarn deploycommand uses the deploy script located inpackages/hardhat/deployto deploy the contract to the network. You can also customize the deploy script. -
On a third terminal, start your NextJS app:
yarn startVisit your app on:
http://localhost:3000. You can interact with your smart contract using the/debugpage. You can tweak the app config inpackages/nextjs/scaffold.config.ts.