Code for the "Build a custom paymaster" tutorial from the zkSync v2 documentation.
You can find a full step-by-step guide to build this project in this article.
You need Node.js and Yarn.
Install all dependencies with yarn add
.
Compile contracts with yarn hardhat compile
To run the scripts that deploy, use the zksync-deploy
command:
yarn hardhat deploy-zksync --script deploy-paymaster.ts
: deploys the contractsyarn hardhat deploy-zksync --script use-paymaster.ts
: executes theuse-paymaster.ts
script.
Check out the common errors section in the tutorial, open an issue, or contact us on Discord.