Skip to content

Commit 8b8a530

Browse files
jolycaojolycao
jolycao
authored and
jolycao
committed
fix the style of code
1 parent 6e52f33 commit 8b8a530

File tree

21 files changed

+64
-50
lines changed

21 files changed

+64
-50
lines changed

basic/07-hardhat/.env.example

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
PRIVATE_KEY=xxxxxxxxxxxxxxxx
1+
PRIVATE_KEY=xxxxxxxxxxxxxxxx
2+
INFURA_ID=yyyyyyyy

basic/07-hardhat/hardhat.config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,25 @@ module.exports = {
3434
*/
3535
},
3636
rinkeby: {
37-
url: "https://rinkeby.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
37+
url: "https://rinkeby.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
3838
accounts: [
3939
mnemonic()
4040
],
4141
},
4242
kovan: {
43-
url: "https://kovan.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
43+
url: "https://kovan.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
4444
accounts: [
4545
mnemonic()
4646
],
4747
},
4848
mainnet: {
49-
url: "https://mainnet.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
49+
url: "https://mainnet.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
5050
accounts: [
5151
mnemonic()
5252
],
5353
},
5454
ropsten: {
55-
url: "https://ropsten.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
55+
url: "https://ropsten.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
5656
accounts: [
5757
mnemonic()
5858
],

basic/08-hardhat-graph/.env.example

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
PRIVATE_KEY=xxxxxxxxxxxxxxxx
1+
PRIVATE_KEY=xxxxxxxxxxxxxxxx
2+
INFURA_ID=yyyyyyyy

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,25 +36,25 @@ module.exports = {
3636
*/
3737
},
3838
rinkeby: {
39-
url: "https://rinkeby.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
39+
url: "https://rinkeby.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
4040
accounts: [
4141
mnemonic()
4242
],
4343
},
4444
kovan: {
45-
url: "https://kovan.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
45+
url: "https://kovan.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
4646
accounts: [
4747
mnemonic()
4848
],
4949
},
5050
mainnet: {
51-
url: "https://mainnet.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
51+
url: "https://mainnet.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
5252
accounts: [
5353
mnemonic()
5454
],
5555
},
5656
ropsten: {
57-
url: "https://ropsten.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
57+
url: "https://ropsten.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
5858
accounts: [
5959
mnemonic()
6060
],

basic/09-hardhat-react/.env.example

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
PRIVATE_KEY=xxxxxxxxxxxxxxxx
1+
PRIVATE_KEY=xxxxxxxxxxxxxxxx
2+
INFURA_ID=yyyyyyyy

basic/09-hardhat-react/hardhat.config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,25 @@ module.exports = {
2525
*/
2626
},
2727
rinkeby: {
28-
url: "https://rinkeby.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
28+
url: "https://rinkeby.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
2929
accounts: [
3030
mnemonic()
3131
],
3232
},
3333
kovan: {
34-
url: "https://kovan.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
34+
url: "https://kovan.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
3535
accounts: [
3636
mnemonic()
3737
],
3838
},
3939
mainnet: {
40-
url: "https://mainnet.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
40+
url: "https://mainnet.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
4141
accounts: [
4242
mnemonic()
4343
],
4444
},
4545
ropsten: {
46-
url: "https://ropsten.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
46+
url: "https://ropsten.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
4747
accounts: [
4848
mnemonic()
4949
],
+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
PRIVATE_KEY=xxxxxxxxxxxxxxxx
1+
PRIVATE_KEY=xxxxxxxxxxxxxxxx
2+
INFURA_ID=yyyyyyyy

basic/10-hardhat-ipfs-erc721/hardhat.config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,25 +36,25 @@ module.exports = {
3636
*/
3737
},
3838
rinkeby: {
39-
url: "https://rinkeby.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
39+
url: "https://rinkeby.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
4040
accounts: [
4141
mnemonic()
4242
],
4343
},
4444
kovan: {
45-
url: "https://kovan.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
45+
url: "https://kovan.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
4646
accounts: [
4747
mnemonic()
4848
],
4949
},
5050
mainnet: {
51-
url: "https://mainnet.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
51+
url: "https://mainnet.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
5252
accounts: [
5353
mnemonic()
5454
],
5555
},
5656
ropsten: {
57-
url: "https://ropsten.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
57+
url: "https://ropsten.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
5858
accounts: [
5959
mnemonic()
6060
],
+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
PRIVATE_KEY=xxxxxxxxxxxxxxxx
1+
PRIVATE_KEY=xxxxxxxxxxxxxxxx
2+
INFURA_ID=yyyyyyyy

basic/11-react-express-hardhat/hardhat.config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,19 @@ module.exports = {
3434
*/
3535
},
3636
rinkeby: {
37-
url: 'https://rinkeby.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07', //<---- YOUR INFURA ID! (or it won't work)
37+
url: 'https://rinkeby.infura.io/v3/' + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
3838
accounts: [mnemonic()],
3939
},
4040
kovan: {
41-
url: 'https://kovan.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07', //<---- YOUR INFURA ID! (or it won't work)
41+
url: 'https://kovan.infura.io/v3/' + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
4242
accounts: [mnemonic()],
4343
},
4444
mainnet: {
45-
url: 'https://mainnet.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07', //<---- YOUR INFURA ID! (or it won't work)
45+
url: 'https://mainnet.infura.io/v3/' + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
4646
accounts: [mnemonic()],
4747
},
4848
ropsten: {
49-
url: 'https://ropsten.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07', //<---- YOUR INFURA ID! (or it won't work)
49+
url: 'https://ropsten.infura.io/v3/' + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
5050
accounts: [mnemonic()],
5151
},
5252
},

basic/12-token-crowdfund/.env.example

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
PRIVATE_KEY=xxxxxxxxxxxxxxxx
1+
PRIVATE_KEY=xxxxxxxxxxxxxxxx
2+
INFURA_ID=yyyyyyyy

basic/12-token-crowdfund/hardhat.config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,25 +47,25 @@ module.exports = {
4747
*/
4848
},
4949
rinkeby: {
50-
url: "https://rinkeby.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
50+
url: "https://rinkeby.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
5151
accounts: [
5252
mnemonic()
5353
],
5454
},
5555
kovan: {
56-
url: "https://kovan.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
56+
url: "https://kovan.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
5757
accounts: [
5858
mnemonic()
5959
],
6060
},
6161
mainnet: {
62-
url: "https://mainnet.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
62+
url: "https://mainnet.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
6363
accounts: [
6464
mnemonic()
6565
],
6666
},
6767
ropsten: {
68-
url: "https://ropsten.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
68+
url: "https://ropsten.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
6969
accounts: [
7070
mnemonic()
7171
],
+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
PRIVATE_KEY=xxxxxxxxxxxxxxxx
1+
PRIVATE_KEY=xxxxxxxxxxxxxxxx
2+
INFURA_ID=yyyyyyyy

basic/14-chainlink-price-feed/hardhat.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function mnemonic() {
2828
/**
2929
* @type import('hardhat/config').HardhatUserConfig
3030
*/
31-
const kovanRpcUrl = "https://kovan.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07"
31+
const kovanRpcUrl = "https://kovan.infura.io/v3/" + process.env.INFURA_ID
3232
const privateKey = mnemonic()
3333

3434
module.exports = {
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
PRIVATE_KEY=xxxxxxxxxxxxxxxx
1+
PRIVATE_KEY=xxxxxxxxxxxxxxxx
2+
INFURA_ID=yyyyyyyy

basic/15-nft-blindbox-chainlink-vrf/hardhat.config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,25 +47,25 @@ module.exports = {
4747
*/
4848
},
4949
rinkeby: {
50-
url: "https://rinkeby.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
50+
url: "https://rinkeby.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
5151
accounts: [
5252
mnemonic()
5353
],
5454
},
5555
kovan: {
56-
url: "https://kovan.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
56+
url: "https://kovan.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
5757
accounts: [
5858
mnemonic()
5959
],
6060
},
6161
mainnet: {
62-
url: "https://mainnet.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
62+
url: "https://mainnet.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
6363
accounts: [
6464
mnemonic()
6565
],
6666
},
6767
ropsten: {
68-
url: "https://ropsten.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
68+
url: "https://ropsten.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
6969
accounts: [
7070
mnemonic()
7171
],
+6-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
PRIVATE_KEY=xxxxxxxxxxxxxxxx
1+
PRIVATE_KEY=xxxxxxxxxxxxxxxx
2+
INFURA_ID=yyyyyyyy
3+
PRIVATE_KEY_MAIN=zzzzzzz
4+
PRIVATE_KEY_ALICE=mmmmmmmm
5+
PRIVATE_KEY_BOB=tttttt
6+
PRIVATE_KEY_TEST=ooooooooo

basic/16-nft-auction-exchange/hardhat.config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ module.exports = {
6565
*/
6666
},
6767
rinkeby: {
68-
url: "https://rinkeby.infura.io/v3/3f8471cb133047efa90cb89936e9f8bb", //<---- YOUR INFURA ID! (or it won't work)
68+
url: "https://rinkeby.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
6969
accounts: [
7070
mnemonic()
7171
],
7272
},
7373
kovan: {
74-
url: "https://kovan.infura.io/v3/3f8471cb133047efa90cb89936e9f8bb", //<---- YOUR INFURA ID! (or it won't work)
74+
url: "https://kovan.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
7575
accounts: [
7676
mnemonic(),
7777
mnemonicAlice(),
@@ -80,13 +80,13 @@ module.exports = {
8080
],
8181
},
8282
mainnet: {
83-
url: "https://mainnet.infura.io/v3/3f8471cb133047efa90cb89936e9f8bb", //<---- YOUR INFURA ID! (or it won't work)
83+
url: "https://mainnet.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
8484
accounts: [
8585
mnemonic()
8686
],
8787
},
8888
ropsten: {
89-
url: "https://ropsten.infura.io/v3/3f8471cb133047efa90cb89936e9f8bb", //<---- YOUR INFURA ID! (or it won't work)
89+
url: "https://ropsten.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
9090
accounts: [
9191
mnemonic()
9292
],
+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
PRIVATE_KEY=xxxxxxxxxxxxxxxx
1+
PRIVATE_KEY=xxxxxxxxxxxxxxxx
2+
INFURA_ID=yyyyyyyy

basic/23-erc865-and-erc875/hardhat.config.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ task("accounts", "Prints the list of accounts", async () => {
1515

1616
function mnemonic() {
1717

18-
return process.env.PRIVATE_KEY;
18+
return process.env.PRIVATE_KEY;
1919

2020
}
2121

@@ -34,25 +34,25 @@ module.exports = {
3434
*/
3535
},
3636
rinkeby: {
37-
url: "https://rinkeby.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
37+
url: "https://rinkeby.infura.io/v3/" + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
3838
accounts: [
3939
mnemonic()
4040
],
4141
},
4242
kovan: {
43-
url: "https://kovan.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
43+
url: "https://kovan.infura.io/v3/" + + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
4444
accounts: [
4545
mnemonic()
4646
],
4747
},
4848
mainnet: {
49-
url: "https://mainnet.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
49+
url: "https://mainnet.infura.io/v3/" + + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
5050
accounts: [
5151
mnemonic()
5252
],
5353
},
5454
ropsten: {
55-
url: "https://ropsten.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work)
55+
url: "https://ropsten.infura.io/v3/" + + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work)
5656
accounts: [
5757
mnemonic()
5858
],

basic/23-erc865-and-erc875/test/test_DToken.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ const hashedTightPacked = args => ethUtil.keccak256(Buffer.concat(args));
173173
let messageHash = hashedTightPacked(components);
174174
let message_bytes = ethers.utils.arrayify(messageHash);
175175

176-
// Sign the message_bytes by alice
176+
// Sign the message_bytes by bob
177177
let sig = await bob.signMessage(message_bytes);
178178

179179
//Swith to charlie
@@ -197,7 +197,7 @@ const hashedTightPacked = args => ethUtil.keccak256(Buffer.concat(args));
197197

198198
it('Alice decrease Bob allowance by Charlie (fee=1)', async () => {
199199
// //Swith to charlie
200-
let dTokenAlice = dTokenOwner.connect(alice);
200+
const dTokenAlice = dTokenOwner.connect(alice);
201201
// Allow bob to transfer 1000 from alice
202202
await dTokenAlice.approve(bob.address, 1000)
203203

0 commit comments

Comments
 (0)