Skip to content

Commit 877a64d

Browse files
authored
Merge pull request #1052 from cheng521521/main
upgrade 13 chapter ether delta hardhat version.
2 parents 7710d56 + 46e0c9f commit 877a64d

File tree

4 files changed

+278
-310
lines changed

4 files changed

+278
-310
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,7 @@
1-
require("@nomiclabs/hardhat-waffle");
21
const fs = require("fs");
3-
4-
// This is a sample Hardhat task. To learn how to create your own go to
5-
// https://hardhat.org/guides/create-task.html
6-
task("accounts", "Prints the list of accounts", async () => {
7-
const accounts = await ethers.getSigners();
8-
9-
for (const account of accounts) {
10-
console.log(account.address);
11-
}
12-
});
13-
14-
function mnemonic() {
15-
16-
return process.env.PRIVATE_KEY
17-
18-
}
19-
20-
// 加载本地privateKeys到harhat本地测试网络
2+
require("@nomicfoundation/hardhat-ethers");
3+
require("@nomicfoundation/hardhat-chai-matchers");
4+
// load privateKeys to harhat network
215
function loadTestAccounts() {
226
const privateKyes = JSON.parse(fs.readFileSync("./testAccounts.json"));
237
return privateKyes.map((_privateKey, index) => ({
@@ -42,30 +26,6 @@ module.exports = {
4226
},
4327
localhost: {
4428
url: "http://localhost:8545",
45-
},
46-
// rinkeby: {
47-
// url: "https://rinkeby.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
48-
// accounts: [
49-
// mnemonic()
50-
// ],
51-
// },
52-
// kovan: {
53-
// url: "https://kovan.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
54-
// accounts: [
55-
// mnemonic()
56-
// ],
57-
// },
58-
// mainnet: {
59-
// url: "https://mainnet.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
60-
// accounts: [
61-
// mnemonic()
62-
// ],
63-
// },
64-
// ropsten: {
65-
// url: "https://ropsten.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
66-
// accounts: [
67-
// mnemonic()
68-
// ],
69-
// },
29+
}
7030
}
71-
};
31+
};

basic/13-decentralized-exchange/EtherDelta/package.json

+4-6
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@
66
},
77
"dependencies": {
88
"@openzeppelin/contracts": "^4.1.0",
9-
"hardhat": "^2.3.0"
9+
"hardhat": "^2.4.1"
1010
},
1111
"devDependencies": {
12-
"@nomiclabs/hardhat-ethers": "^2.0.2",
13-
"@nomiclabs/hardhat-waffle": "^2.0.1",
14-
"chai": "^4.3.4",
15-
"ethereum-waffle": "^3.3.0",
16-
"ethers": "^5.1.4"
12+
"@nomicfoundation/hardhat-chai-matchers": "^2.0.6",
13+
"@nomicfoundation/hardhat-ethers": "^3.0.5",
14+
"ethers": "^6.11.1"
1715
}
1816
}

0 commit comments

Comments
 (0)