|
|
@ -72,12 +72,11 @@ export const DebuggerUI = (props: DebuggerUIProps) => { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
debuggerInstance.event.register('newSourceLocation', async (lineColumnPos, rawLocation, generatedSources) => { |
|
|
|
debuggerInstance.event.register('newSourceLocation', async (lineColumnPos, rawLocation, generatedSources, address) => { |
|
|
|
if (!lineColumnPos) return |
|
|
|
if (!lineColumnPos) return |
|
|
|
const contracts = await debuggerModule.fetchContractAndCompile( |
|
|
|
const contracts = await debuggerModule.fetchContractAndCompile( |
|
|
|
currentReceipt.contractAddress || currentReceipt.to, |
|
|
|
address || currentReceipt.contractAddress || currentReceipt.to, |
|
|
|
currentReceipt) |
|
|
|
currentReceipt) |
|
|
|
|
|
|
|
|
|
|
|
if (contracts) { |
|
|
|
if (contracts) { |
|
|
|
let path = contracts.getSourceName(rawLocation.file) |
|
|
|
let path = contracts.getSourceName(rawLocation.file) |
|
|
|
if (!path) { |
|
|
|
if (!path) { |
|
|
@ -152,7 +151,9 @@ export const DebuggerUI = (props: DebuggerUIProps) => { |
|
|
|
offsetToLineColumnConverter: debuggerModule.offsetToLineColumnConverter, |
|
|
|
offsetToLineColumnConverter: debuggerModule.offsetToLineColumnConverter, |
|
|
|
compilationResult: async (address) => { |
|
|
|
compilationResult: async (address) => { |
|
|
|
try { |
|
|
|
try { |
|
|
|
return await debuggerModule.fetchContractAndCompile(address, currentReceipt) |
|
|
|
const ret = await debuggerModule.fetchContractAndCompile(address, currentReceipt) |
|
|
|
|
|
|
|
console.log('ok', ret) |
|
|
|
|
|
|
|
return ret |
|
|
|
} catch (e) { |
|
|
|
} catch (e) { |
|
|
|
console.error(e) |
|
|
|
console.error(e) |
|
|
|
} |
|
|
|
} |
|
|
|