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
41ed3e48
Commit
41ed3e48
authored
Jul 12, 2016
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add tests
parent
cf76ba27
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
2 deletions
+47
-2
npm-debug.log.2094563598
npm-debug.log.2094563598
+20
-0
VmDebugger.js
src/VmDebugger.js
+0
-0
traceAnalyser.js
src/trace/traceAnalyser.js
+1
-0
traceManager.js
src/trace/traceManager.js
+3
-2
traceManager.js
test/traceManager.js
+23
-0
No files found.
npm-debug.log.2094563598
0 → 100644
View file @
41ed3e48
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'config', 'get', 'prefix' ]
2 info using npm@3.8.6
3 info using node@v5.12.0
4 verbose exit [ 0, true ]
5 verbose stack Error: write EPIPE
5 verbose stack at exports._errnoException (util.js:893:11)
5 verbose stack at WriteWrap.afterWrite (net.js:783:14)
6 verbose cwd /home/yann/Ethereum/remix/fea1/remix
7 error Linux 3.16.0-30-generic
8 error argv "/usr/bin/nodejs" "/usr/bin/npm" "config" "get" "prefix"
9 error node v5.12.0
10 error npm v3.8.6
11 error code EPIPE
12 error errno EPIPE
13 error syscall write
14 error write EPIPE
15 error If you need help, you may report this error at:
15 error <https://github.com/npm/npm/issues>
16 verbose exit [ 1, true ]
src/VmDebugger.js
View file @
41ed3e48
src/trace/traceAnalyser.js
View file @
41ed3e48
...
...
@@ -40,6 +40,7 @@ TraceAnalyser.prototype.buildReturnValues = function (index, step) {
var
offset
=
2
*
parseInt
(
step
.
stack
[
step
.
stack
.
length
-
1
],
16
)
var
size
=
2
*
parseInt
(
step
.
stack
[
step
.
stack
.
length
-
2
],
16
)
var
memory
=
this
.
trace
[
this
.
traceCache
.
memoryChanges
[
this
.
traceCache
.
memoryChanges
.
length
-
1
]].
memory
console
.
log
(
'push returnValue '
+
index
)
this
.
traceCache
.
pushReturnValue
(
index
,
'0x'
+
memory
.
join
(
''
).
substr
(
offset
,
size
))
}
}
...
...
src/trace/traceManager.js
View file @
41ed3e48
...
...
@@ -109,8 +109,9 @@ TraceManager.prototype.getStorageAt = function (stepIndex, tx, callback, address
TraceManager
.
prototype
.
getAddresses
=
function
(
callback
)
{
var
addresses
=
[
this
.
tx
.
to
]
for
(
var
k
in
this
.
traceCache
.
calls
)
{
if
(
this
.
traceCache
.
calls
[
k
].
address
)
{
addresses
.
push
(
this
.
traceCache
.
calls
[
k
].
address
)
var
address
=
this
.
traceCache
.
calls
[
k
].
address
if
(
address
&&
addresses
.
join
(
''
).
indexOf
(
address
)
===
-
1
)
{
addresses
.
push
(
address
)
}
}
callback
(
null
,
addresses
)
...
...
test/traceManager.js
View file @
41ed3e48
...
...
@@ -297,4 +297,27 @@ tape('TraceManager', function (t) {
st
.
ok
(
result
===
63
)
st
.
end
()
})
t
.
test
(
'TraceManager.getAddresses'
,
function
(
st
)
{
traceManager
.
getAddresses
(
function
(
error
,
result
)
{
if
(
error
)
{
st
.
fail
(
error
)
}
else
{
st
.
ok
(
result
[
0
]
===
'0x0d3a18d64dfe4f927832ab58d6451cecc4e517c5'
)
st
.
ok
(
result
[
1
]
===
'(Contract Creation - Step 63)'
)
st
.
end
()
}
})
})
t
.
test
(
'TraceManager.getReturnValue'
,
function
(
st
)
{
traceManager
.
getReturnValue
(
108
,
function
(
error
,
result
)
{
if
(
error
)
{
st
.
fail
(
error
)
}
else
{
st
.
ok
(
result
===
'0x60606040526008565b00'
)
st
.
end
()
}
})
})
})
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