Skip to content

Commit 0dc368f

Browse files
committed
Finish warm-up quiz + add missing }) syntax to line 820
1 parent 13026a7 commit 0dc368f

File tree

6 files changed

+29
-37
lines changed

6 files changed

+29
-37
lines changed

pages/lessons/projects/4.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -817,6 +817,7 @@ Ok, here are some tests for these helpers!
817817
it('should error if token does not exist', async function () {
818818
await expect(contract.tokenURI(0)).to.be.revertedWith('Nonexistent token')
819819
})
820+
})
820821

821822
describe('tierNameOf', async function () {
822823
it('should return proper tier name for Tier 0', async function () {
Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
{
2-
"question": "",
2+
"question": "Choose the reasons for using automated tests:",
33
"options": [
44
{
5-
"answer": "",
5+
"answer": "Give us insurance if we upgrade code later ",
66
"correct": true
77
},
88
{
9-
"answer": ""
9+
"answer": "So we don’t have to use manual tests"
1010
},
1111
{
12-
"answer": "",
12+
"answer": "Give us the chance to utilise code modularly",
1313
"correct": true
1414
},
1515
{
16-
"answer": ""
17-
},
18-
{
19-
"answer": ""
16+
"answer": "All of the above"
2017
}
2118
]
2219
}

utils/questions/lesson-4/1-intro/Q2.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
{
2-
"question": "Choose reasons for using automated tests:",
2+
"question": "What is the role of a Testnet in smart contract development?",
33
"options": [
44
{
5-
"answer": "Give us insurance if we upgrade code later ",
6-
"correct": true
5+
"answer": "It helps to deploy smart contracts to the Ethereum mainnet."
6+
},
7+
{
8+
"answer": "To airdrop free Ether to devs because testing gets the eco-system a good name."
79
},
810
{
9-
"answer": "So we don’t have to use manual tests"
11+
"answer": "It's used to interact with smart contracts using that real Ether."
1012
},
1113
{
12-
"answer": "Give us the chance to utilise code modularly",
14+
"answer": "It's a network that is used for testing smart contracts.",
1315
"correct": true
1416
}
1517
]
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
2-
"question": "What do you imagine one of the first steps is in this lesson?",
2+
"question": "What is the purpose of the 'require' statement in Solidity?",
33
"options": [
44
{
5-
"answer": "Add your private key to the .gitignore file!"
5+
"answer": "For specifying the visibility of a variable or function."
66
},
77
{
8-
"answer": "Harmonise Solidity versions across the project",
9-
"correct": true
8+
"answer": "To be able to easily define a new modifier in the contract whenever we need it."
109
},
1110
{
12-
"answer": "Add a new line of code to the contract to signal we can test it"
11+
"answer": "For declaring a new function in the contract."
1312
},
1413
{
15-
"answer": "Add a console.log line to the contract code so we can see the output of the tests"
14+
"answer": "To perform a conditional check, and revert the transaction if it fails.",
15+
"correct": true
1616
}
1717
]
1818
}
Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
{
2-
"question": "",
2+
"question": "When writing unit tests for a smart contract, what should we be testing?",
33
"options": [
44
{
5-
"answer": "",
6-
"correct": true
5+
"answer": "Functionality that only involves external contracts."
76
},
87
{
9-
"answer": ""
8+
"answer": "Only private functions that aren't externally accessible."
109
},
1110
{
12-
"answer": "",
11+
"answer": "All functions and possible edge cases that the contract may encounter.",
1312
"correct": true
1413
},
1514
{
16-
"answer": ""
17-
},
18-
{
19-
"answer": ""
15+
"answer": "Just the constructor function to ensure the contract gets deployed properly."
2016
}
2117
]
2218
}
Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
{
2-
"question": "",
2+
"question": "What do you imagine one of the first steps is in this lesson?",
33
"options": [
44
{
5-
"answer": "",
6-
"correct": true
7-
},
8-
{
9-
"answer": ""
5+
"answer": "To add your private key to the .gitignore file!"
106
},
117
{
12-
"answer": "",
8+
"answer": "To harmonise Solidity versions across the project",
139
"correct": true
1410
},
1511
{
16-
"answer": ""
12+
"answer": "To make sure to add an extra line of code to the contract to signal to Hardhat that we can test it"
1713
},
1814
{
19-
"answer": ""
15+
"answer": "To create a console.log line to the contract code so we can see the output of the tests"
2016
}
2117
]
2218
}

0 commit comments

Comments
 (0)