From 7aa91314925a464c4e5b4d8fe3da88c260b70c26 Mon Sep 17 00:00:00 2001 From: iosh Date: Sat, 24 Aug 2024 11:10:27 +0800 Subject: [PATCH 1/3] docs: add pnpm to document --- .../docs/advanced/create-task.md | 10 +++++++++- .../advanced/migrating-from-hardhat-waffle.md | 20 +++++++++++++++++-- .../hardhat-runner/docs/advanced/using-esm.md | 18 +++++++++++++++-- .../docs/getting-started/index.md | 10 +++++++++- .../docs/guides/project-setup.md | 20 +++++++++++++++++-- .../docs/supporter-guides/oracles.md | 11 ++++++++-- docs/temp/tabsConfig.json | 2 +- 7 files changed, 80 insertions(+), 11 deletions(-) diff --git a/docs/src/content/hardhat-runner/docs/advanced/create-task.md b/docs/src/content/hardhat-runner/docs/advanced/create-task.md index 13989b3768..865ae40319 100644 --- a/docs/src/content/hardhat-runner/docs/advanced/create-task.md +++ b/docs/src/content/hardhat-runner/docs/advanced/create-task.md @@ -50,7 +50,7 @@ Tasks in Hardhat are asynchronous JavaScript functions that get access to the [ For our example, we will use the [`@nomicfoundation/hardhat-toolbox`](/hardhat-runner/plugins/nomicfoundation-hardhat-toolbox), which includes the [ethers.js](https://docs.ethers.org/v6/) library to interact with our contracts. -::::tabsgroup{options="npm 7+,npm 6,yarn"} +::::tabsgroup{options="npm 7+,npm 6,yarn,pnpm"} :::tab{value="npm 7+"} @@ -76,6 +76,14 @@ yarn add --dev @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-network ::: +:::tab{value="pnpm"} + +``` +pnpm add -D @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-network-helpers @nomicfoundation/hardhat-chai-matchers @nomicfoundation/hardhat-ethers @nomicfoundation/hardhat-verify chai@4 ethers hardhat-gas-reporter solidity-coverage @typechain/hardhat typechain @typechain/ethers-v6 +``` + +::: + :::: Task creation code can go in `hardhat.config.js`, or whatever your configuration file is called. It’s a good place to create simple tasks. If your task is more complex, it's also perfectly valid to split the code into several files and `require` them from the configuration file. diff --git a/docs/src/content/hardhat-runner/docs/advanced/migrating-from-hardhat-waffle.md b/docs/src/content/hardhat-runner/docs/advanced/migrating-from-hardhat-waffle.md index a1f8e58e0d..0080c13707 100644 --- a/docs/src/content/hardhat-runner/docs/advanced/migrating-from-hardhat-waffle.md +++ b/docs/src/content/hardhat-runner/docs/advanced/migrating-from-hardhat-waffle.md @@ -12,7 +12,7 @@ Follow these steps to migrate your project to Hardhat Toolbox. 1. First you'll need to remove some packages from your project. - ::::tabsgroup{options="npm 7+,npm 6,yarn"} + ::::tabsgroup{options="npm 7+,npm 6,yarn,pnpm"} :::tab{value="npm 7+"} @@ -38,11 +38,19 @@ Follow these steps to migrate your project to Hardhat Toolbox. ::: + :::tab{value="pnpm"} + + ``` + pnpm remove @nomiclabs/hardhat-waffle ethereum-waffle + ``` + + ::: + :::: 2. Then you need to install the Toolbox. If you are using yarn or an old version of npm, you'll also have to install some other packages (the peer dependencies of the Toolbox). - ::::tabsgroup{options="npm 7+,npm 6,yarn"} + ::::tabsgroup{options="npm 7+,npm 6,yarn,pnpm"} :::tab{value="npm 7+"} @@ -68,6 +76,14 @@ Follow these steps to migrate your project to Hardhat Toolbox. ::: + :::tab{value="pnpm"} + + ``` + pnpm add --D @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-ignition-ethers @nomicfoundation/hardhat-network-helpers @nomicfoundation/hardhat-chai-matchers@1 @nomiclabs/hardhat-ethers @nomiclabs/hardhat-etherscan chai@4 ethers@5 hardhat-gas-reporter solidity-coverage @typechain/hardhat typechain @typechain/ethers-v6 + ``` + + ::: + :::: 3. Finally, remove `hardhat-waffle` from your imported plugins and import the Toolbox instead: diff --git a/docs/src/content/hardhat-runner/docs/advanced/using-esm.md b/docs/src/content/hardhat-runner/docs/advanced/using-esm.md index ce6c7e4002..6fd9884653 100644 --- a/docs/src/content/hardhat-runner/docs/advanced/using-esm.md +++ b/docs/src/content/hardhat-runner/docs/advanced/using-esm.md @@ -20,7 +20,7 @@ The following sections explain how to use ES modules in new or existing Hardhat If you want to start a Hardhat project that uses ES modules by default, first you have to initialize a Node.js project: -::::tabsgroup{options="npm 7+,npm 6,yarn"} +::::tabsgroup{options="npm 7+,npm 6,yarn,pnpm"} :::tab{value="npm 7+"} @@ -46,13 +46,20 @@ yarn init -y ::: +:::tab{value="pnpm"} + +``` +pnpm init +``` +::: + :::: Open the `package.json` that was created and add a `"type": "module"` entry. This will make the project use ESM by default. After that, install Hardhat: -::::tabsgroup{options="npm 7+,npm 6,yarn"} +::::tabsgroup{options="npm 7+,npm 6,yarn,pnpm"} :::tab{value="npm 7+"} @@ -78,6 +85,13 @@ yarn add --dev hardhat ::: +:::tab{value="pnpm"} + +``` +pnpm add -D hardhat +``` +::: + :::: and run `npx hardhat init` to create a Hardhat project: diff --git a/docs/src/content/hardhat-runner/docs/getting-started/index.md b/docs/src/content/hardhat-runner/docs/getting-started/index.md index 55b9dcbeed..f714378112 100644 --- a/docs/src/content/hardhat-runner/docs/getting-started/index.md +++ b/docs/src/content/hardhat-runner/docs/getting-started/index.md @@ -27,7 +27,7 @@ To install it, you need to create an npm project by going to an empty folder, ru Once your project is ready, you should run -::::tabsgroup{options="npm 7+,npm 6,yarn"} +::::tabsgroup{options="npm 7+,npm 6,yarn,pnpm"} :::tab{value="npm 7+"} @@ -53,6 +53,14 @@ yarn add --dev hardhat ::: +:::tab{value=pnpm} + +``` +pnpm add -D hardhat +``` + +::: + :::: To use your local installation of Hardhat, you need to use `npx` to run it (i.e. `npx hardhat init`). diff --git a/docs/src/content/hardhat-runner/docs/guides/project-setup.md b/docs/src/content/hardhat-runner/docs/guides/project-setup.md index 728b0436c6..c25dac3190 100644 --- a/docs/src/content/hardhat-runner/docs/guides/project-setup.md +++ b/docs/src/content/hardhat-runner/docs/guides/project-setup.md @@ -10,7 +10,7 @@ Hardhat projects are Node.js projects with the `hardhat` package installed and a To initialize a Node.js project you can use [npm](https://docs.npmjs.com/cli/v8) or [yarn](https://classic.yarnpkg.com/). We recommend using npm 7 or later: -::::tabsgroup{options="npm 7+,npm 6,yarn"} +::::tabsgroup{options="npm 7+,npm 6,yarn,pnpm"} :::tab{value="npm 7+"} @@ -36,11 +36,19 @@ yarn init -y ::: +:::tab{value="pnpm"} + +``` +pnpm init +``` + +::: + :::: Then you need to install Hardhat: -::::tabsgroup{options="npm 7+,npm 6,yarn"} +::::tabsgroup{options="npm 7+,npm 6,yarn,pnpm"} :::tab{value="npm 7+"} @@ -66,6 +74,14 @@ yarn add --dev hardhat ::: +:::tab{value="pnpm"} + +``` +pnpm add -D hardhat +``` + +::: + :::: If you run `npx hardhat init` now, you will be shown some options to facilitate project creation: diff --git a/docs/src/content/hardhat-runner/docs/supporter-guides/oracles.md b/docs/src/content/hardhat-runner/docs/supporter-guides/oracles.md index 619394d7c1..b61719cfeb 100644 --- a/docs/src/content/hardhat-runner/docs/supporter-guides/oracles.md +++ b/docs/src/content/hardhat-runner/docs/supporter-guides/oracles.md @@ -11,7 +11,7 @@ Oracles provide a bridge between the real-world and on-chain smart contracts by Oracles play a critical role in facilitating the full potential of smart contract utility. Without a reliable connection to real-world data, smart contracts cannot effectively serve the real-world. - + ## Why are they needed? @@ -94,7 +94,7 @@ Usually, you will create and manage your subscriptions on the [VRF Subscription You will need to install it by typing: -::::tabsgroup{options="npm 7+,npm 6,yarn"} +::::tabsgroup{options="npm 7+,npm 6,yarn,pnpm"} :::tab{value="npm 7+"} @@ -120,6 +120,13 @@ yarn add --dev @chainlink/hardhat-chainlink ::: +:::tab{value="pnpm"} + +``` +pnpm add -D @chainlink/hardhat-chainlink +``` +::: + :::: And import it inside the `hardhat.config` file: diff --git a/docs/temp/tabsConfig.json b/docs/temp/tabsConfig.json index 963eb3ad99..91f0723903 100644 --- a/docs/temp/tabsConfig.json +++ b/docs/temp/tabsConfig.json @@ -1,6 +1,6 @@ { "TypeScript/JavaScript": "TypeScript", - "npm 7+/npm 6/yarn": "npm 7+", + "npm 7+/npm 6/yarn/pnpm": "npm 7+", "Infura/Alchemy": "Infura", "Infura | Typescript/Alchemy | Typescript/Infura | Javascript/Alchemy | Javascript": "Infura | Typescript" } From a5bcb2caf2ce1fe8ddc4c0ed4dddedd49b8b65fa Mon Sep 17 00:00:00 2001 From: iosh Date: Sat, 24 Aug 2024 23:13:19 +0800 Subject: [PATCH 2/3] chore: add pnpm to more pages --- .../docs/migrate-from-waffle.md | 19 +++++++++++-- .../hardhat-chai-matchers/docs/overview.md | 8 +++++- .../hardhat-network-helpers/docs/overview.md | 8 +++++- .../ignition/docs/advanced/migrating.md | 18 ++++++++++-- .../ignition/docs/getting-started/index.md | 8 +++++- .../content/ignition/docs/guides/ledger.md | 9 +++++- .../docs/guides/upgradeable-proxies.md | 8 +++++- docs/src/content/ignition/docs/guides/viem.md | 9 +++++- .../creating-a-new-hardhat-project.md | 28 +++++++++++++++++-- 9 files changed, 102 insertions(+), 13 deletions(-) diff --git a/docs/src/content/hardhat-chai-matchers/docs/migrate-from-waffle.md b/docs/src/content/hardhat-chai-matchers/docs/migrate-from-waffle.md index 485704db0d..d759872cce 100644 --- a/docs/src/content/hardhat-chai-matchers/docs/migrate-from-waffle.md +++ b/docs/src/content/hardhat-chai-matchers/docs/migrate-from-waffle.md @@ -8,7 +8,7 @@ The `@nomicfoundation/hardhat-chai-matchers` plugin is meant to be a drop-in rep 1. Uninstall the `@nomiclabs/hardhat-waffle` and `ethereum-waffle` packages: - ::::tabsgroup{options="npm 7+,npm 6,yarn"} + ::::tabsgroup{options="npm 7+,npm 6,yarn,pnpm"} :::tab{value="npm 7+"} @@ -34,11 +34,18 @@ The `@nomicfoundation/hardhat-chai-matchers` plugin is meant to be a drop-in rep ::: + :::tab{value="pnpm"} + ``` + pnpm remove @nomiclabs/hardhat-waffle ethereum-waffle + ``` + + ::: + :::: 2. Then install the Hardhat Chai Matchers plugin: - ::::tabsgroup{options="npm 7+,npm 6,yarn"} + ::::tabsgroup{options="npm 7+,npm 6,yarn,pnpm"} :::tab{value="npm 7+"} @@ -64,6 +71,14 @@ The `@nomicfoundation/hardhat-chai-matchers` plugin is meant to be a drop-in rep ::: + :::tab{value="pnpm"} + + ``` + pnpm add -D @nomicfoundation/hardhat-chai-matchers + ``` + + ::: + :::: 3. In your Hardhat config, import the Hardhat Chai Matchers plugin and remove the `hardhat-waffle` one: diff --git a/docs/src/content/hardhat-chai-matchers/docs/overview.md b/docs/src/content/hardhat-chai-matchers/docs/overview.md index d3bdf25d95..72504a007f 100644 --- a/docs/src/content/hardhat-chai-matchers/docs/overview.md +++ b/docs/src/content/hardhat-chai-matchers/docs/overview.md @@ -17,7 +17,7 @@ The `hardhat-chai-matchers` plugin is designed to work with `hardhat-ethers`. At ## Installation -::::tabsgroup{options="npm 7+,npm 6,yarn"} +::::tabsgroup{options="npm 7+,npm 6,yarn,pnpm"} :::tab{value="npm 7+"} @@ -43,6 +43,12 @@ yarn add --dev @nomicfoundation/hardhat-chai-matchers ::: +:::tab{value="pnpm"} +``` +pnpm add -D @nomicfoundation/hardhat-chai-matchers +``` + +::: :::: ## How can I use it? diff --git a/docs/src/content/hardhat-network-helpers/docs/overview.md b/docs/src/content/hardhat-network-helpers/docs/overview.md index 5730f9a16d..3a2d2ddc55 100644 --- a/docs/src/content/hardhat-network-helpers/docs/overview.md +++ b/docs/src/content/hardhat-network-helpers/docs/overview.md @@ -13,7 +13,7 @@ This package provides convenience functions for quick and easy interaction with ## Installation -::::tabsgroup{options="npm 7+,npm 6,yarn"} +::::tabsgroup{options="npm 7+,npm 6,yarn,pnpm"} :::tab{value="npm 7+"} @@ -39,6 +39,12 @@ yarn add --dev @nomicfoundation/hardhat-network-helpers ::: +:::tab{value="pnpm"} +``` +pnpm add -D @nomicfoundation/hardhat-network-helpers +``` +::: + :::: ## Usage diff --git a/docs/src/content/ignition/docs/advanced/migrating.md b/docs/src/content/ignition/docs/advanced/migrating.md index 7e801c9470..1afddc464e 100644 --- a/docs/src/content/ignition/docs/advanced/migrating.md +++ b/docs/src/content/ignition/docs/advanced/migrating.md @@ -8,7 +8,7 @@ To get started, we’ll uninstall the `hardhat-deploy` plugin and install the Ha 1. Remove the `hardhat-deploy` packages from your project: - ::::tabsgroup{options="npm,yarn"} + ::::tabsgroup{options="npm,yarn,pnpm"} :::tab{value="npm"} @@ -26,11 +26,17 @@ To get started, we’ll uninstall the `hardhat-deploy` plugin and install the Ha ::: + :::tab{value="pnpm"} + + ```sh + pnpm remove hardhat-deploy hardhat-deploy-ethers + ``` + ::: :::: 2. Install the Hardhat Ignition package and `hardhat-network-helpers` to provide additional testing support as a replacement for `hardhat-deploy` functionality like EVM snapshots: - ::::tabsgroup{options="npm,yarn"} + ::::tabsgroup{options="npm,yarn,pnpm"} :::tab{value="npm"} @@ -48,6 +54,14 @@ To get started, we’ll uninstall the `hardhat-deploy` plugin and install the Ha ::: + :::tab{value="pnpm"} + + ```sh + pnpm add -D @nomicfoundation/hardhat-ignition-ethers @nomicfoundation/hardhat-network-helpers + ``` + + ::: + :::: 3. Update the project’s `hardhat.config` file to remove `hardhat-deploy` and `hardhat-deploy-ethers` and instead import Hardhat Ignition: diff --git a/docs/src/content/ignition/docs/getting-started/index.md b/docs/src/content/ignition/docs/getting-started/index.md index e1dd48a3d6..0edea6a8c0 100644 --- a/docs/src/content/ignition/docs/getting-started/index.md +++ b/docs/src/content/ignition/docs/getting-started/index.md @@ -40,7 +40,7 @@ If you prefer to use **Viem** instead of **ethers**, check out the [Viem guide]( Once you have a Hardhat project ready, open a terminal in its root directory, and run: -::::tabsgroup{options="npm 7+,npm 6,yarn"} +::::tabsgroup{options="npm 7+,npm 6,yarn,pnpm"} :::tab{value="npm 7+"} @@ -66,6 +66,12 @@ yarn add --dev @nomicfoundation/hardhat-ignition-ethers @nomicfoundation/hardhat ::: +:::tab{value="pnpm"} +```sh +pnpm add -D @nomicfoundation/hardhat-ignition-ethers @nomicfoundation/hardhat-ethers @nomicfoundation/hardhat-ignition @nomicfoundation/hardhat-verify @nomicfoundation/ignition-core ethers +``` +::: + :::: Finally, add this to your config file to [enable the plugin](../../../hardhat-runner/docs/guides/project-setup.md#plugins-and-dependencies): diff --git a/docs/src/content/ignition/docs/guides/ledger.md b/docs/src/content/ignition/docs/guides/ledger.md index a3574d86d9..81118b230c 100644 --- a/docs/src/content/ignition/docs/guides/ledger.md +++ b/docs/src/content/ignition/docs/guides/ledger.md @@ -4,7 +4,7 @@ Hardhat Ignition supports deploying contracts using a Ledger hardware wallet via The first step is to install the `hardhat-ledger` plugin: -::::tabsgroup{options="npm,yarn"} +::::tabsgroup{options="npm,yarn,pnpm"} :::tab{value="npm"} @@ -22,6 +22,13 @@ yarn add --dev @nomicfoundation/hardhat-ledger ::: +:::tab{value="pnpm"} +```sh +pnpm add -D @nomicfoundation/hardhat-ledger +``` + +::: + :::: ## Configuring the Ledger plugin diff --git a/docs/src/content/ignition/docs/guides/upgradeable-proxies.md b/docs/src/content/ignition/docs/guides/upgradeable-proxies.md index 27ac0c1f10..e49fd170d0 100644 --- a/docs/src/content/ignition/docs/guides/upgradeable-proxies.md +++ b/docs/src/content/ignition/docs/guides/upgradeable-proxies.md @@ -14,7 +14,7 @@ The finished code for this guide can be found in the [Hardhat Ignition monorepo] Before we get started, make sure you have the OpenZeppelin Contracts library installed in your project. You can install it using npm or yarn: -::::tabsgroup{options="npm,yarn"} +::::tabsgroup{options="npm,yarn,pnpm"} :::tab{value="npm"} @@ -32,6 +32,12 @@ yarn add @openzeppelin/contracts ::: +:::tab{value="pnpm"} +```sh +pnpm add @openzeppelin/contracts +``` +::: + :::: ## Getting to know our contracts diff --git a/docs/src/content/ignition/docs/guides/viem.md b/docs/src/content/ignition/docs/guides/viem.md index bae604be3d..db82800390 100644 --- a/docs/src/content/ignition/docs/guides/viem.md +++ b/docs/src/content/ignition/docs/guides/viem.md @@ -15,7 +15,7 @@ You can also follow [Hardhat's Viem Quick Start](../../../hardhat-runner/docs/ad From the root directory of your Hardhat project run: -::::tabsgroup{options="npm 7+,npm 6,yarn"} +::::tabsgroup{options="npm 7+,npm 6,yarn,pnpm"} :::tab{value="npm 7+"} @@ -41,6 +41,13 @@ yarn add --dev @nomicfoundation/hardhat-ignition-viem @nomicfoundation/hardhat-i ::: +:::tab{value="pnpm"} +```shell +pnpm add -D @nomicfoundation/hardhat-ignition-viem @nomicfoundation/hardhat-ignition @nomicfoundation/hardhat-verify @nomicfoundation/hardhat-viem @nomicfoundation/ignition-core typescript viem +``` + +::: + :::: Then [enable the plugin](../../../hardhat-runner/docs/guides/project-setup.md#plugins-and-dependencies) in your config file: diff --git a/docs/src/content/tutorial/creating-a-new-hardhat-project.md b/docs/src/content/tutorial/creating-a-new-hardhat-project.md index e2cc269b94..38c76a0716 100644 --- a/docs/src/content/tutorial/creating-a-new-hardhat-project.md +++ b/docs/src/content/tutorial/creating-a-new-hardhat-project.md @@ -19,7 +19,7 @@ Use the tabs in the snippets to select your preferred package manager. We recomm :::: -::::tabsgroup{options="npm 7+,npm 6,yarn"} +::::tabsgroup{options="npm 7+,npm 6,yarn,pnpm"} :::tab{value="npm 7+"} @@ -45,11 +45,18 @@ yarn init ::: +:::tab{value="pnpm"} +``` +pnpm init +``` + +::: + :::: Now we can install Hardhat: -::::tabsgroup{options="npm 7+,npm 6,yarn"} +::::tabsgroup{options="npm 7+,npm 6,yarn,pnpm"} :::tab{value="npm 7+"} @@ -75,6 +82,14 @@ yarn add --dev hardhat ::: + +:::tab{value="pnpm"} +``` +pnpm add -D hardhat +``` + +::: + :::: In the same directory where you installed Hardhat run: @@ -130,7 +145,7 @@ In this tutorial we are going to use our recommended plugin, [`@nomicfoundation/ To install it, run this in your project directory: -::::tabsgroup{options="npm 7+,npm 6,yarn"} +::::tabsgroup{options="npm 7+,npm 6,yarn,pnpm"} :::tab{value="npm 7+"} @@ -156,6 +171,13 @@ yarn add --dev @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-ignitio ::: +:::tab{value="pnpm"} + +``` +pnpm add -D @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-ignition @nomicfoundation/hardhat-ignition-ethers @nomicfoundation/hardhat-network-helpers @nomicfoundation/hardhat-chai-matchers @nomicfoundation/hardhat-ethers @nomicfoundation/hardhat-verify chai@4 ethers hardhat-gas-reporter solidity-coverage @typechain/hardhat typechain @typechain/ethers-v6 +``` +::: + :::: Add the highlighted line to your `hardhat.config.js` so that it looks like this: From 22ceb92934f34de5d2ce642bf8ff313f13532b4c Mon Sep 17 00:00:00 2001 From: iosh Date: Wed, 4 Sep 2024 10:10:12 +0800 Subject: [PATCH 3/3] chore: update pnpm commands and format doc --- .../hardhat-chai-matchers/docs/migrate-from-waffle.md | 1 + docs/src/content/hardhat-chai-matchers/docs/overview.md | 2 ++ docs/src/content/hardhat-network-helpers/docs/overview.md | 2 ++ .../src/content/hardhat-runner/docs/advanced/create-task.md | 2 +- .../docs/advanced/migrating-from-hardhat-waffle.md | 2 +- docs/src/content/hardhat-runner/docs/advanced/using-esm.md | 2 ++ .../content/hardhat-runner/docs/supporter-guides/oracles.md | 1 + docs/src/content/ignition/docs/advanced/migrating.md | 2 ++ docs/src/content/ignition/docs/getting-started/index.md | 4 +++- docs/src/content/ignition/docs/guides/ledger.md | 1 + .../src/content/ignition/docs/guides/upgradeable-proxies.md | 2 ++ docs/src/content/ignition/docs/guides/viem.md | 3 ++- docs/src/content/tutorial/creating-a-new-hardhat-project.md | 6 ++++-- 13 files changed, 24 insertions(+), 6 deletions(-) diff --git a/docs/src/content/hardhat-chai-matchers/docs/migrate-from-waffle.md b/docs/src/content/hardhat-chai-matchers/docs/migrate-from-waffle.md index d759872cce..6cc9277f73 100644 --- a/docs/src/content/hardhat-chai-matchers/docs/migrate-from-waffle.md +++ b/docs/src/content/hardhat-chai-matchers/docs/migrate-from-waffle.md @@ -35,6 +35,7 @@ The `@nomicfoundation/hardhat-chai-matchers` plugin is meant to be a drop-in rep ::: :::tab{value="pnpm"} + ``` pnpm remove @nomiclabs/hardhat-waffle ethereum-waffle ``` diff --git a/docs/src/content/hardhat-chai-matchers/docs/overview.md b/docs/src/content/hardhat-chai-matchers/docs/overview.md index 72504a007f..82c6073aa4 100644 --- a/docs/src/content/hardhat-chai-matchers/docs/overview.md +++ b/docs/src/content/hardhat-chai-matchers/docs/overview.md @@ -44,11 +44,13 @@ yarn add --dev @nomicfoundation/hardhat-chai-matchers ::: :::tab{value="pnpm"} + ``` pnpm add -D @nomicfoundation/hardhat-chai-matchers ``` ::: + :::: ## How can I use it? diff --git a/docs/src/content/hardhat-network-helpers/docs/overview.md b/docs/src/content/hardhat-network-helpers/docs/overview.md index 3a2d2ddc55..e7294e8973 100644 --- a/docs/src/content/hardhat-network-helpers/docs/overview.md +++ b/docs/src/content/hardhat-network-helpers/docs/overview.md @@ -40,9 +40,11 @@ yarn add --dev @nomicfoundation/hardhat-network-helpers ::: :::tab{value="pnpm"} + ``` pnpm add -D @nomicfoundation/hardhat-network-helpers ``` + ::: :::: diff --git a/docs/src/content/hardhat-runner/docs/advanced/create-task.md b/docs/src/content/hardhat-runner/docs/advanced/create-task.md index 865ae40319..11fbde9ace 100644 --- a/docs/src/content/hardhat-runner/docs/advanced/create-task.md +++ b/docs/src/content/hardhat-runner/docs/advanced/create-task.md @@ -79,7 +79,7 @@ yarn add --dev @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-network :::tab{value="pnpm"} ``` -pnpm add -D @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-network-helpers @nomicfoundation/hardhat-chai-matchers @nomicfoundation/hardhat-ethers @nomicfoundation/hardhat-verify chai@4 ethers hardhat-gas-reporter solidity-coverage @typechain/hardhat typechain @typechain/ethers-v6 +pnpm add -D @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-network-helpers chai@4 ethers ``` ::: diff --git a/docs/src/content/hardhat-runner/docs/advanced/migrating-from-hardhat-waffle.md b/docs/src/content/hardhat-runner/docs/advanced/migrating-from-hardhat-waffle.md index 0080c13707..dcc54b86cb 100644 --- a/docs/src/content/hardhat-runner/docs/advanced/migrating-from-hardhat-waffle.md +++ b/docs/src/content/hardhat-runner/docs/advanced/migrating-from-hardhat-waffle.md @@ -79,7 +79,7 @@ Follow these steps to migrate your project to Hardhat Toolbox. :::tab{value="pnpm"} ``` - pnpm add --D @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-ignition-ethers @nomicfoundation/hardhat-network-helpers @nomicfoundation/hardhat-chai-matchers@1 @nomiclabs/hardhat-ethers @nomiclabs/hardhat-etherscan chai@4 ethers@5 hardhat-gas-reporter solidity-coverage @typechain/hardhat typechain @typechain/ethers-v6 + pnpm add -D @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-network-helpers ethers chai@4 ``` ::: diff --git a/docs/src/content/hardhat-runner/docs/advanced/using-esm.md b/docs/src/content/hardhat-runner/docs/advanced/using-esm.md index 6fd9884653..a697ab523e 100644 --- a/docs/src/content/hardhat-runner/docs/advanced/using-esm.md +++ b/docs/src/content/hardhat-runner/docs/advanced/using-esm.md @@ -51,6 +51,7 @@ yarn init -y ``` pnpm init ``` + ::: :::: @@ -90,6 +91,7 @@ yarn add --dev hardhat ``` pnpm add -D hardhat ``` + ::: :::: diff --git a/docs/src/content/hardhat-runner/docs/supporter-guides/oracles.md b/docs/src/content/hardhat-runner/docs/supporter-guides/oracles.md index b61719cfeb..8a8213214d 100644 --- a/docs/src/content/hardhat-runner/docs/supporter-guides/oracles.md +++ b/docs/src/content/hardhat-runner/docs/supporter-guides/oracles.md @@ -125,6 +125,7 @@ yarn add --dev @chainlink/hardhat-chainlink ``` pnpm add -D @chainlink/hardhat-chainlink ``` + ::: :::: diff --git a/docs/src/content/ignition/docs/advanced/migrating.md b/docs/src/content/ignition/docs/advanced/migrating.md index 1afddc464e..ce53c88222 100644 --- a/docs/src/content/ignition/docs/advanced/migrating.md +++ b/docs/src/content/ignition/docs/advanced/migrating.md @@ -31,7 +31,9 @@ To get started, we’ll uninstall the `hardhat-deploy` plugin and install the Ha ```sh pnpm remove hardhat-deploy hardhat-deploy-ethers ``` + ::: + :::: 2. Install the Hardhat Ignition package and `hardhat-network-helpers` to provide additional testing support as a replacement for `hardhat-deploy` functionality like EVM snapshots: diff --git a/docs/src/content/ignition/docs/getting-started/index.md b/docs/src/content/ignition/docs/getting-started/index.md index 0edea6a8c0..78e3678450 100644 --- a/docs/src/content/ignition/docs/getting-started/index.md +++ b/docs/src/content/ignition/docs/getting-started/index.md @@ -67,9 +67,11 @@ yarn add --dev @nomicfoundation/hardhat-ignition-ethers @nomicfoundation/hardhat ::: :::tab{value="pnpm"} + ```sh -pnpm add -D @nomicfoundation/hardhat-ignition-ethers @nomicfoundation/hardhat-ethers @nomicfoundation/hardhat-ignition @nomicfoundation/hardhat-verify @nomicfoundation/ignition-core ethers +pnpm add -D @nomicfoundation/hardhat-ignition-ethers @nomicfoundation/hardhat-ignition ethers ``` + ::: :::: diff --git a/docs/src/content/ignition/docs/guides/ledger.md b/docs/src/content/ignition/docs/guides/ledger.md index 81118b230c..8b8a31e445 100644 --- a/docs/src/content/ignition/docs/guides/ledger.md +++ b/docs/src/content/ignition/docs/guides/ledger.md @@ -23,6 +23,7 @@ yarn add --dev @nomicfoundation/hardhat-ledger ::: :::tab{value="pnpm"} + ```sh pnpm add -D @nomicfoundation/hardhat-ledger ``` diff --git a/docs/src/content/ignition/docs/guides/upgradeable-proxies.md b/docs/src/content/ignition/docs/guides/upgradeable-proxies.md index e49fd170d0..17ff9ac992 100644 --- a/docs/src/content/ignition/docs/guides/upgradeable-proxies.md +++ b/docs/src/content/ignition/docs/guides/upgradeable-proxies.md @@ -33,9 +33,11 @@ yarn add @openzeppelin/contracts ::: :::tab{value="pnpm"} + ```sh pnpm add @openzeppelin/contracts ``` + ::: :::: diff --git a/docs/src/content/ignition/docs/guides/viem.md b/docs/src/content/ignition/docs/guides/viem.md index db82800390..dc5a051b11 100644 --- a/docs/src/content/ignition/docs/guides/viem.md +++ b/docs/src/content/ignition/docs/guides/viem.md @@ -42,8 +42,9 @@ yarn add --dev @nomicfoundation/hardhat-ignition-viem @nomicfoundation/hardhat-i ::: :::tab{value="pnpm"} + ```shell -pnpm add -D @nomicfoundation/hardhat-ignition-viem @nomicfoundation/hardhat-ignition @nomicfoundation/hardhat-verify @nomicfoundation/hardhat-viem @nomicfoundation/ignition-core typescript viem +pnpm add -D @nomicfoundation/hardhat-ignition-viem viem typescript ``` ::: diff --git a/docs/src/content/tutorial/creating-a-new-hardhat-project.md b/docs/src/content/tutorial/creating-a-new-hardhat-project.md index 38c76a0716..000814ac1c 100644 --- a/docs/src/content/tutorial/creating-a-new-hardhat-project.md +++ b/docs/src/content/tutorial/creating-a-new-hardhat-project.md @@ -46,6 +46,7 @@ yarn init ::: :::tab{value="pnpm"} + ``` pnpm init ``` @@ -82,8 +83,8 @@ yarn add --dev hardhat ::: - :::tab{value="pnpm"} + ``` pnpm add -D hardhat ``` @@ -174,8 +175,9 @@ yarn add --dev @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-ignitio :::tab{value="pnpm"} ``` -pnpm add -D @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-ignition @nomicfoundation/hardhat-ignition-ethers @nomicfoundation/hardhat-network-helpers @nomicfoundation/hardhat-chai-matchers @nomicfoundation/hardhat-ethers @nomicfoundation/hardhat-verify chai@4 ethers hardhat-gas-reporter solidity-coverage @typechain/hardhat typechain @typechain/ethers-v6 +pnpm add -D @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-ignition @nomicfoundation/hardhat-network-helpers chai@4 ethers ``` + ::: ::::