Coder Social home page Coder Social logo

ferhimedamine / dapp.honeylemon.market Goto Github PK

View Code? Open in Web Editor NEW

This project forked from carboclan/dapp.honeylemon.market

0.0 1.0 0.0 15.95 MB

Honeylemon mono-repo for synthetic BTC cloud mining contracts built on Ethereum. πŸ―πŸ‹β›πŸ€‘

License: Apache License 2.0

JavaScript 35.77% Makefile 0.15% Shell 0.36% TypeScript 63.27% HTML 0.36% CSS 0.09%

dapp.honeylemon.market's Introduction

GitHub GitHub last commit Generic badge Generic badge Twitter Follow

Documentation πŸ“–

Our docs site is here. Here you will find details on the protocol design, financial contracts and main net deployment addresses. You can also find it directly from this repo in the documentation folder.

Mono Repo Structure πŸ—

The repository is broken up into 4 main packages, managed using yarn workspaces. You can find these in the packages directory. These packages are as follows:

1) packages/contracts

Smart contracts, deployment scripts and integration tests for the Honeylemon protocol. The contract bring together MarketProtcol 0x MinterBridge and custom HoneyLemon contracts to create the protocols financial contracts.

2) packages/honeylemon.js

Javascript library used to connect to the Honeylemon protocol. This library is used by the front end to wrap complex interactions like submitting orders or batch token redemption.

3) packages/subgraph

The Graph subgraph used to index contract events for front end retrieval. Used directly by honeylemon.js.

4) packages/webapp

React Typescript, dapp front end. Can be found online here.

Setting up the Honeylemon protocol πŸ‘©β€πŸ’»

Development Environment πŸ‘·β€β™‚οΈ

You'll need the latest LTS release of nodejs and npm installed. You'll also need Docker installed for your operating system. Assuming that's done, run:

yarn

If you are having issues running the sub graph locally (or in a Docker container) then navigate to the subgraph directory and run an additional install there. To do this run

cd packages/subgraph
npm install

Once this is done you can start the local development env by running a make command. This will clean all data and start/restart docker containers. Some unit tests are coupled and require you to run this between executions as well such as running If running order-test.js script.

make local-reset

After running this you will have a local 0x API, a Ganache instance and a Subgraph running on your local machine in docker containers. You can run docker ps -a to see al l the containers running.

Running TestsπŸ§ͺ

Next, you can run the tests. There are three main tests kinds of tests: 1) Smart contract tests, 2) Honeylemon.js service tests that validate the service data retrieval and on-chain interactions including the Graph protocol and 3) integration tests that show full lifesycle interconnection between the Marketprotocol, 0x order book, DSProxy contracts and the custom honey lemon smart contracts.

yarn run test:contracts #Smart contract tests. Used throughout the stack.
yarn run test:integration #Note that this will start the docker environment to execute test logic.
yarn run test:service #Honey lemon.js service tests. Used in front end.

Building packages πŸ› 

You can build each of the packages within the repo by executing the following.

yarn build:contracts
yarn build:honeylemonjs
yarn build:subgraph
yarn build:webapp
release:webapp

React Front End πŸ–₯

Running the front end can be done by executing:

yarn start:webapp

Deploying Smart Contracts 🧨

If you want to deploy smart contracts to a test network you can run:

truffle migrate --network kovan

Updating MarketContractProxy Address πŸš€

When MarketContractProxy address changes it needs to be updated in the following places:

  • docker/docker-compose-local.yml (look for HONEYLEMON_MARKET_CONTARCT_PROXY_ADDRESS)
  • subgraph/subgraph.yml (in the MarketContractProxy source address field)

Running The Linter 🧽

To run the formatter, run:

yarn lint

Coverage πŸ”Ž

We use the solidity-coverage package to generate our coverage reports. These can be generated manually by developers. There are no regression tests or published reports. CircleCI does generate a coverage report automatically, but if you'd like to generate it locally, run:

./ci/coverage.sh core

The full report can be viewed by opening the core/coverage/index.html file in a browser. The full report can be viewed by opening the core/coverage/index.html file in a browser. You can also find an online version of our covarge report on coveralls.

dapp.honeylemon.market's People

Contributors

fsm1 avatar chrismaree avatar andr11111 avatar haythemsellami avatar carboclanc avatar talrasha007 avatar dependabot[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.