1.2.0 • Published 8 months ago

@matterlabs/hardhat-zksync-node v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

hardhat-zksync-node 🚀

ZKsync Era Hardhat plugin to run the ZKsync era-test-node locally.

Era Logo

⚠️ Version Compatibility Warning

Ensure you are using the correct version of the plugin with ethers:

  • For plugin version <1.0.0:

    • Compatible with ethers v5.
  • For plugin version ≥1.0.0:

    • Compatible with ethers v6 (⭐ Recommended)

From version 1.1.1, the plugin is not dependent on a specific ethers version and can be used for both ethers v5 and v6 projects.

📥 Installation

To install hardhat-zksync-node plugin, run:

npm install -D @matterlabs/hardhat-zksync-node

or

yarn add -D @matterlabs/hardhat-zksync-node

🕹 Commands

yarn hardhat node-zksync

This command runs a local ZKsync In-memory node by initiating a JSON-RPC server. It uses the provided or default configurations to set up and run the ZKsync node, allowing for blockchain operations in a local environment. The command also handles tasks such as downloading the necessary JSON-RPC server binary if it's not already present.

🔧 Command📄 Description
--portPort on which the server should listen. Defaults to 8011.
--logLog filter level. Accepted values are: error, warn, info, and debug. Defaults to info.
--log-file-pathPath to the file where logs should be written. Defaults to era_test_node.log
--cacheType of cache to use. Accepted values are: none, disk, and memory. Defaults to disk.
--cache-dirDirectory location for the disk cache. Defaults to .cache
--reset-cacheFlag to reset the local disk cache.
--show-callsDetermines which call debug information to show. Accepted values are: none, user, system, and all. Defaults to none.
--show-storage-logsDetermines which storage logs to show. Accepted values are: none, read, write, and all. Defaults to none.
--show-vm-detailsSpecifies the level of Virtual Machine (VM) details to show. Accepted values are: none and all. Defaults to none.
--show-gas-detailsSpecifies the level of gas details to show. Accepted values are: none and all. Defaults to none.
--resolve-hashesWhen enabled, it makes the debug log more readable but might decrease performance.
--dev-use-local-contractsFlag to load locally compiled system contracts. Useful when making changes to system contracts or bootloader.
---forkStarts a local network that is a fork of another network. Accepted values are: testnet, mainnet, or a specific URL.
--fork-block-numberSpecifies the block height at which to fork.
--replay-txTransaction hash to replay.

Restrictions: The --replay-tx and --fork-block-number parameters cannot be specified simultaneously.

📝 Documentation

In addition to the hardhat-zksync-node, ZKsync's Era website offers a variety of resources including:

Guides to get started: Learn how to start building on ZKsync Era.\ Hardhat ZKsync Era plugins: Overview and guides for all Hardhat ZKsync Era plugins.\ ZK Chains: Deep dive into the concept of ZK chains.

🤝 Contributing

Contributions are always welcome! Feel free to open any issue or send a pull request.

Go to CONTRIBUTING.md to learn about steps and best practices for contributing to ZKsync hardhat tooling base repository.

🙌 Feedback, help and news

ZKsync Era Discord server: for questions and feedback.\ Follow ZKsync Era on Twitter

Happy building! 👷‍♀️👷‍♂️

1.2.0

8 months ago

1.1.1

11 months ago

1.1.0

12 months ago

0.2.0

12 months ago

1.0.3

1 year ago

0.1.0

1 year ago

1.0.2

1 year ago

0.0.2

1 year ago

1.0.1

1 year ago

0.0.1

2 years ago

1.0.0

2 years ago

0.0.1-beta.7

2 years ago

0.0.1-beta.6

2 years ago

0.0.1-beta.5

2 years ago

0.0.1-beta.4

2 years ago

0.0.1-beta.3

2 years ago

0.0.1-beta.2

2 years ago

0.0.1-beta.1

2 years ago