fix using compareByteCode

pull/3437/head
yann300 2 years ago committed by Aniket
parent 0b5f29131c
commit e5c6921d93
  1. 4
      apps/remix-ide/src/app/tabs/debugger-tab.js
  2. 3
      libs/remix-core-plugin/src/lib/compiler-fetch-and-compile.ts

@ -45,10 +45,6 @@ export class DebuggerTab extends DebuggerApiMixin(ViewPlugin) {
this.call('notification', 'toast', notFoundToastMsg(contractAddress))
})
this.on('fetchAndCompile', 'usingLocalCompilation', (contractAddress) => {
this.call('notification', 'toast', localCompilationToastMsg())
})
this.on('fetchAndCompile', 'sourceVerificationNotAvailable', () => {
this.call('notification', 'toast', sourceVerificationNotAvailableToastMsg())
})

@ -100,12 +100,11 @@ export class FetchAndCompile extends Plugin {
if (compilation) {
let found = false
compilation.visitContracts((contract) => {
found = util.compareByteCode('0x' + contract.object.evm.deployedBytecode.object, codeAtAddress)
found = util.compareByteCode(codeAtAddress, '0x' + contract.object.evm.deployedBytecode.object)
return found
})
if (found) {
await this.call('compilerArtefacts', 'addResolvedContract', contractAddress, compilation)
setTimeout(_ => this.emit('usingLocalCompilation', contractAddress), 0)
return compilation
}
}

Loading…
Cancel
Save