Merge pull request #10 from yann300/txBrowser

add txBrowser, txManager
pull/7/head
Liana Husikyan 9 years ago
commit 2cfc46178a
  1. 14
      src/debugger.js
  2. 7
      src/txBrowser.js
  3. 7
      src/vmTraceBrowser.js
  4. 5
      src/vmTraceManager.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 (<div>
<p><h1>Debugger</h1></p>
<TxBrowser/>
<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) {

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