diff --git a/lib/deploy.js b/lib/deploy.js index a24ed1f0d..6514b3295 100644 --- a/lib/deploy.js +++ b/lib/deploy.js @@ -75,7 +75,7 @@ Deploy.prototype.generate_abi_file = function() { var deployedContract = this.deployedContracts[className]; var contract = this.contractDB[className]; - var abi = JSON.stringify(contract.info.abiDefinition); + var abi = JSON.stringify(contract.compiled.info.abiDefinition); var contractAddress = deployedContract; result += "var " + className + "Abi = " + abi + ";"; result += "var " + className + "Contract = web3.eth.contract(" + className + "Abi);"; diff --git a/test/deploy.js b/test/deploy.js index 99070a20b..c87c15ca9 100644 --- a/test/deploy.js +++ b/test/deploy.js @@ -39,8 +39,8 @@ describe('embark.deploy', function() { "AnotherStorage": "0x234" } deploy.contractDB = { - "SimpleStorage": {info: {abiDefinition: 123}}, - "AnotherStorage": {info: {abiDefinition: 234}} + "SimpleStorage": {compiled: {info: {abiDefinition: 123}}}, + "AnotherStorage": {compiled: {info: {abiDefinition: 234}}} } it("should deploy contracts", function() {