Skip to content

mpopovac-txfusion/zksync-web-v2-docs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zkSync v2.0 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 takes on traditional CPU architectures.

Constantly updated, zkSync: Docs for 2.0 offers the most complete knowledge about the upcoming zkSync 2.0. zkSync 2 release has built-in EVM-compatibility which makes it a single key to release EVM-compatible ZK rollup. We call it zkEVM: long-awaited way to preserve the battle-tested code and knowledge gained after years of working with Solidity scaling it with the Layer 2.

Build and setup

Initial setup

Frontend team chosen yarn@berry for packager, so don't forget to install node version LTS@14 and after configure yarn

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

# ...then assure no1deLinker is configured for node_modules
$ yarn config set nodeLinker "node_modules"
# you should see:
# ➤ YN0000: Successfully set nodeLinker to 'node_modules'

# the regular dependency installation (with re-validation of the local cache
$ yarn install --check-cache

Main scripts

# clear possible cache && install dependencies (clear install)
$ sh cli-dev.sh ci

# serve with hot reload at localhost:8080
$ yarn docs:dev

# static generation to dist
$ yarn docs:build

Development

CI pipeline will check that the files are formatted according to prettier, markdownlint founds no issues in document and spelling is correct. Also, there should be 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 but you're sure that it's correct, consider adding it to the cspell-zksync.txt.

Deployment

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

Deploying altogether

will do:

  • install node modules;
  • prepare, test and build documentation;
  • afterwards all contained into the dist folder will be deployed in form of the static website
yarn zk-ci-prepare
yarn firebase deploy

Extra documentation

cSpell

Configuration in .cSpell.json:

  • version — version of the setting file, always 0.1
  • language — language - current active spelling language
  • words[] — words - list of words to be always considered correct
  • dictionaries[]
"dictionaryDefinitions": [
  {
    "name": "zksync", "path": "./cspell-zksync.txt"
  }
]

Packages

No packages published

Languages

  • JavaScript 77.8%
  • HTML 14.9%
  • Vue 6.7%
  • Shell 0.6%