Skip to content

Commit 4579397

Browse files
committed
modify hardhat readme & upgrade hardhat version
1 parent 5ed080c commit 4579397

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

basic/07-hardhat/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ module.exports = {
5757
// rinkeby 测试网络
5858
rinkeby: {
5959
// 请将 INFURA_ID 替换成你自己的
60-
url: 'https://rinkeby.infura.io/v3/{INFURA_ID}',
60+
// url: 'https://rinkeby.infura.io/v3/{INFURA_ID}',
61+
url: 'https://rinkeby.infura.io/v3/' + process.env.INFURA_ID, //<---- 在.env文件中配置自己的INFURA_ID
62+
6163
// 填写测试账户的私钥,可填写多个
6264
accounts: [privateKey1, privateKey2, ...]
6365
}

basic/07-hardhat/hardhat.config.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,23 @@ module.exports = {
3030
*/
3131
},
3232
rinkeby: {
33-
url: 'https://rinkeby.infura.io/v3/' + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
33+
url: 'https://rinkeby.infura.io/v3/' + process.env.INFURA_ID, //<---- CONFIG YOUR INFURA ID IN .ENV! (or it won't work)
3434
accounts: [mnemonic()],
3535
},
3636
kovan: {
37-
url: 'https://kovan.infura.io/v3/' + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
37+
url: 'https://kovan.infura.io/v3/' + process.env.INFURA_ID, //<---- CONFIG YOUR INFURA ID IN .ENV! (or it won't work)
3838
accounts: [mnemonic()],
3939
},
4040
mainnet: {
41-
url: 'https://mainnet.infura.io/v3/' + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
41+
url: 'https://mainnet.infura.io/v3/' + process.env.INFURA_ID, //<---- CONFIG YOUR INFURA ID IN .ENV! (or it won't work)
4242
accounts: [mnemonic()],
4343
},
4444
ropsten: {
45-
url: 'https://ropsten.infura.io/v3/' + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
45+
url: 'https://ropsten.infura.io/v3/' + process.env.INFURA_ID, //<---- CONFIG YOUR INFURA ID IN .ENV! (or it won't work)
4646
accounts: [mnemonic()],
4747
},
4848
matic: {
49-
url: 'https://polygon-mainnet.infura.io/v3/' + process.env.PROJECT_ID,
49+
url: 'https://polygon-mainnet.infura.io/v3/' + process.env.PROJECT_ID, //<---- CONFIG YOUR INFURA ID IN .ENV! (or it won't work)
5050
accounts: [mnemonic()]
5151
},
5252
},

basic/07-hardhat/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"dotenv": "^10.0.0",
1717
"ethereum-waffle": "^3.4.0",
1818
"ethers": "^5.4.7",
19-
"hardhat": "^2.6.4",
19+
"hardhat": "^2.9.0",
2020
"sol-merger": "^3.1.0"
2121
},
2222
"dependencies": {

0 commit comments

Comments
 (0)