You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While discussing if it's appropriate to have "perfect/partial" match for creation bytecode, we encountered a potential bug. In the code below, the creation bytecode will be "perfect"ly matched only if it has a metadata hash at the very end of the bytecode. This is correct for the runtime bytecode but not necessarily true for the creation bytecode. For the creation bytecode this could be anywhere.
We can still take our chances to see if it's at the end of the bytecode, which is quite often, but otherwise we need to find where it is with findAuxdataPositions and also check if the auxdata has a metadata hash.
if(match.onchainCreationBytecode.startsWith(recompiledCreationBytecode)){// if the bytecode doesn't end with metadata then "partial" matchif(endsWithMetadataHash(recompiledCreationBytecode)){match.creationMatch='perfect';}else{match.creationMatch='partial';}logDebug('Found creation match',{chainId: match.chainId,
address,creationMatch: match.creationMatch,});}else{
The text was updated successfully, but these errors were encountered:
While discussing if it's appropriate to have "perfect/partial" match for creation bytecode, we encountered a potential bug. In the code below, the creation bytecode will be "perfect"ly matched only if it has a metadata hash at the very end of the bytecode. This is correct for the runtime bytecode but not necessarily true for the creation bytecode. For the creation bytecode this could be anywhere.
We can still take our chances to see if it's at the end of the bytecode, which is quite often, but otherwise we need to find where it is with
findAuxdataPositions
and also check if the auxdata has a metadata hash.The text was updated successfully, but these errors were encountered: