npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@matterlabs/hardhat-zksync-vyper

v1.4.0

Published

Hardhat plugin to compile Vyper smart contracts for the ZKsync network

Downloads

1,841

Readme

hardhat-zksync-vyper 🚀

Hardhat plugin that adds ZKsync-specific capabilities to vyper.

Era Logo

📥 Installation

To install hardhat-zksync-vyper plugin, run:

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

or

yarn add -D @matterlabs/hardhat-zksync-vyper @nomiclabs/hardhat-vyper

🔧 Setup

Scaffold a new project

Use the ZKsync Era cli to set up a project.

npx zksync-cli@latest create project greeter-vyper-example --template hardhat_vyper cd greeter-vyper-example

Update the hardhat.config.ts file with:

import "@matterlabs/hardhat-zksync-vyper";

const config: HardhatUserConfig = {
  zkvyper: {
    version: "latest", // Uses latest available in https://github.com/matter-labs/zkvyper-bin/
    settings: {
      // compilerPath: "zkvyper", // optional field with the path to the `zkvyper` binary.
      libraries: {}, // optional. References to non-inlinable libraries
      optimizer: {
        mode: '3' // optional. 3 by default, z to optimize bytecode size
        fallback_to_optimizing_for_size: false, // optional. Try to recompile with optimizer mode "z" if the bytecode is too large
      },
      experimental: {
        dockerImage: '', // deprecated
        tag: ''   // deprecated
      },
    },
  },
}
  ...

| 🔧 properties | 📄 Description | |----------------------------|--------------------------------------------------------------------------------------------------------------------------------------| | version | zkvyper compiler version. Default value is latest | | compilerSource | Indicates the compiler source and can be either binary. (A docker option is no longer recommended). | | compilerPath | Optional field with the path to the zkvyper binary. By default, the binary in $PATH is used. | | libraries | Define any non-inlinable libraries your contracts use as dependencies here | | optimizer | Compiler optimizations mode: 3 (default), fallback_to_optimizing_for_size: false (default) recommended for most projects. | | dockerImage | (deprecated) option used to identify the name of the compiler docker image. |

Learn more about compiling libraries.

Create a simple vyper contract

The ZKsync Era cli generates a contracts folder which includes a Greeter.sol contract.

  • Delete Greeter.sol from the contracts/ directory.
  • Add the equivalent Greeter.vy Vyper contract:
# @version ^0.3.3

greeting: constant(String[100]) = "Hello, World!"

@external
@view
def greet() -> String[100]:
    return self.greeting

Compile the contract

yarn hardhat compile

Create deployment script

First update the use-greeter.ts script, supplied by the CLI in the deploy/ directory by importing contract from correct location.

import * as ContractArtifact from "../artifacts-zk/contracts/Greeter.vy/Greeter.json";

Add private key to environment variables

Remove example from the .env.example file and add your private key to .

Deploy the contract

yarn hardhat deploy-zksync --script deploy-greeter.ts

Output

You should see something like this:

Running deploy function for the Greeter contract
The deployment is projected to cost 0.000135806 ETH
constructor args:0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000094869207468657265210000000000000000000000000000000000000000000000
Greeter was deployed to 0x7CDF8A4334fafE21B8dCCe70487d6CBC00183c0d

📝 Documentation

In addition to the hardhat-zksync-vyper, 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! 👷‍♀️👷‍♂️