From 12836f53e811b1ce0b21d38caa58bdc7dec3ec4c Mon Sep 17 00:00:00 2001 From: VoR0220 Date: Tue, 29 May 2018 13:53:21 -0500 Subject: [PATCH] alias to the abi property in an object Signed-off-by: VoR0220 --- js/embark.js | 2 ++ lib/contracts/code_templates/vanilla-contract.js.ejs | 1 + 2 files changed, 3 insertions(+) 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) { %>