-
Notifications
You must be signed in to change notification settings - Fork 47
/
hardhat-ganache-tests.config.js
71 lines (63 loc) · 1.78 KB
/
hardhat-ganache-tests.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//TODO: remove this legacy config for tests using truffle ganache as a workaround before hh
// added instant blocks advance
const { default: Ganache } = require("ganache-core");
const { task } = require("hardhat/config");
require("@nomiclabs/hardhat-ganache");
require("@nomiclabs/hardhat-truffle5");
require("@nomiclabs/hardhat-ethers");
require("@nomiclabs/hardhat-web3");
require("@nomiclabs/hardhat-waffle");
require("hardhat-contract-sizer"); //yarn run hardhat size-contracts
require("solidity-coverage"); // $ npx hardhat coverage
require("hardhat-log-remover");
// This is a sample Hardhat task. To learn how to create your own go to
// https://hardhat.org/guides/create-task.html
/// this is for use with ethers.js
task("accounts", "Prints the list of accounts", async () => {
const accounts = await ethers.getSigners();
for (const account of accounts.address) {
const wallet = ethers.Wallet.fromMnemonic("test test test test test test test test test test test junk", "m/44'/60'/0'/0");
console.log(account);
}
});
/*task("accounts", "Prints accounts", async (_, { web3 }) => {
console.log();
console.log(await web3.eth.getAccounts());
});*/
// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more
/**
* @type import('hardhat/config').HardhatUserConfig
*/
/**/
module.exports = {
solidity: {
version: "0.5.17",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
contractSizer: {
alphaSort: false,
runOnCompile: false,
disambiguatePaths: false,
},
networks: {
hardhat: {},
ganache: {
url: "http://127.0.0.1:7545",
gas: 6721975, //Block Gas Limit - Ganache
},
},
paths: {
sources: "./contracts",
tests: "./tests",
},
mocha: {
timeout: 600000,
grep: "^(?=.*; using Ganache).*",
},
};