Code Monkey home page Code Monkey logo

custom-paymaster-tutorial's Introduction

Custom Paymaster Tutorial ๐Ÿ“–

Welcome aboard to the custom paymaster journey with zkSync! ๐Ÿš€๐ŸŒŒ

This repository is crafted to guide you through the process of building a custom paymaster on zkSync Era. Coupled with this, you'll find a practical, easy-to-follow guide to implement and understand every step here.

Need Assistance? ๐Ÿ’ก

If you're stumbling upon any issues or uncertainties:

Repository Overview ๐Ÿ“‚

Dive into the key sections of this repository:

  • /contracts: All the essential smart contracts you need are neatly stored here.

  • /deploy: Discover deployment and usage scripts tailored to assist your development process.

  • /test: Unit tests for the provided contracts.

Handy Commands ๐Ÿ› ๏ธ

Here's a lineup of commands to assist you:

  • yarn install: Installs the required dependencies.
  • yarn compile: Compiles the contracts.
  • yarn hardhat deploy-zksync --script deploy-paymaster.ts: Deploys your contracts smoothly.
  • yarn hardhat deploy-zksync --script use-paymaster.ts: Executes the use-paymaster.ts script.
  • yarn test: Runs tests. Make sure to check the test requirements below.

Environment variables ๐ŸŒณ

To prevent the leakage of private keys, we use the dotenv package to load environment variables. This is particularly used to load the wallet private key, which is required to run the deployment script.

To use it, rename .env.example to .env and input your private key.

WALLET_PRIVATE_KEY=123cde574ccff....

Local testing ๐Ÿงช

To run tests, you'll need to start the zkSync local environment. Please refer to this section of the docs for details. It can be run with either the Dockerized setup or the In-memory node.

Without starting the zkSync local environment, the tests will fail with an error: Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.7.2)

Stay Connected ๐ŸŒ

custom-paymaster-tutorial's People

Contributors

uf4no avatar stanislavbreadless avatar dutterbutter avatar otani88 avatar mortezashojaei avatar phureewat29 avatar zksync-admin-bot2 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.