Getting started

Learn to build and deploy smart contracts on ZKsync Era.

Welcome to ZKsync 101 for deploying smart contracts on ZKsync! In this guide, we'll walk you through the process of creating and deploying a simple smart contract that creates a crowdfunding campaign for Zeek.

By the end of the series, you will learn integral pieces that will help you become a great developer on ZKsync! You will learn how to:

Initialize a new project with ZKsync CLI.

Deploy contracts on ZKsync Era using Hardhat.

Test your contracts with Hardhat.

Implement upgradable patterns for your contracts.

Implement a Paymaster to simplify transactions for your users.


Install ZKsync CLI

Our 101 series utilizes ZKsync CLI to help you develop and interact with ZKsync from your local machine. We will use the full features of ZKsync CLI to build and deploy contracts in a local ZKsync Era node.

Prerequisites

Open a terminal and install ZKsync CLI with the following command:

npm install -g zksync-cli

Create the ZKsync 101 project

We have a template available for you to get started with quickly in the ZKsync 101 series. You can choose to use either EVM or EraVM to compile and deploy to ZKsync:

Learn more about using EraVM vs. EVM bytecode.

In a directory where you want to create your project, run the following command in your terminal:

zksync-cli create zksync-101 --template zksync-101-evm

In a directory where you want to create your project, run the following command in your terminal:

zksync-cli create zksync-101 --template zksync-101-eravm

After you run the create command, the CLI will download and install packages for the project. You should see a success message and instructions to get started with your project.


Next Steps

You should now have a fully working local environment to build new projects on ZKsync!


Made with ❤️ by the ZKsync Community