Commit ce9e48f8 authored by yann300's avatar yann300 Committed by Aniket

Return a default source map if deployedBytecode not defined (Yul contract)

parent 3d2b3ecd
......@@ -65,9 +65,13 @@ function getSourceMap (address, code, contracts) {
let bytes
for (let file in contracts) {
for (let contract in contracts[file]) {
bytes = isCreation ? contracts[file][contract].evm.bytecode.object : contracts[file][contract].evm.deployedBytecode.object
const bytecode = contracts[file][contract].evm.bytecode
const deployedBytecode = contracts[file][contract].evm.deployedBytecode
if (!deployedBytecode) return bytecode.sourceMap
bytes = isCreation ? bytecode.object : deployedBytecode.object
if (util.compareByteCode(code, '0x' + bytes)) {
return isCreation ? contracts[file][contract].evm.bytecode.sourceMap : contracts[file][contract].evm.deployedBytecode.sourceMap
return isCreation ? bytecode.sourceMap : deployedBytecode.sourceMap
}
}
}
......
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