From 94c1ed385d9d3c43eced40529b19cbcc291c582c Mon Sep 17 00:00:00 2001 From: Artur Puzio Date: Tue, 29 Oct 2024 10:55:43 +0100 Subject: [PATCH] feat: add step removing conflicting hardhat plugins (#245) # Description - add step to hardhat migration guide - "remove conflicting plugins" ## Additional context - some builders forget to do this. Not doing this results in hard to understand error messages --------- Co-authored-by: Antonio --- .../20.guides/20.migrating-to-zksync.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/content/00.build/40.tooling/20.hardhat/20.guides/20.migrating-to-zksync.md b/content/00.build/40.tooling/20.hardhat/20.guides/20.migrating-to-zksync.md index 568e01c6..fbed8175 100644 --- a/content/00.build/40.tooling/20.hardhat/20.guides/20.migrating-to-zksync.md +++ b/content/00.build/40.tooling/20.hardhat/20.guides/20.migrating-to-zksync.md @@ -47,7 +47,21 @@ You can learn more about each plugin in the [Getting started section](/build/too import "@matterlabs/hardhat-zksync"; ``` -3. Add the preferred ZKsync networks to the `hardhat.config.ts` file: +3. Remove conflicting plugin imports + + - `@nomicfoundation/hardhat-ethers`: `@matterlabs/hardhat-zksync` includes `hardhat-ethers` extended with with support for ZKsync and non-ZKsync networks. + - `@openzeppelin/hardhat-upgrades`: `@matterlabs/hardhat-zksync` includes `hardhat-upgrades` extended with support for ZKsync and non-ZKsync networks. + - `@nomicfoundation/hardhat-toolbox`: this plugin includes `@nomicfoundation/hardhat-ethers` which can cause conflicts. Import necessary + components separately excluding `@nomicfoundation/hardhat-ethers`. + + ```ts + // import "@nomicfoundation/hardhat-toolbox" + // import "@nomicfoundation/hardhat-ethers" + // import "@openzeppelin/hardhat-upgrades" + import "@matterlabs/hardhat-zksync" + ``` + +4. Add the preferred ZKsync networks to the `hardhat.config.ts` file: ```js networks: {