code: function (code1, code2) {
      if (code1 === code2) return true
      if (code2 === '0x') return false // abstract contract. see comment
  
      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)
      }
      var pos = -1
      while ((pos = code2.search(/__(.*)__/)) !== -1) {
        code2 = replaceLibReference(code2, pos)
        code1 = replaceLibReference(code1, pos)
      }
      code1 = code1.replace(this.swarmHashExtraction(), '')
      code2 = code2.replace(this.swarmHashExtraction(), '')
      if (code1 && code2 && code1.indexOf(code2) === 0) {
        return true
      }
      return false
    }
docs: 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}