-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sol
More file actions
54 lines (51 loc) · 1.07 KB
/
test.sol
File metadata and controls
54 lines (51 loc) · 1.07 KB
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
//adress 0x2f60989b156B60Ad388377D636a5b4D8E426476d
pragma solidity ^0.5.11;
contract Sample_New {
uint a;
uint b;
uint c;
uint d;
uint check = 0;
function get() public returns (uint) {
a = a+1;
return a;
}
function get2() public returns (uint) {
b = b+1;
return b;
}
function get3() public returns (uint) {
c = c+1;
return c;
}
function get4() public returns (uint) {
d = d+1;
return d;
}
function clear() public {
check++;
clear_2();
}
function clear_2()private{
if(check == 2)
{
a = 0;
b = 0;
c = 0;
d = 0;
check = 0;
}
}
function result_1() public view returns(uint){
return a;
}
function result_2() public view returns(uint){
return b;
}
function result_3() public view returns(uint){
return c;
}
function result_4() public view returns(uint){
return d;
}
}