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
fe7a9a1e
Commit
fe7a9a1e
authored
Feb 09, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
external call
parent
3c0339bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
internalCallTree.js
src/util/internalCallTree.js
+4
-2
No files found.
src/util/internalCallTree.js
View file @
fe7a9a1e
...
...
@@ -4,6 +4,7 @@ var AstWalker = require('./astWalker')
var
EventManager
=
require
(
'../lib/eventManager'
)
var
decodeInfo
=
require
(
'../solidity/decodeInfo'
)
var
util
=
require
(
'../helpers/util'
)
var
traceHelper
=
require
(
'../helpers/traceHelper'
)
/**
* Tree representing internal jump into function.
...
...
@@ -96,7 +97,7 @@ async function buildTree (tree, step, scopeId) {
if
(
!
sourceLocation
)
{
return
{
outStep
:
step
,
error
:
'InternalCallTree - No source Location. '
+
step
}
}
if
(
sourceLocation
.
jump
===
'i'
)
{
if
(
sourceLocation
.
jump
===
'i'
||
traceHelper
.
isCallInstruction
(
tree
.
traceManager
.
trace
[
step
])
)
{
try
{
var
result
=
await
buildTree
(
tree
,
step
+
1
,
scopeId
===
''
?
subScope
.
toString
()
:
scopeId
+
'.'
+
subScope
)
if
(
result
.
error
)
{
...
...
@@ -108,7 +109,8 @@ async function buildTree (tree, step, scopeId) {
}
catch
(
e
)
{
return
{
outStep
:
step
,
error
:
'InternalCallTree - '
+
e
.
message
}
}
}
else
if
(
sourceLocation
.
jump
===
'o'
)
{
}
else
if
(
sourceLocation
.
jump
===
'o'
||
traceHelper
.
isReturnInstruction
(
tree
.
traceManager
.
trace
[
step
])
||
traceHelper
.
isStopInstruction
(
tree
.
traceManager
.
trace
[
step
]))
{
// traceHelper.isReturnInstruction should be replaced by a more complex structure so it can handle out of gas
tree
.
scopes
[
scopeId
].
lastStep
=
step
return
{
outStep
:
step
+
1
}
}
else
{
...
...
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