From 8ccac0b1138727930e8f63d13ecded3e8cc8008a Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Mon, 6 Sep 2021 23:31:28 -0400 Subject: [PATCH 1/2] Add getting started section to README I needed to do these three steps to be able to run `yarn` in this package. Without these steps, I encountered: ``` $ npx hardhat compile Error HH8: There's one or more errors in your config file: * Invalid value {"url":"https://kovan.infura.io/v3/undefined","accounts":["0xundefined"]} for HardhatConfig.networks.kovan - Expected a value of type HttpNetworkConfig. * Invalid value {"url":"https://mainnet.infura.io/v3/undefined","accounts":["0xundefined"]} for HardhatConfig.networks.staging_mainnet - Expected a value of type HttpNetworkConfig. * Invalid value {"url":"https://mainnet.infura.io/v3/undefined","accounts":["0xundefined"]} for HardhatConfig.networks.production - Expected a value of type HttpNetworkConfig. To learn more about Hardhat's configuration, please go to https://hardhat.org/config/ ``` --- README.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e155a44b7..c39cbc098 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,19 @@ ## Development -To use console.log during Solidity development, follow the [guides](https://hardhat.org/guides/hardhat-console.html). - -## Available Functionality +### Getting started + +1. Clone this repo +2. Navigate to [Alchemy](https://www.alchemy.com/) and create an application +3. Copy the default environment variables file and populate `ALCHEMY_TOKEN` with the token generated in the previous step + ```bash + cp .env.prod .env + + # Populate ALCHEMY_TOKEN + vim .env + ``` + +To use `console.log` during Solidity development, follow this [guide](https://hardhat.org/guides/hardhat-console.html). ### Run Hardhat EVM From be3d2ce159effa501b5e97a69b0985f78684368d Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Tue, 7 Sep 2021 15:33:22 -0400 Subject: [PATCH 2/2] Add steps for Infura token --- README.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c39cbc098..d618a210d 100644 --- a/README.md +++ b/README.md @@ -15,14 +15,20 @@ ### Getting started 1. Clone this repo -2. Navigate to [Alchemy](https://www.alchemy.com/) and create an application -3. Copy the default environment variables file and populate `ALCHEMY_TOKEN` with the token generated in the previous step +1. Create an Alchemy token + 1. Navigate to [Alchemy](https://www.alchemy.com/) and create an account + 1. Click **Create app** and provide a name (e.g. set-protocol-v2) + 1. Navigate to your new app and click **View key** then copy the token (the part after `https://eth-mainnet.alchemyapi.io/v2/`) +1. Create an Infura token + 1. Navigate to [Infura](https://infura.io) and create an account + 1. Click **Create new project** and provide a name (e.g. set-protocol-v2) + 1. Navigate to your new project and copy the project id (the part after `https://mainnet.infura.io/v3/`) +1. Copy the default environment variable file to a `.env` file + ```bash - cp .env.prod .env - - # Populate ALCHEMY_TOKEN - vim .env + cp .env.prod .env ``` +1. Populate `ALCHEMY_TOKEN` and `INFURA_TOKEN` with the tokens generated in the previous steps To use `console.log` during Solidity development, follow this [guide](https://hardhat.org/guides/hardhat-console.html).