remove swarm hash

pull/7/head
yann300 8 years ago
parent 21218bf362
commit 31ec2ae9c2
  1. 2
      src/code/sourceLocationTracker.js
  2. 2
      src/solidity/solidityProxy.js

@ -67,7 +67,7 @@ function getSourceMap (address, code, contracts) {
var isCreation = helper.isContractCreation(address)
var byteProp = isCreation ? 'bytecode' : 'runtimeBytecode'
for (var k in contracts) {
if (code.indexOf('0x' + contracts[k][byteProp]) === 0) {
if (code.replace(/.{64}0029$/, '').indexOf('0x' + contracts[k][byteProp].replace(/.{64}0029$/, '')) === 0) {
return isCreation ? contracts[k].srcmap : srcmapRuntime(contracts[k])
}
}

@ -136,7 +136,7 @@ function contractNameFromCode (contracts, code, address) {
var isCreation = traceHelper.isContractCreation(address)
var byteProp = isCreation ? 'bytecode' : 'runtimeBytecode'
for (var k in contracts) {
if ('0x' + contracts[k][byteProp] === code) {
if ('0x' + contracts[k][byteProp].replace(/.{64}0029$/, '') === code.replace(/.{64}0029$/, '')) {
return k
}
}

Loading…
Cancel
Save