Skip to content

Commit 1ba04ac

Browse files
authored
Lazy load ganache in buidler plugin (sc-forks#515)
1 parent 889d75c commit 1ba04ac

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

plugins/buidler.plugin.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ const pkg = require('./../package.json');
77
const death = require('death');
88
const path = require('path');
99
const Web3 = require('web3');
10-
const ganache = require('ganache-cli');
1110

1211
const { task, types } = require("@nomiclabs/buidler/config");
1312
const { ensurePluginLoadedWithUsePlugin } = require("@nomiclabs/buidler/plugins");
@@ -56,7 +55,7 @@ function plugin() {
5655
// ==============
5756
const network = buidlerUtils.setupNetwork(env, api, ui);
5857

59-
const client = api.client || ganache;
58+
const client = api.client || require('ganache-cli');
6059
const address = await api.ganache(client);
6160
const web3 = new Web3(address);
6261
const accounts = await web3.eth.getAccounts();

0 commit comments

Comments
 (0)