Commit 7d859f55 authored by yann300's avatar yann300

Do not override bytecode when deploying deps lib

parent de30c58c
...@@ -229,6 +229,7 @@ module.exports = { ...@@ -229,6 +229,7 @@ module.exports = {
atAddress: function () {}, atAddress: function () {},
linkBytecodeStandard: function (contract, contracts, callback, callbackStep, callbackDeployLibrary) { linkBytecodeStandard: function (contract, contracts, callback, callbackStep, callbackDeployLibrary) {
var contractBytecode = ''
asyncJS.eachOfSeries(contract.evm.bytecode.linkReferences, (libs, file, cbFile) => { asyncJS.eachOfSeries(contract.evm.bytecode.linkReferences, (libs, file, cbFile) => {
asyncJS.eachOfSeries(contract.evm.bytecode.linkReferences[file], (libRef, libName, cbLibDeployed) => { asyncJS.eachOfSeries(contract.evm.bytecode.linkReferences[file], (libRef, libName, cbLibDeployed) => {
var library = contracts[file][libName] var library = contracts[file][libName]
...@@ -241,7 +242,7 @@ module.exports = { ...@@ -241,7 +242,7 @@ module.exports = {
if (hexAddress.slice(0, 2) === '0x') { if (hexAddress.slice(0, 2) === '0x') {
hexAddress = hexAddress.slice(2) hexAddress = hexAddress.slice(2)
} }
contract.evm.bytecode.object = this.linkLibraryStandard(libName, hexAddress, contract) contractBytecode = this.linkLibraryStandard(libName, hexAddress, contract)
cbLibDeployed() cbLibDeployed()
}, callbackStep, callbackDeployLibrary) }, callbackStep, callbackDeployLibrary)
} else { } else {
...@@ -254,7 +255,7 @@ module.exports = { ...@@ -254,7 +255,7 @@ module.exports = {
if (error) { if (error) {
callbackStep(error) callbackStep(error)
} }
callback(error, contract.evm.bytecode.object) callback(error, contractBytecode)
}) })
}, },
......
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