-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsolidity_code
95 lines (70 loc) · 2.97 KB
/
solidity_code
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
pragma solidity >=0.4.22 <0.6.0;
contract junior_security_dev {
mapping (bytes32 => uint) public markReceived;
string public name;
uint public age;
bool public bachelor_degree;
bool public master_degree;
uint public test_mark_networking;
uint public test_mark_os;
bool public database_knowledge;
bool public english_knowledge;
string[] public previous_exp;
string[] public prog_lang;
bool public comunication_skils;
bool public ccna_security_cert;
constructor(string memory _name, uint _age, bool _bachelor_degree, bool _master_degree, uint _test_mark_networking, uint _test_mark_os,
bool _database_knowledge, bool _english_knowledge, string[] memory _previous_exp, string[] memory _prog_lang, bool _comunication_skils,
bool _ccna_security_cert) internal {
name=_name;
age=_age;
bachelor_degree=_bachelor_degree;
master_degree=_master_degree;
test_mark_networking=_test_mark_networking;
test_mark_os=_test_mark_os;
database_knowledge=_database_knowledge;
english_knowledge=_english_knowledge;
previous_exp=_previous_exp;
prog_lang=_prog_lang;
comunication_skils=_comunication_skils;
ccna_security_cert=_ccna_security_cert;
}
function give_mark_networking(uint mark) public {
require(mark>0 && mark <=10);
test_mark_networking=mark;
}
function give_mark_os(uint mark) public {
require(mark>0 && mark <=10);
test_mark_os=mark;
}
function minimum_requirement() public view returns (int) {
int OK=0;
if(test_mark_networking>=5 && test_mark_networking>=5 && english_knowledge==true && comunication_skils==true )
OK=1;
if(ccna_security_cert==true)
OK=1;
return OK;
}
function mark_recieved(bytes32 _name) public {
markReceived[_name]=(test_mark_networking+test_mark_os)/2;
}
}
contract security_dev is junior_security_dev {
bool public ceh_cert;
uint public test_mark_security;
bool public cloud_knowledge;
bool public social_engineering_knowledge;
bool public kali_linux_knowledge;
function give_mark_security(uint mark) public {
require(mark>0 && mark <=10);
test_mark_security=mark;
}
function minimum_requirement() public view returns (int) {
int OK=0;
if(test_mark_networking>=8 && test_mark_networking>=8 && english_knowledge==true && comunication_skils==true && database_knowledge==true && cloud_knowledge==true)
OK=1;
if(ceh_cert==true)
OK=1;
return OK;
}
}