Commit 31ec2ae9 authored by yann300's avatar yann300

remove swarm hash

parent 21218bf3
......@@ -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
}
}
......
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