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
74d19ed8
Commit
74d19ed8
authored
Jun 06, 2018
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use normalizeHexAddress
parent
c0664b63
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
2 deletions
+14
-2
traceHelper.js
remix-lib/src/helpers/traceHelper.js
+1
-1
uiHelper.js
remix-lib/src/helpers/uiHelper.js
+12
-0
web3VmProvider.js
remix-lib/src/web3Provider/web3VmProvider.js
+1
-1
No files found.
remix-lib/src/helpers/traceHelper.js
View file @
74d19ed8
...
@@ -8,7 +8,7 @@ module.exports = {
...
@@ -8,7 +8,7 @@ module.exports = {
return
this
.
contractCreationToken
(
vmTraceIndex
)
return
this
.
contractCreationToken
(
vmTraceIndex
)
}
else
if
(
this
.
isCallInstruction
(
step
))
{
}
else
if
(
this
.
isCallInstruction
(
step
))
{
var
stack
=
step
.
stack
// callcode, delegatecall, ...
var
stack
=
step
.
stack
// callcode, delegatecall, ...
return
ui
.
normalizeHex
(
stack
[
stack
.
length
-
2
])
return
ui
.
normalizeHex
Address
(
stack
[
stack
.
length
-
2
])
}
}
return
undefined
return
undefined
},
},
...
...
remix-lib/src/helpers/uiHelper.js
View file @
74d19ed8
...
@@ -68,6 +68,18 @@ module.exports = {
...
@@ -68,6 +68,18 @@ module.exports = {
return
'0x'
+
hex
return
'0x'
+
hex
},
},
normalizeHexAddress
:
function
(
hex
)
{
if
(
hex
.
indexOf
(
'0x'
)
===
0
)
hex
=
hex
.
replace
(
'0x'
,
''
)
if
(
hex
.
length
>=
40
)
{
var
reg
=
/
(
.
{40})
$/
.
exec
(
hex
)
if
(
reg
)
{
return
'0x'
+
reg
[
0
]
}
}
else
{
return
'0x'
+
(
new
Array
(
40
-
hex
.
length
+
1
).
join
(
'0'
))
+
hex
}
},
runInBrowser
:
function
()
{
runInBrowser
:
function
()
{
return
typeof
window
!==
'undefined'
return
typeof
window
!==
'undefined'
}
}
...
...
remix-lib/src/web3Provider/web3VmProvider.js
View file @
74d19ed8
...
@@ -168,7 +168,7 @@ web3VmProvider.prototype.pushTrace = function (self, data) {
...
@@ -168,7 +168,7 @@ web3VmProvider.prototype.pushTrace = function (self, data) {
this
.
processingAddress
=
traceHelper
.
contractCreationToken
(
this
.
processingIndex
)
this
.
processingAddress
=
traceHelper
.
contractCreationToken
(
this
.
processingIndex
)
this
.
storageCache
[
this
.
processingHash
][
this
.
processingAddress
]
=
{}
this
.
storageCache
[
this
.
processingHash
][
this
.
processingAddress
]
=
{}
}
else
{
}
else
{
this
.
processingAddress
=
uiutil
.
normalizeHex
(
step
.
stack
[
step
.
stack
.
length
-
2
])
this
.
processingAddress
=
uiutil
.
normalizeHex
Address
(
step
.
stack
[
step
.
stack
.
length
-
2
])
if
(
!
self
.
storageCache
[
self
.
processingHash
][
this
.
processingAddress
])
{
if
(
!
self
.
storageCache
[
self
.
processingHash
][
this
.
processingAddress
])
{
self
.
vm
.
stateManager
.
dumpStorage
(
this
.
processingAddress
,
function
(
storage
)
{
self
.
vm
.
stateManager
.
dumpStorage
(
this
.
processingAddress
,
function
(
storage
)
{
self
.
storageCache
[
self
.
processingHash
][
self
.
processingAddress
]
=
storage
self
.
storageCache
[
self
.
processingHash
][
self
.
processingAddress
]
=
storage
...
...
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