alias to the abi property in an object

Signed-off-by: VoR0220 <catalanor0220@gmail.com>
This commit is contained in:
VoR0220 2018-05-29 13:53:21 -05:00
parent 836fbfbc47
commit 12836f53e8
2 changed files with 3 additions and 0 deletions

View File

@ -44,6 +44,8 @@ EmbarkJS.Contract = function(options) {
} }
} }
ContractClass.abi = ContractClass.options.abi;
var messageEvents = function() { var messageEvents = function() {
this.cb = function() {}; this.cb = function() {};
}; };

View File

@ -1,6 +1,7 @@
<%- className %>Abi = <%- abi %>; <%- className %>Abi = <%- abi %>;
<%- className %> = new web3.eth.Contract(<%- className %>Abi); <%- className %> = new web3.eth.Contract(<%- className %>Abi);
<%- className %>.options.address = '<%- contract.deployedAddress %>'; <%- className %>.options.address = '<%- contract.deployedAddress %>';
<%- className %>.abi = <%- abi %>;
<%- className %>.address = '<%- contract.deployedAddress %>'; <%- className %>.address = '<%- contract.deployedAddress %>';
<%- className %>.options.from = web3.eth.defaultAccount; <%- className %>.options.from = web3.eth.defaultAccount;
<% if (gasLimit != false) { %> <% if (gasLimit != false) { %>