const Web3 = require('web3'); module.exports = class Web3Utils { static buildByWs(ws) { if (!Web3Utils.wsWeb3) { Web3Utils.wsWeb3 = new Web3(ws) } return Web3Utils.wsWeb3 } static buildByHttp(http) { if (!Web3Utils.httpWeb3) { Web3Utils.httpWeb3 = new Web3(http) } return Web3Utils.httpWeb3 } static buildByIpc(ipc) { if (!Web3Utils.ipcWeb3) { Web3Utils.ipcWeb3 = new Web3(ipc) } return Web3Utils.ipcWeb3 } }