Skip to content

Commit b9ba8a0

Browse files
committed
feat(hardhat): sepolia
1 parent 54e3cb5 commit b9ba8a0

File tree

1 file changed

+56
-50
lines changed

1 file changed

+56
-50
lines changed

hardhat.config.js

+56-50
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
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")
67

78
// This is a sample Hardhat task. To learn how to create your own go to
89
// https://hardhat.org/guides/create-task.html
910
task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
10-
const accounts = await hre.ethers.getSigners();
11+
const accounts = await hre.ethers.getSigners()
1112

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+
})
1617

1718
// You need to export an object to set up your config
1819
// Go to https://hardhat.org/config/ to learn more
@@ -21,48 +22,53 @@ task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
2122
* @type import('hardhat/config').HardhatUserConfig
2223
*/
2324
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+
},
3133
},
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+
},
3858
},
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,
4166
},
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,
4669
},
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-
},
6470

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

Comments
 (0)