lib/network/truffle-network.js
/**
   * Create Web3 provider from truffle config
   * @param {*} truffleConfig
   */
Create Web3 provider from truffle config
@param {*} truffleConfig
Create Web3 provider from truffle config @param { * } truffleConfig
static createProviderFromTruffleConfig(truffleConfig) {
    const { host, port, protocol } = truffleConfig;
    const resolvedHost = /^[a-z]+:\/\//i.test(host) ? host : `${protocol}://${host}`;
    const url = `${resolvedHost}:${port}`;
    return this.createRetryableProviderFromProtocol(protocol, url);
  }
static createProviderFromTruffleConfig ( truffleConfig ) { const { host , port , protocol } = truffleConfig ; const resolvedHost = / ^[a-z]+:\/\/ / i . test ( host ) ? host : ` ${ protocol } ${ host } ` ; const url = ` ${ resolvedHost } ${ port } ` ; return this . createRetryableProviderFromProtocol ( protocol , url ) ; }
Create Web3 provider from truffle config
 @param {*} truffleConfig
Create Web3 provider from truffle config @param { * } truffleConfig