matter-labs / zksync-web-era-docs

zkSync Era Documentation
https://docs.zksync.io/
MIT License
986 stars 820 forks source link
team-core team-frontend zksync zksync-v2

[!WARNING]
zksync-web-era-docs will be archived shortly! Find the latest at zksync-docs

For tutorials and guides, check out the Community Code repo.

zkSync Documentation

GitHub release (latest SemVer) GitHub license GitHub license Follow us!

zkEVM

zkEVM is a virtual machine that executes smart contracts in a way that is compatible with zero-knowledge-proof computation. Our zkEVM keeps EVM semantics, but is also ZK-friendly and adopts a traditional register-based CPU architecture.

zkSync Docs contain up-to-date information about zkSync. zkSync Era has built-in EVM compatibility which makes it a unified tool for releasing EVM-compatible ZK rollups.

We call it zkEVM: web3, Layer 2, scaling functionality that preserves your battle-tested code and knowledge gained after years of working with Solidity.

Build and setup

Initial setup

The frontend team chose the yarn@berry package manager, so ensure you install node version LTS@14 after configuring yarn.

# configure yarn version: berry or specifically 3.1.1.
$ yarn set version berry

Main scripts

# install dependencies
$ yarn

# serve with hot reload at localhost:8080
$ yarn docs:dev
# static generation to dist
$ yarn docs:build

Development

The continuous integration pipeline uses prettier and markdownlint to ensure there are no issues with your document, that spelling is correct, and there are no dead links.

You can check it locally as follows:

# check dead links
$ yarn lint:dead
# check spelling
$ yarn lint:spell
# check with markdownlint
$ yarn lint:mdl
# check with prettier
$ yarn lint:fmt
# fix with markdownlint
$ yarn fix:mdl
# fix with prettier
$ yarn fix:fmt
# run all checks
$ yarn ci
# run all fixes
$ yarn ci:fix
# build for production
$ yarn ci:build

If lint:spell doesn't recognize a word, and you’re sure that it’s correct, consider adding it to cspell-zksync.txt.

Search

We use Algolia to index our documentation. Know more about it here. Dashboard is here, and Crawler Admin is here.

Contributions

Adding new tutorials

To add a new tutorial:

{
  text: "Tutorials",
  link: "/dev/tutorials",
  children: [
        "/build/tutorials/cross-chain-tutorial.md",
        "/build/tutorials/custom-aa-tutorial.md",
        "/build/tutorials/aa-daily-spend-limit.md",
        "/build/tutorials/custom-paymaster-tutorial.md",
        // ADD YOUR FILE HERE
  ],
},

Deployment

The main branch is automatically deployed to https://console.firebase.google.com/u/0/project/aqwzx-zksync-v2-docs

Deploying does the following:

yarn zk-ci-prepare
yarn firebase deploy

Extra documentation

cSpell

Configuration in .cSpell.json:

"dictionaryDefinitions": [
  {
    "name": "zksync", "path": "./cspell-zksync.txt"
  }
]