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
557121cb
Commit
557121cb
authored
Jul 19, 2017
by
yann300
Committed by
GitHub
Jul 19, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #530 from ethereum/fixCompareByteCode
Fix CompareByteCode
parents
aff02b67
c83833fc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
util.js
src/helpers/util.js
+4
-0
No files found.
src/helpers/util.js
View file @
557121cb
...
...
@@ -154,10 +154,14 @@ module.exports = {
* Compare bytecode. return true if the code is equal (handle swarm hash and library references)
* @param {String} code1 - the bytecode that is actually deployed (contains resolved library reference and a potentially different swarmhash)
* @param {String} code2 - the bytecode generated by the compiler (contains unresolved library reference and a potentially different swarmhash)
this will return false if the generated bytecode is empty (asbtract contract cannot be deployed)
*
* @return {bool}
*/
compareByteCode
:
function
(
code1
,
code2
)
{
if
(
code1
===
code2
)
return
true
if
(
code2
===
'0x'
)
return
false
// abstract contract. see comment
var
pos
=
-
1
while
((
pos
=
code2
.
search
(
/__
(
.*
)
__/
))
!==
-
1
)
{
code2
=
replaceLibReference
(
code2
,
pos
)
...
...
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