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 (
+
+
+
);
+ },
+
+ 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=");
+ }
+}