mirror of
https://github.com/status-im/web3.js.git
synced 2025-02-24 03:58:13 +00:00
Merge branch 'develop' of github.com:ethereum/web3.js into develop
This commit is contained in:
commit
bc45b70e96
@ -166,20 +166,6 @@ var ContractFactory = function (eth, abi) {
|
||||
this.eth = eth;
|
||||
this.abi = abi;
|
||||
|
||||
this.new.getData = this.getData.bind(this);
|
||||
};
|
||||
|
||||
/**
|
||||
* Should be called to create new ContractFactory
|
||||
*
|
||||
* @method contract
|
||||
* @param {Array} abi
|
||||
* @returns {ContractFactory} new contract factory
|
||||
*/
|
||||
//var contract = function (abi) {
|
||||
//return new ContractFactory(abi);
|
||||
//};
|
||||
|
||||
/**
|
||||
* Should be called to create new contract on a blockchain
|
||||
*
|
||||
@ -190,7 +176,7 @@ var ContractFactory = function (eth, abi) {
|
||||
* @param {Function} callback
|
||||
* @returns {Contract} returns contract instance
|
||||
*/
|
||||
ContractFactory.prototype.new = function () {
|
||||
this.new = function () {
|
||||
var contract = new Contract(this.eth, this.abi);
|
||||
|
||||
// parse arguments
|
||||
@ -236,6 +222,22 @@ ContractFactory.prototype.new = function () {
|
||||
return contract;
|
||||
};
|
||||
|
||||
this.new.getData = this.getData.bind(this);
|
||||
};
|
||||
|
||||
/**
|
||||
* Should be called to create new ContractFactory
|
||||
*
|
||||
* @method contract
|
||||
* @param {Array} abi
|
||||
* @returns {ContractFactory} new contract factory
|
||||
*/
|
||||
//var contract = function (abi) {
|
||||
//return new ContractFactory(abi);
|
||||
//};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Should be called to get access to existing contract on a blockchain
|
||||
*
|
||||
@ -294,4 +296,3 @@ var Contract = function (eth, abi, address) {
|
||||
};
|
||||
|
||||
module.exports = ContractFactory;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user