Adding data option to contract when web3 1.0 is used

This commit is contained in:
Richard Ramos 2018-03-28 16:51:09 -04:00
parent 324ba904e8
commit 2313426a37
1 changed files with 1 additions and 0 deletions

View File

@ -25,6 +25,7 @@ EmbarkJS.Contract = function(options) {
// add gasPrice // add gasPrice
ContractClass = new this.web3.eth.Contract(this.abi, this.address); ContractClass = new this.web3.eth.Contract(this.abi, this.address);
ContractClass.setProvider(this.web3.currentProvider); ContractClass.setProvider(this.web3.currentProvider);
ContractClass.options.data = this.code;
return ContractClass; return ContractClass;
} else { } else {