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
79c516cb
Commit
79c516cb
authored
Jul 19, 2020
by
Iuri Matias
Committed by
aniket-engg
Aug 25, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor accumulateStorageChanges
parent
076cde26
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
18 deletions
+6
-18
storageViewer.js
libs/remix-debug/src/storage/storageViewer.js
+1
-7
traceManager.js
libs/remix-lib/src/trace/traceManager.js
+2
-3
traceManager.js
libs/remix-lib/test/traceManager.js
+3
-8
No files found.
libs/remix-debug/src/storage/storageViewer.js
View file @
79c516cb
...
...
@@ -15,13 +15,7 @@ class StorageViewer {
this
.
web3
=
this
.
storageResolver
.
web3
this
.
initialMappingsLocationPromise
=
null
this
.
currentMappingsLocationPromise
=
null
_traceManager
.
accumulateStorageChanges
(
this
.
context
.
stepIndex
,
this
.
context
.
address
,
{},
(
error
,
storageChanges
)
=>
{
if
(
!
error
)
{
this
.
storageChanges
=
storageChanges
}
else
{
console
.
log
(
error
)
}
})
this
.
storageChanges
=
_traceManager
.
accumulateStorageChanges
(
this
.
context
.
stepIndex
,
this
.
context
.
address
,
{})
}
/**
...
...
libs/remix-lib/src/trace/traceManager.js
View file @
79c516cb
...
...
@@ -80,9 +80,8 @@ TraceManager.prototype.getLength = function (callback) {
}
}
TraceManager
.
prototype
.
accumulateStorageChanges
=
function
(
index
,
address
,
storageOrigin
,
callback
)
{
const
storage
=
this
.
traceCache
.
accumulateStorageChanges
(
index
,
address
,
storageOrigin
)
callback
(
null
,
storage
)
TraceManager
.
prototype
.
accumulateStorageChanges
=
function
(
index
,
address
,
storageOrigin
)
{
return
this
.
traceCache
.
accumulateStorageChanges
(
index
,
address
,
storageOrigin
)
}
TraceManager
.
prototype
.
getAddresses
=
function
(
callback
)
{
...
...
libs/remix-lib/test/traceManager.js
View file @
79c516cb
...
...
@@ -55,14 +55,9 @@ tape('TraceManager', function (t) {
})
t
.
test
(
'TraceManager.accumulateStorageChanges'
,
function
(
st
)
{
traceManager
.
accumulateStorageChanges
(
110
,
'0x0d3a18d64dfe4f927832ab58d6451cecc4e517c5'
,
{},
function
(
error
,
result
)
{
if
(
error
)
{
st
.
fail
(
error
)
}
else
{
st
.
ok
(
result
[
'0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563'
].
value
===
'0x38'
)
st
.
end
()
}
})
const
result
=
traceManager
.
accumulateStorageChanges
(
110
,
'0x0d3a18d64dfe4f927832ab58d6451cecc4e517c5'
,
{})
st
.
ok
(
result
[
'0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563'
].
value
===
'0x38'
)
st
.
end
()
})
t
.
test
(
'TraceManager.getCallData'
,
function
(
st
)
{
...
...
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