tornado-trees/hardhat.config.js

47 lines
1.0 KiB
JavaScript
Raw Normal View History

2021-02-02 12:38:11 +01:00
/* global task, ethers */
2021-02-02 12:27:58 +01:00
require('@nomiclabs/hardhat-waffle')
2021-02-02 23:32:44 +01:00
require('dotenv').config()
2021-02-01 14:40:32 +01:00
// This is a sample Hardhat task. To learn how to create your own go to
// https://hardhat.org/guides/create-task.html
2021-02-02 12:27:58 +01:00
task('accounts', 'Prints the list of accounts', async () => {
const accounts = await ethers.getSigners()
2021-02-01 14:40:32 +01:00
for (const account of accounts) {
2021-02-02 12:27:58 +01:00
console.log(account.address)
2021-02-01 14:40:32 +01:00
}
2021-02-02 12:27:58 +01:00
})
2021-02-01 14:40:32 +01:00
// 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
*/
2021-02-05 20:46:25 +01:00
const config = {
2021-02-10 21:31:37 +01:00
solidity: {
version: '0.6.12',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
2021-02-02 23:32:44 +01:00
networks: {
2021-02-04 15:17:21 +01:00
hardhat: {
2021-02-06 14:13:22 +01:00
blockGasLimit: 9500000,
2021-02-04 15:17:21 +01:00
},
2021-02-02 23:32:44 +01:00
},
2021-02-05 21:28:51 +01:00
mocha: {
timeout: 600000,
},
2021-02-02 12:27:58 +01:00
}
2021-02-05 20:46:25 +01:00
if (process.env.NETWORK) {
config.networks[process.env.NETWORK] = {
url: `https://${process.env.NETWORK}.infura.io/v3/${process.env.INFURA_TOKEN}`,
accounts: [process.env.PRIVATE_KEY],
}
}
module.exports = config