Commit 89b427f9 authored by yann300's avatar yann300

fix src map for abstract contract

parent d3ce76df
...@@ -68,7 +68,7 @@ function getSourceMap (address, code, contracts) { ...@@ -68,7 +68,7 @@ function getSourceMap (address, code, contracts) {
var isCreation = helper.isContractCreation(address) var isCreation = helper.isContractCreation(address)
var byteProp = isCreation ? 'bytecode' : 'runtimeBytecode' var byteProp = isCreation ? 'bytecode' : 'runtimeBytecode'
for (var k in contracts) { for (var k in contracts) {
if (code.replace(util.swarmHashExtraction(), '').indexOf('0x' + contracts[k][byteProp].replace(util.swarmHashExtraction(), '')) === 0) { if (contracts[k][byteProp] && code.replace(util.swarmHashExtraction(), '').indexOf('0x' + contracts[k][byteProp].replace(util.swarmHashExtraction(), '')) === 0) {
return isCreation ? contracts[k].srcmap : srcmapRuntime(contracts[k]) return isCreation ? contracts[k].srcmap : srcmapRuntime(contracts[k])
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment