Development and contribution guide
Last updated
Last updated
If you are working on 0x-mesh, the root directory for the project must be at $GOPATH/src/github.com/0xProject/0x-mesh. 0x Mesh uses Dep for dependency management and does not support Go modules.
0x Mesh uses two main branches:
The development
branch contains the latest (possibly unreleased) changes
and is not guaranteed to be stable.
The master
branch contains the latest stable release.
If you intend to fork 0x Mesh and open a PR, you should work off of the development
branch. Make sure you check out the development
branch and pull the latest changes.
All PRs should use development
as the base branch. When opening a new PR, use the dropdown menu in the GitHub UI to select development
.
GNU Make If you are using a Unix-like OS, you probably already have this.
Go version 1.12.x (or use the version manager called "g"). Go 1.13 is not supported yet (see https://github.com/0xProject/0x-mesh/issues/480).
Node.js version >=11 (or use the nvm version manager)
Some of the tests depend on having a test Ethereum node running. Before running the tests, make sure you have Docker installed locally and start 0xorg/ganache-cli:
There are various Make targets for running tests:
0x Mesh is configured to use linters for both Go and TypeScript code. To run all available linters, run:
See https://golang.github.io/dep/docs/daily-dep.html.
For VS Code, the following editor configuration is recommended:
When working on code with the build tag js,wasm
, you might need to add the following to your editor config: