tornado-trees/hardhat.config.js

39 lines
935 B
JavaScript
Raw Normal View History

2021-02-02 14:38:11 +03:00
/* global task, ethers */
2021-02-02 14:27:58 +03:00
require('@nomiclabs/hardhat-waffle')
2021-02-03 01:32:44 +03:00
require('dotenv').config()
2021-02-01 16:40:32 +03: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 14:27:58 +03:00
task('accounts', 'Prints the list of accounts', async () => {
const accounts = await ethers.getSigners()
2021-02-01 16:40:32 +03:00
for (const account of accounts) {
2021-02-02 14:27:58 +03:00
console.log(account.address)
2021-02-01 16:40:32 +03:00
}
2021-02-02 14:27:58 +03:00
})
2021-02-01 16:40:32 +03: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 22:46:25 +03:00
const config = {
2021-02-02 14:27:58 +03:00
solidity: '0.6.12',
2021-02-03 01:32:44 +03:00
networks: {
2021-02-04 17:17:21 +03:00
hardhat: {
2021-02-06 16:13:22 +03:00
blockGasLimit: 9500000,
2021-02-04 17:17:21 +03:00
},
2021-02-03 01:32:44 +03:00
},
2021-02-05 23:28:51 +03:00
mocha: {
timeout: 600000,
},
2021-02-02 14:27:58 +03:00
}
2021-02-05 22:46:25 +03: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