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
01acbda3
Commit
01acbda3
authored
Jan 31, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
retrieve storage
parent
db504146
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
localDecoder.js
src/solidity/localDecoder.js
+2
-2
SolidityLocals.js
src/ui/SolidityLocals.js
+6
-2
No files found.
src/solidity/localDecoder.js
View file @
01acbda3
'use strict'
'use strict'
function
solidityLocals
(
vmtraceIndex
,
internalTreeCall
,
stack
,
memory
)
{
function
solidityLocals
(
vmtraceIndex
,
internalTreeCall
,
stack
,
memory
,
storage
)
{
var
scope
=
internalTreeCall
.
findScope
(
vmtraceIndex
)
var
scope
=
internalTreeCall
.
findScope
(
vmtraceIndex
)
if
(
!
scope
)
{
if
(
!
scope
)
{
var
error
=
{
'message'
:
'Can
\'
t display locals. reason: compilation result might not have been provided'
}
var
error
=
{
'message'
:
'Can
\'
t display locals. reason: compilation result might not have been provided'
}
...
@@ -11,7 +11,7 @@ function solidityLocals (vmtraceIndex, internalTreeCall, stack, memory) {
...
@@ -11,7 +11,7 @@ function solidityLocals (vmtraceIndex, internalTreeCall, stack, memory) {
for
(
var
local
in
scope
.
locals
)
{
for
(
var
local
in
scope
.
locals
)
{
let
variable
=
scope
.
locals
[
local
]
let
variable
=
scope
.
locals
[
local
]
if
(
variable
.
stackDepth
<
stack
.
length
)
{
if
(
variable
.
stackDepth
<
stack
.
length
)
{
locals
[
variable
.
name
]
=
variable
.
type
.
decodeFromStack
(
variable
.
stackDepth
,
stack
,
memory
)
locals
[
variable
.
name
]
=
variable
.
type
.
decodeFromStack
(
variable
.
stackDepth
,
stack
,
memory
,
storage
)
}
}
}
}
return
locals
return
locals
...
...
src/ui/SolidityLocals.js
View file @
01acbda3
...
@@ -47,8 +47,12 @@ class SolidityLocals {
...
@@ -47,8 +47,12 @@ class SolidityLocals {
var
stack
=
result
[
0
].
value
var
stack
=
result
[
0
].
value
var
memory
=
result
[
1
].
value
var
memory
=
result
[
1
].
value
try
{
try
{
var
locals
=
localDecoder
.
solidityLocals
(
index
,
this
.
internalTreeCall
,
stack
,
memory
)
this
.
traceManager
.
getStorageAt
(
index
,
this
.
parent
.
tx
,
(
error
,
storage
)
=>
{
this
.
basicPanel
.
update
(
locals
)
if
(
!
error
)
{
var
locals
=
localDecoder
.
solidityLocals
(
index
,
this
.
internalTreeCall
,
stack
,
memory
,
storage
)
this
.
basicPanel
.
update
(
locals
)
}
})
}
catch
(
e
)
{
}
catch
(
e
)
{
warningDiv
.
innerHTML
=
e
.
message
warningDiv
.
innerHTML
=
e
.
message
}
}
...
...
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