src/lib/index.js
function loadEnvironment(environment, callback) {
  const errorMsgBase = 'while transforming environment, ';

  var transformedEnvironment = cloneDeep(environment); // eslint-disable-line

  const query = new Eth(transformedEnvironment.provider);
  query.net_version((versionError, result) => { // eslint-disable-line
    if (versionError) { return callback(error(`${errorMsgBase}error attempting to connect to node environment '${transformedEnvironment.name}': ${versionError}`), null); }

    query.accounts((accountsError, accounts) => { // eslint-disable-line
      if (accountsError !== null) { return callback(error(`${errorMsgBase}error while getting accounts for deployment: ${accountsError}`), null); }

      callback(accountsError, Object.assign({}, cloneDeep(transformedEnvironment), {
        accounts,
        defaultTxObject: transformTxObject(environment.defaultTxObject, accounts),
      }));
    });
  });
}
function loadEnvironment(environment, callback) {
  const errorMsgBase = 'while transforming environment, ';

  var transformedEnvironment = cloneDeep(environment); // eslint-disable-line

  const query = new Eth(transformedEnvironment.provider);
  query.net_version((versionError, result) => { // eslint-disable-line
    if (versionError) { return callback(error(`${errorMsgBase}error attempting to connect to node environment '${transformedEnvironment.name}': ${versionError}`), null); }

    query.accounts((accountsError, accounts) => { // eslint-disable-line
      if (accountsError !== null) { return callback(error(`${errorMsgBase}error while getting accounts for deployment: ${accountsError}`), null); }

      callback(accountsError, Object.assign({}, cloneDeep(transformedEnvironment), {
        accounts,
        defaultTxObject: transformTxObject(environment.defaultTxObject, accounts),
      }));
    });
  });
}
function loadEnvironment ( environment , callback ) { const errorMsgBase = 'while transforming environment, ' ; var transformedEnvironment = cloneDeep ( environment ) ; // eslint-disable-line const query = new Eth ( transformedEnvironment . provider ) ; query . net_version ( ( versionError , result ) => { // eslint-disable-line if ( versionError ) { return callback ( error ( ` ${ errorMsgBase } ${ transformedEnvironment . name } ${ versionError } ` ) , null ) ; } query . accounts ( ( accountsError , accounts ) => { // eslint-disable-line if ( accountsError !== null ) { return callback ( error ( ` ${ errorMsgBase } ${ accountsError } ` ) , null ) ; } callback ( accountsError , Object . assign ( { } , cloneDeep ( transformedEnvironment ) , { accounts , defaultTxObject : transformTxObject ( environment . defaultTxObject , accounts ) , } ) ) ; } ) ; } ) ; }
Load the environment, get accounts, gas limits, balances etc.

@method loadEnvironment
@param {Object} environment the environment object specified in the config.js
@param {Function} callback the callback to return the environment
@callback {Object} output the transformed environment object
Load the environment get accounts gas limits balances etc .