Contributing ============ The source for the contracts can be found on `Github`_. .. _Github: https://github.com/gnosis/pm-contracts .. highlight:: bash To set up for contributing, first install requirements with NPM:: npm install Then, set up Git hooks to ensure commits pass the linters:: npm run setup-githooks .. tip:: Many of the following commands simply wrap corresponding `Truffle commands `_. Testing and Linting ------------------- The test suite may be run using:: npm test In order to run a subset of test cases which match a regular expression, the ``TEST_GREP`` environment variable may be used:: TEST_GREP='obtainable conditionIds' npm test The JS test files may be linted via:: npm run lint Contracts may also be linted via:: npm run lint-contracts .. _Truffle: https://truffleframework.com Development commands -------------------- To compile all the contracts, obtaining build artifacts containing each containing their respective contract's ABI and bytecode, use the following command:: npm run compile Running the migrations, deploying the contracts onto a chain and recording the contract's deployed location in the build artifact can also be done:: npm run migrate Dropping into a Truffle develop session can be done via:: npm run develop Network Information ------------------- Showing the deployed addresses of all contracts on all networks can be done via:: npm run networks Extra command line options for the underlying Truffle command can be passed down through NPM by preceding the options list with ``--``. For example, in order to purge the build artifacts of any unnamed network information, you can run:: npm run networks -- --clean To take network info from ``networks.json`` and inject it into the build artifacts, you can run:: npm run injectnetinfo If you instead wish to extract all network information from the build artifacts into ``networks.json``, run:: npm run extractnetinfo .. warning:: Extracting network info will overwrite ``networks.json``. Building the Documentation -------------------------- (Will install `Sphinx `_ and `Solidity Domain for Sphinx `_): .. code-block:: bash cd docs pip install -r requirements.txt make html Contributors ------------ * Stefan George (`Georgi87 `_) * Martin Koeppelmann (`koeppelmann `_) * Alan Lu (`cag `_) * Roland Kofler (`rolandkofler `_) * Collin Chin (`collinc97 `_) * Christopher Gewecke (`cgewecke `_) * Anton V Shtylman (`InfiniteStyles `_) * Billy Rennekamp (`okwme `_) * Denis Granha (`denisgranha `_) * Alex Beregszaszi (`axic `_)