Skip to content

Commit

Permalink
fix: hardhat-network-helpers and withdraw delay info (#226)
Browse files Browse the repository at this point in the history
# Description

- Removes duplicated migration guide
- Updates info about hardhat-network-helpers plugin
- Updates info about withdraw delay and governance

## Linked Issues

N/A

## Additional context
  • Loading branch information
uF4No authored Sep 24, 2024
1 parent 922f45b commit 88ea12d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 578 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ You can learn more about each plugin in the [Getting started section](/build/too

::

1. Import the plugin at the top of the `hardhat.config.ts` file:
2. Import the plugin in the `hardhat.config.ts` file. If your project has multiple plugins, import `@matterlabs/hardhat-zksync` last:

```ts
// Other Hardhat plugin imports above
import "@matterlabs/hardhat-zksync";
```

1. Add the preferred ZKsync networks to the `hardhat.config.ts` file:
3. Add the preferred ZKsync networks to the `hardhat.config.ts` file:

```js
networks: {
Expand Down Expand Up @@ -197,8 +198,11 @@ ZKSync provides different EraVM node implementations to test smart contracts loc
- In-Memory Node: fast L2 node with non-persistent state.
- Dockerized setup: L1 and L2 nodes with persistent state but slower performance.

::callout{icon="i-heroicons-information-circle" color="blue"}
Unless your project contains L1-L2 features, testing with the In-Memory Node is recommended, which is included in the `@matterlabs/hardhat-zksync` plugin.

::callout{icon="i-heroicons-exclamation-triangle" color="amber"}
In version `1.0.12`, `hardhat-network-helpers` introduced support for both In-Memory Node and Dockerized setups, allowing methods
such as `loadFixture` to be utilized in test files.
::

You can read more about each node in the [Testing section of the docs](/build/test-and-debug).
Expand All @@ -210,10 +214,6 @@ To run tests using In-Memory Node, follow these steps:
1. Add the `zksync:true` flag to the `hardhat` network in the `hardhat.config.ts` file to override Hardhat's default node with ZKsync In-Memory Node.
1. Run the test task with `npx hardhat test --network hardhat` (or make `hardhat` the default network).
::callout{icon="i-heroicons-exclamation-triangle" color="amber"}
Methods from `hardhat-network-helpers` like `loadFixture` currently do not support testing with the In-Memory Node.
::
You can find more info about testing with the In-Memory-Node in [Hardhat-ZKsync node](/build/tooling/hardhat/plugins/hardhat-zksync-node#running-hardhats-test-task-with-hardhat-zksync-node).
### Running tests on Dockerized setup
Expand Down Expand Up @@ -404,7 +404,7 @@ await boxV2.waitForDeployment();
```typescript [hardhat-zksync-upgradeable]
const upgradableProxyAddress = "UPGRADEABLE_PROXY_ADDRESS";
const boxV2ContractFactory = await hre.ethers.getContractFactory("BoxV2");
const boxV2 = await hre.upgrades.upgradeProxy(upgradableProxyAddress, boxV2ContractFactory);
const boxV2 = await hre.upgrades.upgradeBeacon(upgradableProxyAddress, boxV2ContractFactory);
await boxV2.waitForDeployment();
```

Expand Down
Loading

0 comments on commit 88ea12d

Please sign in to comment.