GithubHelp home page GithubHelp logo

sijepo2 / zksync-era-hardhat-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jackhamer09/zksync-era-hardhat-example

0.0 0.0 0.0 515 KB

This is a simple example of how to use zkSync Era with Hardhat. It will help you to deploy your first zkSync smart contracts and interact with them.

License: MIT License

TypeScript 90.82% Solidity 9.18%

zksync-era-hardhat-example's Introduction

zkSync Era Hardhat Example

This is a simple example of how to use zkSync Era with Hardhat. It will help you to deploy your first zkSync smart contracts, interact with them, and automatically verify its source code on zkSync Era Block Explorer.

Setup

  1. Install dependencies
    npm install
  2. Rename or copy file .env.example to .env and fill in the private key of the account you want to use for deployment.

Deploying contracts

  1. Compile contracts

    npm run compile
  2. Deploy contracts:

  • Greeter - this is a simple contract that allows you to set a greeting message and read it. It will also log SetGreeting event when you set a new greeting message.

    npm run deploy greeter.ts
  • ERC20 Token - this is a multifile contract that will let you deploy your own custom token to zkSync 2.0.

    • Fill in the values for your token in deploy/erc20.ts
    • Deploy the contract
      npm run deploy erc20.ts

Useful links

zksync-era-hardhat-example's People

Contributors

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