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
bc5c8124
Commit
bc5c8124
authored
May 30, 2016
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix storage
parent
6518e8a5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
4 deletions
+11
-4
stepManager.js
src/stepManager.js
+1
-0
traceAnalyser.js
src/traceAnalyser.js
+1
-1
traceManagerUtil.js
src/traceManagerUtil.js
+3
-1
traceRetriever.js
src/traceRetriever.js
+1
-1
txBrowser.js
src/txBrowser.js
+5
-1
No files found.
src/stepManager.js
View file @
bc5c8124
...
@@ -77,6 +77,7 @@ module.exports = React.createClass({
...
@@ -77,6 +77,7 @@ module.exports = React.createClass({
return
return
}
}
this
.
props
.
onStepChanged
(
step
)
this
.
props
.
onStepChanged
(
step
)
this
.
refs
.
slider
.
setValue
(
step
)
this
.
changeState
(
step
)
this
.
changeState
(
step
)
},
},
...
...
src/traceAnalyser.js
View file @
bc5c8124
...
@@ -55,7 +55,7 @@ TraceAnalyser.prototype.buildStorage = function (index, step, context) {
...
@@ -55,7 +55,7 @@ TraceAnalyser.prototype.buildStorage = function (index, step, context) {
this
.
traceCache
.
pushStoreChanges
(
index
+
1
,
context
.
currentStorageAddress
)
this
.
traceCache
.
pushStoreChanges
(
index
+
1
,
context
.
currentStorageAddress
)
}
else
if
(
step
.
op
===
'SSTORE'
)
{
}
else
if
(
step
.
op
===
'SSTORE'
)
{
this
.
traceCache
.
pushStoreChanges
(
index
+
1
,
context
.
currentStorageAddress
,
step
.
stack
[
step
.
stack
.
length
-
1
],
step
.
stack
[
step
.
stack
.
length
-
2
])
this
.
traceCache
.
pushStoreChanges
(
index
+
1
,
context
.
currentStorageAddress
,
step
.
stack
[
step
.
stack
.
length
-
1
],
step
.
stack
[
step
.
stack
.
length
-
2
])
}
else
if
(
!
step
.
op
===
'RETURN'
)
{
}
else
if
(
traceManagerUtil
.
isReturnInstruction
(
step
)
)
{
context
.
currentStorageAddress
=
context
.
previousStorageAddress
context
.
currentStorageAddress
=
context
.
previousStorageAddress
this
.
traceCache
.
pushStoreChanges
(
index
+
1
,
context
.
currentStorageAddress
)
this
.
traceCache
.
pushStoreChanges
(
index
+
1
,
context
.
currentStorageAddress
)
}
}
...
...
src/traceManagerUtil.js
View file @
bc5c8124
...
@@ -27,7 +27,9 @@ module.exports = {
...
@@ -27,7 +27,9 @@ module.exports = {
// vmTraceIndex has to point to a CALL, CODECALL, ...
// vmTraceIndex has to point to a CALL, CODECALL, ...
resolveCalledAddress
:
function
(
vmTraceIndex
,
trace
)
{
resolveCalledAddress
:
function
(
vmTraceIndex
,
trace
)
{
var
step
=
trace
[
vmTraceIndex
]
var
step
=
trace
[
vmTraceIndex
]
if
(
this
.
isCallInstruction
(
step
))
{
if
(
this
.
isCreateInstruction
(
step
))
{
return
'(Contract Creation Code) '
+
vmTraceIndex
}
else
if
(
this
.
isCallInstruction
(
step
))
{
var
stack
=
step
.
stack
// callcode, delegatecall, ...
var
stack
=
step
.
stack
// callcode, delegatecall, ...
return
stack
[
stack
.
length
-
2
]
return
stack
[
stack
.
length
-
2
]
}
}
...
...
src/traceRetriever.js
View file @
bc5c8124
...
@@ -17,7 +17,7 @@ TraceRetriever.prototype.getTrace = function (txHash, callback) {
...
@@ -17,7 +17,7 @@ TraceRetriever.prototype.getTrace = function (txHash, callback) {
}
}
TraceRetriever
.
prototype
.
getStorage
=
function
(
tx
,
address
,
callback
)
{
TraceRetriever
.
prototype
.
getStorage
=
function
(
tx
,
address
,
callback
)
{
if
(
tx
.
to
===
'(Contract Creation Code)'
)
{
if
(
tx
.
to
===
'(Contract Creation Code)'
||
address
.
indexOf
(
'(Contract Creation Code)'
)
!==
-
1
)
{
callback
(
null
,
{})
callback
(
null
,
{})
}
else
if
(
this
.
storages
[
address
])
{
}
else
if
(
this
.
storages
[
address
])
{
callback
(
null
,
this
.
storages
[
address
])
callback
(
null
,
this
.
storages
[
address
])
...
...
src/txBrowser.js
View file @
bc5c8124
...
@@ -12,11 +12,15 @@ module.exports = React.createClass({
...
@@ -12,11 +12,15 @@ module.exports = React.createClass({
},
},
getInitialState
:
function
()
{
getInitialState
:
function
()
{
return
{
blockNumber
:
'1000110'
,
txNumber
:
'0x
50a420e75151e7f04a014019598764102675e0c6c8979f1089690c594cbe871c
'
,
from
:
''
,
to
:
''
,
hash
:
''
}
return
{
blockNumber
:
'1000110'
,
txNumber
:
'0x
20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51
'
,
from
:
''
,
to
:
''
,
hash
:
''
}
},
},
// creation 0xa9619e1d0a35b2c1d686f5b661b3abd87f998d2844e8e9cc905edb57fc9ce349
// creation 0xa9619e1d0a35b2c1d686f5b661b3abd87f998d2844e8e9cc905edb57fc9ce349
// invokation 0x71a6d583d16d142c5c3e8903060e8a4ee5a5016348a9448df6c3e63b68076ec4
// invokation 0x71a6d583d16d142c5c3e8903060e8a4ee5a5016348a9448df6c3e63b68076ec4
// test:
// creation: 0x72908de76f99fca476f9e3a3b5d352f350a98cd77d09cebfc59ffe32a6ecaa0b
// invokation: 0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51
submit
:
function
()
{
submit
:
function
()
{
var
tx
var
tx
...
...
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