1
- require ( "@nomiclabs/hardhat-etherscan" ) ;
2
- require ( "@nomiclabs/hardhat-waffle" ) ;
3
- require ( "hardhat-gas-reporter" ) ;
4
- require ( "hardhat-deploy" ) ;
5
- require ( "solidity-coverage" ) ;
1
+ require ( "@nomiclabs/hardhat-etherscan" )
2
+ require ( "@nomiclabs/hardhat-waffle" )
3
+ require ( "hardhat-gas-reporter" )
4
+ require ( "hardhat-deploy" )
5
+ require ( "solidity-coverage" )
6
+ const process = require ( "node:process" )
6
7
7
8
// This is a sample Hardhat task. To learn how to create your own go to
8
9
// https://hardhat.org/guides/create-task.html
9
10
task ( "accounts" , "Prints the list of accounts" , async ( taskArgs , hre ) => {
10
- const accounts = await hre . ethers . getSigners ( ) ;
11
+ const accounts = await hre . ethers . getSigners ( )
11
12
12
- for ( const account of accounts ) {
13
- console . log ( account . address ) ;
14
- }
15
- } ) ;
13
+ for ( const account of accounts ) {
14
+ console . log ( account . address )
15
+ }
16
+ } )
16
17
17
18
// You need to export an object to set up your config
18
19
// Go to https://hardhat.org/config/ to learn more
@@ -21,48 +22,53 @@ task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
21
22
* @type import('hardhat/config').HardhatUserConfig
22
23
*/
23
24
module . exports = {
24
- solidity : {
25
- version : "0.8.26" ,
26
- settings : {
27
- optimizer : {
28
- enabled : true ,
29
- runs : 1000 ,
30
- } ,
25
+ solidity : {
26
+ version : "0.8.26" ,
27
+ settings : {
28
+ optimizer : {
29
+ enabled : true ,
30
+ runs : 1000 ,
31
+ } ,
32
+ } ,
31
33
} ,
32
- } ,
33
- networks : {
34
- main : {
35
- chainId : 1 ,
36
- url : `https://mainnet.infura.io/v3/${ process . env ?. INFURA_PROJECT_ID } ` || "" ,
37
- accounts : process . env . PRIVATE_KEY !== undefined ? [ process . env . PRIVATE_KEY ] : [ ] ,
34
+ networks : {
35
+ main : {
36
+ chainId : 1 ,
37
+ url : `https://mainnet.infura.io/v3/${ process . env ?. INFURA_PROJECT_ID } ` || "" ,
38
+ accounts : process . env . PRIVATE_KEY !== undefined ? [ process . env . PRIVATE_KEY ] : [ ] ,
39
+ } ,
40
+ hardhat : {
41
+ initialBaseFeePerGas : 0 , // workaround from https://github.com/sc-forks/solidity-coverage/issues/652#issuecomment-896330136 . Remove when that issue is closed.
42
+ } ,
43
+ goerli : {
44
+ chainId : 5 ,
45
+ url : `https://goerli.infura.io/v3/${ process . env ?. INFURA_PROJECT_ID } ` || "" ,
46
+ accounts : process . env . PRIVATE_KEY !== undefined ? [ process . env . PRIVATE_KEY ] : [ ] ,
47
+ } ,
48
+ xdai : {
49
+ chainId : 100 ,
50
+ url : "https://rpc.xdaichain.com" || "" ,
51
+ accounts : process . env . PRIVATE_KEY !== undefined ? [ process . env . PRIVATE_KEY ] : [ ] ,
52
+ } ,
53
+ sepolia : {
54
+ chainId : 11155111 ,
55
+ url : `https://sepolia.infura.io/v3/${ process . env ?. INFURA_PROJECT_ID } ` || "" ,
56
+ accounts : process . env . PRIVATE_KEY !== undefined ? [ process . env . PRIVATE_KEY ] : [ ] ,
57
+ } ,
38
58
} ,
39
- hardhat : {
40
- initialBaseFeePerGas : 0 , // workaround from https://github.com/sc-forks/solidity-coverage/issues/652#issuecomment-896330136 . Remove when that issue is closed.
59
+ gasReporter : {
60
+ enabled : process . env . REPORT_GAS !== undefined ,
61
+ currency : "USD" ,
62
+ gasPrice : 100 ,
63
+ coinmarketcap : "5d0616e9-5ad1-46a5-8456-8bf84bb4dbc5" ,
64
+ outputFile : "gasExpenseReport.txt" ,
65
+ noColors : true ,
41
66
} ,
42
- goerli : {
43
- chainId : 5 ,
44
- url : `https://goerli.infura.io/v3/${ process . env ?. INFURA_PROJECT_ID } ` || "" ,
45
- accounts : process . env . PRIVATE_KEY !== undefined ? [ process . env . PRIVATE_KEY ] : [ ] ,
67
+ etherscan : {
68
+ apiKey : process . env . ETHERSCAN ,
46
69
} ,
47
- xdai : {
48
- chainId : 100 ,
49
- url : "https://rpc.xdaichain.com" || "" ,
50
- accounts : process . env . PRIVATE_KEY !== undefined ? [ process . env . PRIVATE_KEY ] : [ ] ,
51
- } ,
52
- } ,
53
- gasReporter : {
54
- enabled : process . env . REPORT_GAS !== undefined ,
55
- currency : "USD" ,
56
- gasPrice : 100 ,
57
- coinmarketcap : "5d0616e9-5ad1-46a5-8456-8bf84bb4dbc5" ,
58
- outputFile : "gasExpenseReport.txt" ,
59
- noColors : true
60
- } ,
61
- etherscan : {
62
- apiKey : process . env . ETHERSCAN ,
63
- } ,
64
70
65
- mocha : {
66
- timeout : 60000 // Testnet are taking long.
67
- }
68
- } ;
71
+ mocha : {
72
+ timeout : 60000 , // Testnet are taking long.
73
+ } ,
74
+ }
0 commit comments