Socket
Socket
Sign inDemoInstall

@matterlabs/hardhat-zksync-node

Package Overview
Dependencies
363
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @matterlabs/hardhat-zksync-node

Hardhat plugin to run zkSync era-test-node locally


Version published
Weekly downloads
10K
increased by11.75%
Maintainers
1
Install size
16.5 MB
Created
Weekly downloads
 

Readme

Source

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)

📥 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.
Hyperscaling: Deep dive into hyperscaling on zkSync Era.

🤝 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! 👷‍♀️👷‍♂️

Keywords

FAQs

Last updated on 21 Mar 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc