npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@marketprotocol/marketprotocol

v2.4.0

Published

Decentralized Derivatives Trading Protocol For The Ethereum Blockchain

Downloads

30

Readme

MARKET Protocol

Build Status Coverage Status npm version

MARKET Protocol has been created to provide a secure, flexible, open source foundation for decentralized trading on the Ethereum blockchain. We provide the pieces necessary to create a decentralized exchange, including the requisite clearing and collateral pool infrastructure, enabling third parties to build applications for trading. Take a look at our FAQ or docs for a little more explanation.

Join our Discord Community to interact with members of our dev staff and other contributors.

Dependencies

This project uses Node.js version 8.10.0 - 8.11.3.

If you are running multiple versions of Node.js, consider using Node Version Manager (nvm). nvm is an easy way to configure and manage different Node.js versions to work with your projects.

Getting Started

A Makefile is provided for easy setup of the environment.

Some pre-requisites are required in order to utilize the Makefile.

$ git clone https://github.com/MARKETProtocol/MARKETProtocol.git  # clone this repository

From here you will be able to use make commands assuming npm is already installed.

Assuming you have npm already, Install truffle

$ make install_truffle

Clone this repository and use npm to install needed dependencies

$ git clone https://github.com/MARKETProtocol/MARKETProtocol.git
$ cd MARKETProtocol
$ make install_deps

If you get an error on the node-gyp rebuild line during make install_deps, node-gyp doesn't support Python v3.x.x; v2.7 is recommended. There are several solutions based upon your platform.

The easiest solution? Use make install_deps_python2.7 to use Python 2.7, see stack overflow or the npm node-gyp project for details.

Tests

Start truffle and its development blockchain with

$ make start_console

Run the example migrations as well as the accompanying tests inside the truffle console

truffle(develop)> migrate --reset
truffle(develop)> test

Running tests with coverage enabled

The most convenient way to run tests with coverage enabled is to run them with help of Docker orchestration. This ensures, that the coverage results will match the ones on Travis CI.

Prerequisites

Docker and docker-compose

Instructions on how to install both applications are available at docker and docker-compose websites. When the applications are installed please make sure that the current user is added to 'docker' group.

Environment variables

Docker images use four environment variables that point to host and port on test and coverage Ethereum networks, please export them to your shell environment:

TRUFFLE_DEVELOP_HOST=truffle TRUFFLE_DEVELOP_PORT=9545 TRUFFLE_COVERAGE_HOST=truffle-coverage TRUFFLE_COVERAGE_PORT=8555

Running tests

Start containers

docker-compose up

The first run will take a while since images will be pulled from Docker registry. After that images are cached and the start will be much faster. Make sure that all four environment variables are available in the second shell.

TRUFFLE_DEVELOP_HOST=truffle
TRUFFLE_DEVELOP_PORT=9545
TRUFFLE_COVERAGE_HOST=truffle-coverage
TRUFFLE_COVERAGE_PORT=8555

Start tests

To run tests:

docker-compose exec truffle truffle test

If you want to run test with coverage:

docker-compose exec truffle-coverage env CONTINUOUS_INTEGRATION=true scripts/coverage_run.sh

Solium

To run solium on the solidity smart contracts

ensure you have solium installed with solium -V if not install

$ npm install -g solium

and then

$ solium --dir ./

Contributing

Want to hack on MARKET Protocol? Awesome!

MARKET Protocol is an Open Source project and we welcome contributions of all sorts. There are many ways to help, from reporting issues, contributing code, and helping us improve our community.

Ready to jump in? Check docs.marketprotocol.io/#contributing.

Questions?

Join our Discord Community to get in touch with our dev staff and other contributors.