pull/7/head
LianaHus 9 years ago
commit 8f2c51547f
  1. 12
      README.md
  2. 16
      src/debugger.js
  3. 9
      src/txBrowser.js
  4. 7
      src/vmTraceBrowser.js
  5. 5
      src/vmTraceManager.js

@ -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
- 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

@ -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 (<div>
<p><h1>Debugger</h1></p>
<TxBrowser/>
</div>
<TxBrowser onNewTxRequested={this.retrieveVmTrace} />
<VmTraceBrowser vmTrace={this.state.vmTrace} />
</div>
);
},
retrieveVmTrace: function(blockNumber, txNumber)
{
this.setState({vmTrace: VmTraceManager.retrieveVmTrace(blockNumber, txNumber)});
}
});

@ -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({
</div>
);
}
})
})

@ -0,0 +1,7 @@
var React = require('react');
module.exports = React.createClass({
render: function() {
return (<div>{this.props.vmTrace}</div>)
}
});

@ -0,0 +1,5 @@
module.exports = {
retrieveVmTrace: function(blockNumber, txNumber) {
return web3.admin.vmTrace(blockNumber, parseInt(txNumber), "TmrjdiILLn0=");
}
}
Loading…
Cancel
Save