Skip to content
This repository has been archived by the owner on Mar 3, 2021. It is now read-only.

Commit

Permalink
test whole signature
Browse files Browse the repository at this point in the history
  • Loading branch information
yann300 committed May 17, 2018
1 parent a41d983 commit b358155
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion remix-lib/src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ module.exports = {
if (code1 === code2) return true
if (code2 === '0x') return false // abstract contract. see comment

if (code2.substr(4, 40) === '0000000000000000000000000000000000000000') {
if (code2.substr(2, 46) === '7300000000000000000000000000000000000000003014') {
// testing the following signature: PUSH20 00..00 ADDRESS EQ
// in the context of a library, that slot contains the address of the library (pushed by the compiler to avoid calling library other than with a DELEGATECALL)
// if code2 is not a library, well we still suppose that the comparison remain relevant even if we remove some information from `code1`
code1 = replaceLibReference(code1, 4)
Expand Down

0 comments on commit b358155

Please sign in to comment.