Skip to content

Commit

Permalink
feat: add step removing conflicting hardhat plugins (#245)
Browse files Browse the repository at this point in the history
# 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 <[email protected]>
  • Loading branch information
cytadela8 and uF4No authored Oct 29, 2024
1 parent 21945db commit 94c1ed3
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 94c1ed3

Please sign in to comment.