Community Guides

Explore all the community contributed guides for ZKsync
smart contractscross-chainelastic chainaccount abstractionpaymasterfrontend

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 contractscross-chain

Building a Custom ZK Chain

In this tutorial, you will get familiar with the ZK Inception CLI. You will create a local Elastic Chain ecosystem and deploy a contract to a ZK chain. Next, you will create a new ZK chain that uses a custom ERC20 base token.

elastic chain

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 contracts

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.jserc721

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 contractserc20

Interacting with Uniswap on a Fork of ZKsync Era Using era_test_node and Foundry

In this tutorial, you will set up a local ZKsync Era environment using era_test_node, leverage Foundry's cast tool to interact with contracts, and perform token swaps on Uniswap. You will learn how to check balances, deposit ETH for WETH, transfer WETH, and swap tokens using Uniswap's Swap Router.

zksync-erafoundrycastuniswap

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.js

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.

guidethe graph

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.

guideviemfrontend

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.

guidewagmifrontend

Using WalletConnect with ZKsync

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

guidewalletconnectfrontend

Using Web3.js to interact with ZKsync

Learn how to use the ZKsync Web3.js plugin to interact with ZKsync. This guide covers setting up a new Web3.js project with ZKsync CLI, integrating ZKsync into an existing project, and sending RPC requests to ZKsync.

guideweb3.jsfrontend

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-toerc20cross-chain

How to deposit Ether to ZKsync

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

hardhathow-to

How to send an L1->L2 transaction

This how-to guide explains how to send a transaction from Ethereum that interacts with a contract deployed on ZKsync.

smart contractshow-tocross-chain

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-tocross-chain

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-tocross-chain

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 contracts

Integrate Permissionless Multi-signer Paymaster in your Dapp

Zyfi's new permissionless paymaster allows protocols to integrate paymaster into their ecosytem without the need to deploy paymaster or trusting 3rd party.

paymasteraccount abstraction

Signing Transactions With WebAuthn

In this tutorial, you will learn how to use WebAuthn to sign transactions for smart accounts.

account abstractionpaymastersmart contractsfrontendnext.js
Made with ❤️ by the ZKsync Community