forked from matter-labs/zksync-era
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,18 @@ If you're using Windows, then make sure to use WSL 2, since WSL 1 is known to ca | |
Additionally, if you are going to use WSL 2, make sure that your project is located in the _linux filesystem_, since | ||
accessing NTFS partitions from inside of WSL is very slow. | ||
|
||
If you are a NixOS user or would like to have a reproducible environment, skip to the section about `nix`. | ||
|
||
## `git` | ||
|
||
If you are using an ssh key to authenticate with GitHub you need to make git always use ssh instead of http. | ||
|
||
```bash | ||
git config --global url."ssh://[email protected]/".insteadOf https://github.com/ | ||
``` | ||
|
||
[More information about how we use git](https://www.notion.so/matterlabs/Working-with-dependencies-in-private-repositories-697620178338452798a0ea5ac0d8e56a) | ||
|
||
## `Docker` | ||
|
||
Install `docker`. It is recommended to follow the instructions from the | ||
|
@@ -127,7 +139,7 @@ rustc --version | |
rustc 1.xx.y (xxxxxx 20xx-yy-zz) # Output may vary depending on actual version of rust | ||
``` | ||
|
||
### Postgres | ||
## Postgres | ||
|
||
Install the latest postgres. | ||
|
||
|
@@ -144,6 +156,33 @@ features of the library. | |
cargo install sqlx-cli --version 0.5.13 | ||
``` | ||
|
||
## Solidity compiler `solc` | ||
|
||
Install the latest solidity compiler. | ||
|
||
```bash | ||
brew install solidity | ||
``` | ||
|
||
Alternatively, download a [precompiled version](https://github.com/ethereum/solc-bin) and add it to your PATH. | ||
|
||
## Python | ||
|
||
Most environments will have this preinstalled but if not, install Python. | ||
|
||
## Easier method using `nix` | ||
|
||
Nix is a tool that can fetch _exactly_ the right dependencies specified via hashes. The current config is Linux-only, but | ||
it is likely that it can be adapted to Mac. | ||
|
||
Install `nix`. Enable the nix command and flakes. | ||
|
||
Install docker, rustup and use rust to install SQLx CLI like described above. If you are on NixOS, you also need to | ||
enable nix-ld. | ||
|
||
Go to the zksync folder and run `nix develop --impure`. After it finishes, you are in a shell that has all the | ||
dependencies. | ||
|
||
## Environment | ||
|
||
Edit the lines below and add them to your shell profile file (e.g. `~/.bash_profile`, `~/.zshrc`): | ||
|