Skip to content

Commit f7e8840

Browse files
authored
Merge pull request #798 from yingjingyang/main
fix hardhat.config.js
2 parents 950ec1b + 9af368f commit f7e8840

File tree

3 files changed

+6
-13
lines changed

3 files changed

+6
-13
lines changed

basic/07-hardhat/hardhat.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ module.exports = {
4545
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
},
48+
arbitest: {
49+
url: 'https://arbitrum-rinkeby.infura.io/v3/' + process.env.INFURA_ID, //<---- CONFIG YOUR INFURA ID IN .ENV! (or it won't work)
50+
accounts: [mnemonic()],
51+
},
4852
matic: {
4953
url: 'https://polygon-mainnet.infura.io/v3/' + process.env.PROJECT_ID, //<---- CONFIG YOUR INFURA ID IN .ENV! (or it won't work)
5054
accounts: [mnemonic()]

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

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,6 @@ require('dotenv').config();
55
const PRIVATE_KEY = process.env.PRIVATE_KEY;
66
const defaultNetwork = 'localhost';
77

8-
function mnemonic() {
9-
try {
10-
return fs.readFileSync('./mnemonic.txt').toString().trim();
11-
} catch (e) {
12-
if (defaultNetwork !== 'localhost') {
13-
console.log('☢️ WARNING: No mnemonic file created for a deploy account.');
14-
}
15-
}
16-
}
17-
188
// You need to export an object to set up your config
199
// Go to https://hardhat.org/config/ to learn more
2010
module.exports = {
@@ -31,9 +21,7 @@ module.exports = {
3121
},
3222
rinkeby: {
3323
url: 'https://rinkeby.infura.io/v3/' + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
34-
accounts: {
35-
mnemonic: mnemonic(),
36-
},
24+
accounts: [PRIVATE_KEY],
3725
},
3826
kovan: {
3927
url: 'https://kovan.infura.io/v3/' + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)

security/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- [Ethereum Smart Contract Security Best Practices](https://consensys.github.io/smart-contract-best-practices/)
99
- [Examples of Solidity security issues](https://github.com/crytic/not-so-smart-contracts)
1010
- [Awesome Blockchain Security](https://github.com/xxxeyJ/Awesome-Blockchain-Security)
11+
- [EVM Deep Dives](https://noxx.substack.com/p/evm-deep-dives-the-path-to-shadowy?s=r)
1112

1213
## Solidity security wargame
1314

0 commit comments

Comments
 (0)