GithubHelp home page GithubHelp logo

dhe's Introduction

last update: 17.01.2017

Development

SetUp:

clone this repo open chrome://extension in chrome and Developer modus Load the dist folder of this repo.

Develop

The current development is done on the Ropsten chain which has to be run in the background ((localhost:8545) e.g. with parity: parity --chain ropsten --rpc) together with https://mkr.market

Try to keep this extension disabled when you don't use or develop it, for now.

If you modified something or experience errors restart the extension:

  1. close the dev-tool-panel view
  2. navigate to chrome://extension
  3. reload DappHub
  4. open the dev-tool-panel in your dapp web page
  5. reload the webpage

TODO: simplify this

You will also need to install the dh-core npm package. As this is not currently released, you will need to:

git clone [email protected]:nexusdev/DH-core.git
cd DH-core
npm link
cd ../DHE
npm link dh-core

build the sources with webpack --watch

Architecture

There are 3. Major contexts:

  1. dapp-webpage
  2. background
  3. dev tool panel

Note: all src/ prefixed files are compiled through webpack into dist/[name].bundle.js

1. dapp-webpage

src/content.js:

This is the main script file which is injected into the webpage and can access the dapps window object. Its main capabilities are to inject DHE into the webpage (inject itself between the dapp and local web3 object). The injector rerotes all web3 calls to DHE through message passing over dist/inject.js.

dist/inject.js:

This file lives in the dapp webpage but can not access the dapps window object. Its main capabilities are to inject the src/content.js file into the dapp webpage which can access the local window object.

2. background

src/background.js:

This is the main background process. It lives in the chrome-extension background page regardless of the use of DHE extension.

Its capabilities are orchestrating registred extensions/ managing testrpc(ethereum client)/ routing between dist/inject.js, src/testrpc.js and dist/devtools.js.

src/testrpc.js:

Manages the run of a full ethereum client based off of ethereumjs-testrpc. Capabilities are: providing a rpc endpoint for a forked chain, managing persistant storage.

dist/devtools.js:

This builds the dev-tools-panel view and routes between src/background.js and src/main.js

3. dev tool panel

main.js:

Main entrypoing for the dev-tools-panel view.

Resources

Project

Frontend

TODOs

  • custom contract view

won't Do:

  • address view - deploy new instances

Changelog

  • reset filters once a frontend disconnects
  • toggle fork/ forward transactions to real blockchain
  • settings - main account/ current fork
  • fork reset
  • resolve testrpc bug where accounts don't get updated
  • make web3 calls in address view work
  • make use of original web3 object as a fork provider with this metamask works for forking chains

Screenshots

dhe's People

Contributors

mhhf avatar ryepdx 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.