src/utils/index.js
function deployContract(eth, factory, args, callback) {
  factory.new.apply(factory, args).then((txHash) => {
    getTransactionSuccess(eth, txHash, 8000000, (receiptError, receipt) => {
      if (receiptError) {
        callback(receiptError, null);
      }

      if (receipt) {
        const contractInstance = factory.at(receipt.contractAddress);
        contractInstance.receipt = receipt;
        callback(null, contractInstance);
      }
    });
  }).catch(callback);
}
function deployContract(eth, factory, args, callback) {
  factory.new.apply(factory, args).then((txHash) => {
    getTransactionSuccess(eth, txHash, 8000000, (receiptError, receipt) => {
      if (receiptError) {
        callback(receiptError, null);
      }

      if (receipt) {
        const contractInstance = factory.at(receipt.contractAddress);
        contractInstance.receipt = receipt;
        callback(null, contractInstance);
      }
    });
  }).catch(callback);
}
function deployContract ( eth , factory , args , callback ) { factory . new . apply ( factory , args ) . then ( ( txHash ) => { getTransactionSuccess ( eth , txHash , 8000000 , ( receiptError , receipt ) => { if ( receiptError ) { callback ( receiptError , null ) ; } if ( receipt ) { const contractInstance = factory . at ( receipt . contractAddress ) ; contractInstance . receipt = receipt ; callback ( null , contractInstance ) ; } } ) ; } ) . catch ( callback ) ; }
Deploy the contract with eth, factory, and args

@method deployContract
@param {Object} eth the eth query instance
@param {Object} factory the contract factory
@param {Array} args the contract constructor arguments
@param {Function} callback the final callback
@callback {Object} contractInstance the deployed contract instance with receipt prop
Deploy the contract with eth factory and args