From ac4074911daf424f82608b78eda14998792630ea Mon Sep 17 00:00:00 2001 From: Amir Bandeali Date: Wed, 20 Dec 2017 10:17:27 -0600 Subject: Update and standardize contracts README --- packages/contracts/README.md | 70 ++++++++++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 28 deletions(-) diff --git a/packages/contracts/README.md b/packages/contracts/README.md index 57c75cb85..52fa6062d 100644 --- a/packages/contracts/README.md +++ b/packages/contracts/README.md @@ -1,51 +1,65 @@ Contracts ------ +-------- -## Useful 0x Wiki Articles +Smart contracts that implement the 0x protocol. -* [Architecture](https://0xproject.com/wiki#Architecture) -* [Contract Interactions](https://0xproject.com/wiki#Contract-Interactions) -* [Contract deployed addresses](https://0xproject.com/wiki#Deployed-Addresses) -* [0x Protocol Message Format](https://0xproject.com/wiki#Message-Format) -* [Bug Bounty Program](https://0xproject.com/wiki#Bug-Bounty) +## Usage -## Setup +* [Docs](https://0xproject.com/docs/contracts) +* [Overview of 0x protocol architecture](https://0xproject.com/wiki#Architecture) +* [0x smart contract interactions](https://0xproject.com/wiki#Contract-Interactions) +* [Deployed smart contract addresses](https://0xproject.com/wiki#Deployed-Addresses) +* [0x protocol message format](https://0xproject.com/wiki#Message-Format) -### Installing Dependencies +## Contributing -Install [Node](https://nodejs.org/en/download/releases/) +We strongly recommend that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository. -Install [yarn](https://yarnpkg.com/lang/en/docs/install/) in order to install the project dependencies more deterministically. +For proposals regarding the 0x protocol's smart contract architecture, message format, or additional functionality, go to the [0x Improvement Proposals (ZEIPs)](https://github.com/0xProject/ZEIPs) repository and follow the contribution guidelines provided therein. -Install project dependencies: +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. -``` -yarn +### Install Dependencies + +If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: +```bash +yarn config set workspaces-experimental true ``` -### Running Tests +Then install dependencies +```bash +yarn install +``` -Start Testrpc +### Build -``` -yarn testrpc +```bash +yarn build ``` -Run tests +### Clean -``` -yarn test +```bash +yarn clean ``` -## Contributing +### Lint -0x protocol is intended to serve as an open technical standard for EVM blockchains and we strongly encourage our community members to help us make improvements and to determine the future direction of the protocol. To report bugs within the 0x smart contracts or unit tests, please create an issue in this repository. +```bash +yarn lint +``` -### ZEIPs -Significant changes to 0x protocol's smart contracts, architecture, message format or functionality should be proposed in the [0x Improvement Proposals (ZEIPs)](https://github.com/0xProject/ZEIPs) repository. Follow the contribution guidelines provided therein. +### Run Tests -### Coding conventions +Before running the tests, you will need to spin up a [TestRPC](https://www.npmjs.com/package/ethereumjs-testrpc) instance. -We use a custom set of [TSLint](https://palantir.github.io/tslint/) rules to enforce our coding conventions. +In a separate terminal, start TestRPC (a convenience command is provided as part of the [0x.js monorepo](https://github.com/0xProject/0x.js)) +```bash +cd ../.. +yarn testrpc +``` -In order to see style violation errors, install a tslinter for your text editor. e.g Atom's [atom-typescript](https://atom.io/packages/atom-typescript). +Then in your main terminal run +```bash +yarn test +``` -- cgit v1.2.3