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
e40d76ef
Commit
e40d76ef
authored
May 29, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not reextract state vars if context is the same
parent
e3a8710d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
17 deletions
+27
-17
SolidityState.js
src/ui/SolidityState.js
+27
-17
No files found.
src/ui/SolidityState.js
View file @
e40d76ef
...
...
@@ -18,6 +18,7 @@ function SolidityState (_parent, _traceManager, _codeManager, _solidityProxy) {
})
this
.
init
()
this
.
view
this
.
stateVariablesByAddresses
=
{}
}
SolidityState
.
prototype
.
render
=
function
()
{
...
...
@@ -54,26 +55,35 @@ SolidityState.prototype.init = function () {
self
.
basicPanel
.
update
({})
console
.
log
(
error
)
}
else
{
self
.
solidityProxy
.
extractStateVariablesAt
(
index
,
function
(
error
,
stateVars
)
{
if
(
error
)
{
self
.
basicPanel
.
update
({})
console
.
log
(
error
)
}
else
{
var
storageViewer
=
new
StorageViewer
({
stepIndex
:
self
.
parent
.
currentStepIndex
,
tx
:
self
.
parent
.
tx
,
address
:
address
},
self
.
storageResolver
,
self
.
traceManager
)
stateDecoder
.
decodeState
(
stateVars
,
storageViewer
).
then
((
result
)
=>
{
if
(
!
result
.
error
)
{
self
.
basicPanel
.
update
(
result
)
}
})
}
})
if
(
self
.
stateVariablesByAddresses
[
address
])
{
extractStateVariables
(
self
,
self
.
stateVariablesByAddresses
[
address
],
address
)
}
else
{
self
.
solidityProxy
.
extractStateVariablesAt
(
index
,
function
(
error
,
stateVars
)
{
if
(
error
)
{
self
.
basicPanel
.
update
({})
console
.
log
(
error
)
}
else
{
self
.
stateVariablesByAddresses
[
address
]
=
stateVars
extractStateVariables
(
self
,
stateVars
)
}
})
}
}
})
})
}
function
extractStateVariables
(
self
,
stateVars
,
address
)
{
var
storageViewer
=
new
StorageViewer
({
stepIndex
:
self
.
parent
.
currentStepIndex
,
tx
:
self
.
parent
.
tx
,
address
:
address
},
self
.
storageResolver
,
self
.
traceManager
)
stateDecoder
.
decodeState
(
stateVars
,
storageViewer
).
then
((
result
)
=>
{
if
(
!
result
.
error
)
{
self
.
basicPanel
.
update
(
result
)
}
})
}
module
.
exports
=
SolidityState
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