forked from l-henri/solidity-101
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ex03.sol
38 lines (29 loc) · 859 Bytes
/
ex03.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
pragma solidity ^0.6.0;
import "../exerciceTemplate.sol";
/*
Exercice 3: Using a simple public contract function
In this exercice, you need to:
- Use this contract's claimPoints() function
- Understand the require() keyword and send the correct value to pass the requirement
- Your points are credited by the contract
*/
/*
What you need to know to complete this exercice
A) What was included in the previous exercices
B) Understanding requires https://docs.soliditylang.org/en/v0.6.0/control-structures.html#id4
*/
contract ex03 is exerciceTemplate {
constructor(ERC20TD _TDERC20)
public
exerciceTemplate(_TDERC20)
{
}
function claimPoints(uint _studentUint)
public
{
require(_studentUint == 180618, "Value is incorrect");
// Validating exercice
creditStudent(2, msg.sender);
validateExercice(msg.sender);
}
}