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
d7b71e52
Commit
d7b71e52
authored
Apr 22, 2020
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve bytecode match
parent
d72551df
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
debugger.js
remix-debug/src/debugger/debugger.js
+1
-1
util.js
remix-lib/src/util.js
+16
-0
util.js
remix-lib/test/util.js
+0
-0
No files found.
remix-debug/src/debugger/debugger.js
View file @
d7b71e52
...
...
@@ -110,7 +110,7 @@ Debugger.prototype.debugTx = function (tx, loadingCb) {
this
.
vmDebuggerLogic
.
event
.
trigger
(
'sourceLocationChanged'
,
[
sourceLocation
])
}
})
})
})
this
.
vmDebuggerLogic
=
new
VmDebuggerLogic
(
this
.
debugger
,
tx
,
this
.
step_manager
,
this
.
debugger
.
traceManager
,
this
.
debugger
.
codeManager
,
this
.
debugger
.
solidityProxy
,
this
.
debugger
.
callTree
)
this
.
vmDebuggerLogic
.
start
()
...
...
remix-lib/src/util.js
View file @
d7b71e52
...
...
@@ -193,6 +193,19 @@ module.exports = {
return
/a265627a7a72305820
([
0-9a-f
]{64})
64736f6c6343
([
0-9a-f
]{6})
0032$/
},
/**
* return a regex which extract the cbor encoded metadata : {"ipfs": <IPFS hash>, "solc": <compiler version>} from the bytecode.
* ref https://solidity.readthedocs.io/en/v0.6.6/metadata.html?highlight=ipfs#encoding-of-the-metadata-hash-in-the-bytecode
* @return {RegEx}
*/
cborEncodedValueExtraction
:
function
()
{
return
/64697066735822
([
0-9a-f
]{68})
64736f6c6343
([
0-9a-f
]{6})
0033$/
},
extractcborMetadata
:
function
(
value
)
{
return
value
.
replace
(
this
.
cborEncodedValueExtraction
(),
''
)
},
extractSwarmHash
:
function
(
value
)
{
value
=
value
.
replace
(
this
.
swarmHashExtraction
(),
''
)
value
=
value
.
replace
(
this
.
swarmHashExtractionPOC31
(),
''
)
...
...
@@ -224,7 +237,10 @@ module.exports = {
code1
=
replaceLibReference
(
code1
,
pos
)
}
code1
=
this
.
extractSwarmHash
(
code1
)
code1
=
this
.
extractcborMetadata
(
code1
)
code2
=
this
.
extractSwarmHash
(
code2
)
code2
=
this
.
extractcborMetadata
(
code2
)
if
(
code1
&&
code2
&&
code1
.
indexOf
(
code2
)
===
0
)
{
return
true
}
...
...
remix-lib/test/util.js
View file @
d7b71e52
This diff is collapsed.
Click to expand it.
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