Merge pull request #500 from ethereum/fixSourceMap

Fix src map for abstract contract
pull/7/head
yann300 8 years ago committed by GitHub
commit a6fd3e6254
  1. 2
      src/code/sourceLocationTracker.js

@ -68,7 +68,7 @@ function getSourceMap (address, code, contracts) {
var isCreation = helper.isContractCreation(address)
var byteProp = isCreation ? 'bytecode' : 'runtimeBytecode'
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])
}
}

Loading…
Cancel
Save