diff --git a/js/embark.js b/js/embark.js index 57a9d6c5..903d7ac8 100644 --- a/js/embark.js +++ b/js/embark.js @@ -44,6 +44,8 @@ EmbarkJS.Contract = function(options) { } } + ContractClass.abi = ContractClass.options.abi; + var messageEvents = function() { this.cb = function() {}; }; diff --git a/lib/contracts/code_templates/vanilla-contract.js.ejs b/lib/contracts/code_templates/vanilla-contract.js.ejs index 908d5769..8527b3a3 100644 --- a/lib/contracts/code_templates/vanilla-contract.js.ejs +++ b/lib/contracts/code_templates/vanilla-contract.js.ejs @@ -1,6 +1,7 @@ <%- className %>Abi = <%- abi %>; <%- className %> = new web3.eth.Contract(<%- className %>Abi); <%- className %>.options.address = '<%- contract.deployedAddress %>'; +<%- className %>.abi = <%- abi %>; <%- className %>.address = '<%- contract.deployedAddress %>'; <%- className %>.options.from = web3.eth.defaultAccount; <% if (gasLimit != false) { %>