forked from VithikShah/CoronaGo-API
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmedicines.sol
47 lines (27 loc) · 834 Bytes
/
medicines.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
pragma solidity ^0.4.21;
contract Medicine {
mapping(address => string) public medicines;
function addmedicines (string memory medicine) public {
medicines[msg.sender] = medicine;
}
function getmedicines () public {
return medicines[msg.sender]
}
}
pragma solidity ^0.4.21;
contract Medicine {
mapping(address => string) public medicines;
mapping(address => uint) public status;
function addmedicines (string memory medicine) public {
medicines[msg.sender] = medicine;
}
function updatestatus (uint stat) public {
medicines[msg.sender] = stat;
}
function getmedicines () public {
return medicines[msg.sender]
}
function getstatus () public {
return status[msg.sender]
}
}