-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.sol
59 lines (42 loc) · 1.16 KB
/
test.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
pragma solidity ^0.6.6;
contract Test {
uint256 myNumber;
bool isActive;
bytes32 password;
string name;
string[] names;
mapping(address => Person) ids;
address id;
}
struct Person {
address id;
string name;
uint24 age;
Home home;
}
struct Home {
string home;
}
enum Day {Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday}
//event
// constructor() public {
// myNumber = 16;
// isActive = true;
// name = 'Sahaj';
// }
//function name(type parameter, type parameter,...) {public | external | internal | private} {pure | constant | view | payable}
// function getNumber() external view returns (uint256) {
// return myNumber;
// }
//RESTRICTION PRACTISE
// modifier above10(uint256 _newNumber) {
// require(_newNumber <= 10, "The integer is abover 10, Please Try Again!")
//require(<condition>, <"Error Message">)
// _;
// }
// function setNumber(uint256 _newNumber) external payable above10(_newNumber) {
// //msg.value ==> returns the value of the info from the sender
// //msg.sender ==> returns the info of the person who sends from the frontend application
// //now ==> returns the time in seconds
// myNumber = _newNumber;
// }