ZKsync Era is a layer 2 rollup that uses zero-knowledge proofs to scale Ethereum without compromising on security or decentralization. As it’s EVM-compatible (with Solidity/Vyper), 99% of Ethereum projects can redeploy without needing to refactor or re-audit any code. ZKsync Era also uses an LLVM-based compiler that will eventually enable developers to write smart contracts in popular languages such as C++ and Rust.
This repository contains the ZKsync Vyper compiler.
To install the zkvyper compiler, follow the installation guide.
For local development, build zkvyper from sources.
For the detailed usage guide, see the comprehensive documentation.
To run the unit and CLI tests, execute the following command from the repository root:
cargo test
Documentation is using mdBook utility and its sources available in the docs/
directory.
To build the documentation, follow the instructions.
The deployed versioned builds can be found here.
If you have multiple LLVM builds in your system, ensure that you choose the correct one to build the compiler.
The environment variable LLVM_SYS_170_PREFIX
sets the path to the directory with LLVM build artifacts, which typically ends with target-llvm/build-final
.
For example:
export LLVM_SYS_170_PREFIX=~/repositories/era-llvm/target-llvm/build-final
If you suspect that the compiler is not using the correct LLVM build, check by running set | grep LLVM
, and reset all LLVM-related environment variables.
For reference, see llvm-sys and Local LLVM Configuration Guide.
The Vyper compiler is distributed under the terms of either
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
- zkvyper documentation
- ZKsync Era compiler toolchain documentation
- Vyper v0.3.3 documentation
- Vyper v0.3.9 documentation
- Vyper v0.3.10 documentation
- Vyper LLL IR
Some parts of the Vyper documentation may be outdated. Please contact the Vyper team for assistance.
ZKsync Era has been through extensive testing and audits, and although it is live, it is still in alpha state and will undergo further audits and bug bounty programs. We would love to hear our community's thoughts and suggestions about it! It's important to note that forking it now could potentially lead to missing important security updates, critical features, and performance improvements.