Community Guides

Explore all the community contributed guides for ZKsync

Cross-chain governance

In this tutorial we'll deploy a simple smart contract in ZKsync. Then we'll deploy another smart contract in L1 and send transactions that update the state of the contract in ZKsync. We'll use the Mailbox

smart contractsL1-L2tutorial

Native spend limit smart account

This tutorial will guide you through the process of building a smart contract account that has a daily spend limit. We'll create a factory contract that deploys new smart accounts and configure the account limit and test it works as expected

account abstractionsmart contractstutorial

Dapp with gated NFT paymaster

This tutorial will guide you through the process of building a frontend that interacts with smart contracts on ZKsync. The frontend will enable gasless transactions for users that hold a specific NFT thanks to a paymaster.

paymasterfrontendnext.jstutorialERC721

Build an ERC20 custom paymaster

This tutorial will guide you through the process of building a paymaster that accepts a fixed amount of any ERC20 token in exchange for transaction fees. We'll use it to interact with a smart contract and pay the fees with an ERC20 token.

account abstractionpaymastersmart contractstutorial

Frontend quickstart with Paymaster

This tutorial will guide you through the process of building a frontend that interacts with smart contracts on ZKsync. The frontend will allow users to pay fees with any ERC20 tokens using a paymaster.

paymasterfrontendvue.jstutorial

Create an indexer with DipDup

This guide will help you create an indexer with DipDup and Python. DipDup is a tool that allows you to build a custom indexer for your project.

guidedipdup

Indexing events with SubQuery

This guide outlines the process of indexing all transfers and approval events from the Wrapped ETH on ZKsync Era Network.

guideSubQuery

theGraph quickstart

This guide outlines the process of indexing all transfers and approval events from the Wrapped ETH on ZKsync Era Network.

guidetheGraph

Using viem with zkSync

This guide outlines how to use the ZKsync viem plugin to interact with ZKsync and use specific actions like sending transcations via paymasters.

guideviem

Using wagmi with ZKsync

This guide outlines how to use the wagmi library to create websites that interact with ZKsync contracts. We provide some examples to help you get started.

guidewagmi

Using WalletConnect with ZKsync

This guide outlines how to use WalletConnect and Web3Modal to create React apps that interact with contracts on ZKsync

guideWalletConnect

Using web3.js to interact with ZKsync

This guide outlines how to use the ZKsync web3.js plugin to interact with ZKsync.

guideweb3.js

How to deploy a contract

This how-to guide explains how to deploy a smart contract on ZKsync using hardhat-zksync-deploy and hardhat-zksync-ethers.

hardhatsmart contractshow-to

How to deposit ERC20 to ZKsync

This how-to guide explains how to create a script that deposits any ERC20 token to ZKsync.

hardhathow-toerc20

How to deposit Ether to ZKsync

This how-to guide explains how to create a script that deposits Ether to ZKsync.

hardhathow-toEther

How to send an L2->L1 message

This how-to guide explains how to send an arbitrary message from ZKsync to Ethereum L1.

smart contractshow-toL2-L1 communication

How to test contracts with Hardhat

This how-to guide explains how to test smart contracts on ZKsync using Hardhat.

smart contractshow-totesting

Verify contracts with Hardhat

This how-to guide explains how to verify a smart contract on ZKsync using Hardhat.

hardhatcontract verificationhow-to

How to withdraw ERC20 tokens from ZKsync

This how-to guide explains how to create a script that withdraw any ERC20 token from ZKsync to Ethereum.

hardhathow-toerc20

How to withdraw Ether from ZKsync

This how-to guide explains how to create a script that withdraws Ether from ZKsync.

hardhathow-toEther

Native multisig smart account

This tutorial will guide you through the process of building a smart contract account that requires two ECDSA signatures to execute transactions. We'll create a factory contract that deploys new smart accounts and a multisig smart account that can only execute transactions if two signatures are provided.

account abstractionsmart contractstutorial

Made with ❤️ by the ZKsync Community