Skip to content

Commit 30eda3a

Browse files
committed
fix config
1 parent 6a6180b commit 30eda3a

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

basic/08-hardhat-graph/hardhat.config.js

+5-8
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@ const fs = require('fs');
33
require('dotenv').config();
44

55

6+
const PRIVATE_KEY = process.env.PRIVATE_KEY;
67
const defaultNetwork = 'localhost';
78

8-
function mnemonic() {
9-
return process.env.PRIVATE_KEY;
10-
}
11-
129
// You need to export an object to set up your config
1310
// Go to https://hardhat.org/config/ to learn more
1411
module.exports = {
@@ -25,19 +22,19 @@ module.exports = {
2522
},
2623
rinkeby: {
2724
url: 'https://rinkeby.infura.io/v3/' + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
28-
accounts: [mnemonic()],
25+
accounts: [PRIVATE_KEY],
2926
},
3027
kovan: {
3128
url: 'https://kovan.infura.io/v3/' + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
32-
accounts: [mnemonic()],
29+
accounts: [PRIVATE_KEY],
3330
},
3431
mainnet: {
3532
url: 'https://mainnet.infura.io/v3/' + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
36-
accounts: [mnemonic()],
33+
accounts: [PRIVATE_KEY],
3734
},
3835
ropsten: {
3936
url: 'https://ropsten.infura.io/v3/' + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
40-
accounts: [mnemonic()],
37+
accounts: [PRIVATE_KEY],
4138
},
4239
},
4340
};

0 commit comments

Comments
 (0)