Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
137a8b58
Commit
137a8b58
authored
Jun 27, 2016
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- warn user if tx not invokation
- better event name
parent
d2e6bf3c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
5 deletions
+25
-5
Ethdebugger.js
src/Ethdebugger.js
+20
-4
TxBrowser.js
src/TxBrowser.js
+2
-1
basicStyles.js
src/styles/basicStyles.js
+3
-0
No files found.
src/Ethdebugger.js
View file @
137a8b58
...
@@ -15,13 +15,19 @@ function Ethdebugger () {
...
@@ -15,13 +15,19 @@ function Ethdebugger () {
util
.
extend
(
this
,
new
EventManager
())
util
.
extend
(
this
,
new
EventManager
())
this
.
currentStepIndex
=
-
1
this
.
currentStepIndex
=
-
1
this
.
tx
this
.
tx
this
.
statusMessage
=
''
this
.
view
this
.
web3
=
init
.
loadWeb3
()
this
.
web3
=
init
.
loadWeb3
()
this
.
traceManager
=
new
TraceManager
(
this
.
web3
)
this
.
traceManager
=
new
TraceManager
(
this
.
web3
)
var
self
=
this
var
self
=
this
this
.
txBrowser
=
new
TxBrowser
(
this
.
web3
)
this
.
txBrowser
=
new
TxBrowser
(
this
.
web3
)
this
.
txBrowser
.
register
(
'newTxRequested'
,
this
,
function
(
blockNumber
,
txIndex
,
tx
)
{
this
.
txBrowser
.
register
(
'newTxLoading'
,
this
,
function
()
{
self
.
unLoad
()
})
this
.
txBrowser
.
register
(
'newTraceRequested'
,
this
,
function
(
blockNumber
,
txIndex
,
tx
)
{
self
.
startDebugging
(
blockNumber
,
txIndex
,
tx
)
self
.
startDebugging
(
blockNumber
,
txIndex
,
tx
)
})
})
this
.
txBrowser
.
register
(
'unloadRequested'
,
this
,
function
(
blockNumber
,
txIndex
,
tx
)
{
this
.
txBrowser
.
register
(
'unloadRequested'
,
this
,
function
(
blockNumber
,
txIndex
,
tx
)
{
...
@@ -36,8 +42,7 @@ function Ethdebugger () {
...
@@ -36,8 +42,7 @@ function Ethdebugger () {
}
}
Ethdebugger
.
prototype
.
render
=
function
()
{
Ethdebugger
.
prototype
.
render
=
function
()
{
return
(
var
view
=
yo
`<div style=
${
ui
.
formatCss
(
style
.
font
)}
>
yo
`<div style=
${
ui
.
formatCss
(
style
.
font
)}
>
<h1 style=
${
ui
.
formatCss
(
style
.
container
)}
>VM Debugger</h1>
<h1 style=
${
ui
.
formatCss
(
style
.
container
)}
>VM Debugger</h1>
<div style='display:inline-block'>
<div style='display:inline-block'>
${
this
.
txBrowser
.
render
()}
${
this
.
txBrowser
.
render
()}
...
@@ -46,9 +51,13 @@ Ethdebugger.prototype.render = function () {
...
@@ -46,9 +51,13 @@ Ethdebugger.prototype.render = function () {
<div style='display:inline-block'>
<div style='display:inline-block'>
${
this
.
sticker
.
render
()}
${
this
.
sticker
.
render
()}
</div>
</div>
<div style=
${
ui
.
formatCss
(
style
.
statusMessage
)}
>
${
this
.
statusMessage
}
</div>
${
this
.
vmDebugger
.
render
()}
${
this
.
vmDebugger
.
render
()}
</div>`
</div>`
)
if
(
!
this
.
view
)
{
this
.
view
=
view
}
return
view
}
}
Ethdebugger
.
prototype
.
unLoad
=
function
()
{
Ethdebugger
.
prototype
.
unLoad
=
function
()
{
...
@@ -66,13 +75,20 @@ Ethdebugger.prototype.startDebugging = function (blockNumber, txIndex, tx) {
...
@@ -66,13 +75,20 @@ Ethdebugger.prototype.startDebugging = function (blockNumber, txIndex, tx) {
if
(
this
.
traceManager
.
isLoading
)
{
if
(
this
.
traceManager
.
isLoading
)
{
return
return
}
}
this
.
statusMessage
=
'Loading trace...'
yo
.
update
(
this
.
view
,
this
.
render
())
console
.
log
(
'loading trace...'
)
console
.
log
(
'loading trace...'
)
this
.
tx
=
tx
this
.
tx
=
tx
var
self
=
this
var
self
=
this
this
.
traceManager
.
resolveTrace
(
tx
,
function
(
error
,
result
)
{
this
.
traceManager
.
resolveTrace
(
tx
,
function
(
error
,
result
)
{
console
.
log
(
'trace loaded '
+
result
+
' '
+
error
)
console
.
log
(
'trace loaded '
+
result
+
' '
+
error
)
if
(
result
)
{
if
(
result
)
{
self
.
statusMessage
=
''
yo
.
update
(
self
.
view
,
self
.
render
())
self
.
trigger
(
'newTraceLoaded'
)
self
.
trigger
(
'newTraceLoaded'
)
}
else
{
self
.
statusMessage
=
error
yo
.
update
(
self
.
view
,
self
.
render
())
}
}
})
})
}
}
...
...
src/TxBrowser.js
View file @
137a8b58
...
@@ -40,6 +40,7 @@ TxBrowser.prototype.submit = function () {
...
@@ -40,6 +40,7 @@ TxBrowser.prototype.submit = function () {
if
(
!
this
.
txNumber
)
{
if
(
!
this
.
txNumber
)
{
return
return
}
}
this
.
trigger
(
'newTxLoading'
,
[
this
.
blockNumber
,
this
.
txNumber
,
tx
])
var
tx
var
tx
try
{
try
{
if
(
this
.
txNumber
.
indexOf
(
'0x'
)
!==
-
1
)
{
if
(
this
.
txNumber
.
indexOf
(
'0x'
)
!==
-
1
)
{
...
@@ -58,7 +59,7 @@ TxBrowser.prototype.submit = function () {
...
@@ -58,7 +59,7 @@ TxBrowser.prototype.submit = function () {
this
.
from
=
tx
.
from
this
.
from
=
tx
.
from
this
.
to
=
tx
.
to
this
.
to
=
tx
.
to
this
.
hash
=
tx
.
hash
this
.
hash
=
tx
.
hash
this
.
trigger
(
'newT
x
Requested'
,
[
this
.
blockNumber
,
this
.
txNumber
,
tx
])
this
.
trigger
(
'newT
race
Requested'
,
[
this
.
blockNumber
,
this
.
txNumber
,
tx
])
}
else
{
}
else
{
var
mes
=
'<not found>'
var
mes
=
'<not found>'
this
.
from
=
mes
this
.
from
=
mes
...
...
src/styles/basicStyles.js
View file @
137a8b58
...
@@ -7,6 +7,9 @@ module.exports = {
...
@@ -7,6 +7,9 @@ module.exports = {
'margin'
:
'10px'
,
'margin'
:
'10px'
,
'padding'
:
'5px'
'padding'
:
'5px'
},
},
statusMessage
:
{
'margin-left'
:
'15px'
},
address
:
{
address
:
{
'font-style'
:
'italic'
'font-style'
:
'italic'
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment