-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathex12.sol
41 lines (30 loc) · 772 Bytes
/
ex12.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
39
40
41
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "../exerciceTemplate.sol";
/*
Exercice 11: Finding a hidden exercice
In this exercice, you need to:
- Read the code of TDERC20
- Explore the ERC20 transactions history of the token's TD to figure out which exercises are able to credit points
- Find ex12 address
- Claim points
*/
/*
*/
contract ex12 is exerciceTemplate {
uint public aValueToInput;
constructor(ERC20TD _TDERC20)
exerciceTemplate(_TDERC20)
{
aValueToInput == 0;
}
function askForPoints(uint _valueToInput, uint _newValue)
public
{
require(_valueToInput == aValueToInput);
aValueToInput = _newValue;
// Validating exercice
creditStudent(2, msg.sender);
validateExercice(msg.sender);
}
}