From 7d4c954efb82e432815ca43525fc85a1c8d287e8 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 13 Apr 2016 16:26:56 +0200 Subject: [PATCH 1/3] add txBrowser, txManager --- src/debugger.js | 16 ++++++++++++++-- src/txBrowser.js | 9 ++++++--- src/vmTraceBrowser.js | 7 +++++++ src/vmTraceManager.js | 5 +++++ 4 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 src/vmTraceBrowser.js create mode 100644 src/vmTraceManager.js diff --git a/src/debugger.js b/src/debugger.js index f19d4ca429..c841e0d251 100644 --- a/src/debugger.js +++ b/src/debugger.js @@ -1,12 +1,24 @@ var React = require('react'); var TxBrowser = require('./txBrowser'); +var VmTraceManager = require('./vmTraceManager'); +var VmTraceBrowser = require('./vmTraceBrowser'); module.exports = React.createClass({ + getInitialState: function() { + return {vmTrace: null} + }, + render: function() { return (

Debugger

- -
+ + + ); + }, + + retrieveVmTrace: function(blockNumber, txNumber) + { + this.setState({vmTrace: VmTraceManager.retrieveVmTrace(blockNumber, txNumber)}); } }); diff --git a/src/txBrowser.js b/src/txBrowser.js index a46695b647..491029b73b 100644 --- a/src/txBrowser.js +++ b/src/txBrowser.js @@ -1,14 +1,17 @@ var React = require('react'); module.exports = React.createClass({ + propTypes: { + onNewTxRequested: React.PropTypes.func.isRequired, + }, + getInitialState: function() { return {blockNumber: "1160004", txNumber: "1"} }, submit: function() { - var vmTrace = web3.admin.vmTrace(this.state.blockNumber, parseInt(this.state.txNumber), "TmrjdiILLn0="); - console.log(JSON.stringify(vmTrace)); + this.props.onNewTxRequested(this.state.blockNumber, parseInt(this.state.txNumber), "TmrjdiILLn0="); }, updateBlockN: function(ev) { @@ -30,4 +33,4 @@ module.exports = React.createClass({ ); } -}) \ No newline at end of file +}) diff --git a/src/vmTraceBrowser.js b/src/vmTraceBrowser.js new file mode 100644 index 0000000000..c212fb34a9 --- /dev/null +++ b/src/vmTraceBrowser.js @@ -0,0 +1,7 @@ +var React = require('react'); + +module.exports = React.createClass({ + render: function() { + return (
{this.props.vmTrace}
) + } +}); diff --git a/src/vmTraceManager.js b/src/vmTraceManager.js new file mode 100644 index 0000000000..ff0ca844b3 --- /dev/null +++ b/src/vmTraceManager.js @@ -0,0 +1,5 @@ +module.exports = { + retrieveVmTrace: function(blockNumber, txNumber) { + return web3.admin.vmTrace(blockNumber, parseInt(txNumber), "TmrjdiILLn0="); + } +} From 4309180128758786f86bdd158fc283040607afa8 Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Wed, 13 Apr 2016 16:46:27 +0200 Subject: [PATCH 2/3] Update README.md --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index ccc0800674..6fa2b06d85 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,14 @@ # remix Ethereum IDE and tools for the web + +Brief instructions to build for linux(Todo add other platforms) we will add detailed instructions later +1. co the project +2. cd remix +3. mkdir build +4. install npm and node.js see https://docs.npmjs.com/getting-started/installing-node +5. sudo npm update +6. sudo npm install web3 +7. run the eth node: ./eth --rpccorsdomain "*" -j --admin-via-http -v 0 +8. copy "JSONRPC Admin Session Key" (this is a temporary step, there is a story which will let us to skip this step) and give it as a last argument for web3.admin.vmTrace function :P +9. sudo npm run build +10. open remix/index.html From e290d825a949f53a8ee2bfb9a77c6b2d8258e6be Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Wed, 13 Apr 2016 16:49:09 +0200 Subject: [PATCH 3/3] Update README.md --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 6fa2b06d85..cdd5ae1052 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,13 @@ Ethereum IDE and tools for the web Brief instructions to build for linux(Todo add other platforms) we will add detailed instructions later -1. co the project -2. cd remix -3. mkdir build -4. install npm and node.js see https://docs.npmjs.com/getting-started/installing-node -5. sudo npm update -6. sudo npm install web3 -7. run the eth node: ./eth --rpccorsdomain "*" -j --admin-via-http -v 0 -8. copy "JSONRPC Admin Session Key" (this is a temporary step, there is a story which will let us to skip this step) and give it as a last argument for web3.admin.vmTrace function :P -9. sudo npm run build -10. open remix/index.html +- co the project +- cd remix +- mkdir build +- install npm and node.js see https://docs.npmjs.com/getting-started/installing-node +- sudo npm update +- sudo npm install web3 +- run the eth node: ./eth --rpccorsdomain "*" -j --admin-via-http -v 0 +- copy "JSONRPC Admin Session Key" (this is a temporary step, there is a story which will let us to skip this step) and give it as a last argument for web3.admin.vmTrace function :P +- sudo npm run build +- open remix/index.html