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
609ec056
Unverified
Commit
609ec056
authored
Jun 06, 2018
by
yann300
Committed by
GitHub
Jun 06, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #839 from ethereum/fixHexNormalization
Fix hex normalization
parents
6ac41395
74d19ed8
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
14 deletions
+15
-14
StackPanel.js
remix-debugger/src/ui/StackPanel.js
+1
-12
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-debugger/src/ui/StackPanel.js
View file @
609ec056
'use strict'
var
DropdownPanel
=
require
(
'./DropdownPanel'
)
var
remixLib
=
require
(
'remix-lib'
)
var
ui
=
remixLib
.
helpers
.
ui
var
yo
=
require
(
'yo-yo'
)
function
StackPanel
(
_parent
,
_traceManager
)
{
...
...
@@ -26,19 +24,10 @@ StackPanel.prototype.init = function () {
self
.
basicPanel
.
update
({})
console
.
log
(
error
)
}
else
if
(
self
.
parent
.
currentStepIndex
===
index
)
{
self
.
basicPanel
.
update
(
s
elf
.
format
(
stack
)
)
self
.
basicPanel
.
update
(
s
tack
)
}
})
})
}
StackPanel
.
prototype
.
format
=
function
(
stack
)
{
var
ret
=
[]
stack
.
map
(
function
(
item
,
i
)
{
var
hex
=
ui
.
normalizeHex
(
item
)
ret
.
push
(
hex
)
})
return
ret
}
module
.
exports
=
StackPanel
remix-lib/src/helpers/traceHelper.js
View file @
609ec056
...
...
@@ -8,7 +8,7 @@ module.exports = {
return
this
.
contractCreationToken
(
vmTraceIndex
)
}
else
if
(
this
.
isCallInstruction
(
step
))
{
var
stack
=
step
.
stack
// callcode, delegatecall, ...
return
ui
.
normalizeHex
(
stack
[
stack
.
length
-
2
])
return
ui
.
normalizeHex
Address
(
stack
[
stack
.
length
-
2
])
}
return
undefined
},
...
...
remix-lib/src/helpers/uiHelper.js
View file @
609ec056
...
...
@@ -68,6 +68,18 @@ module.exports = {
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
()
{
return
typeof
window
!==
'undefined'
}
...
...
remix-lib/src/web3Provider/web3VmProvider.js
View file @
609ec056
...
...
@@ -168,7 +168,7 @@ web3VmProvider.prototype.pushTrace = function (self, data) {
this
.
processingAddress
=
traceHelper
.
contractCreationToken
(
this
.
processingIndex
)
this
.
storageCache
[
this
.
processingHash
][
this
.
processingAddress
]
=
{}
}
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
])
{
self
.
vm
.
stateManager
.
dumpStorage
(
this
.
processingAddress
,
function
(
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