// 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`
// 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)
}
letpos=-1
while((pos=code2.search(/__(.*)__/))!==-1){
code2=replaceLibReference(code2,pos)
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){
returntrue
}
returnfalse
},
groupBy:groupBy,
concatWithSeperator:concatWithSeperator,
escapeRegExp:escapeRegExp
if(code1&&code2&&code1.indexOf(code2)===0){
returntrue
}
returnfalse
}
/* util extracted out from remix-ide. @TODO split this file, cause it mix real util fn with solidity related stuff ... */