export function isBytecodeEqual ( a , b ) { return removeHashes ( normalize ( a ) ) === removeHashes ( normalize ( b ) ) ; } const normalize = ( bytecode ) => ( bytecode . startsWith ( '0x' ) ? bytecode . substring ( 2 ) : bytecode ) . toLowerCase ( ) ; const BZZR1_PATTERN = /65627a7a72305820[a-f\d]{64}/g ; const IPFS_PATTERN = /64697066735822[a-f\d]{68}/g ; function removeHashes ( bytecode ) { return bytecode . replace ( BZZR1_PATTERN , '0' . repeat ( 80 ) ) . replace ( IPFS_PATTERN , '0' . repeat ( 82 ) ) ; }