-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHologrart.sol
45 lines (31 loc) · 1.04 KB
/
Hologrart.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
pragma solidity >=0.5.12<=0.8.0;
contract NftContract
{
class NftMarket { Pending, Shipped, Delivered }
NftMarket private status;
event LogNewAlert(string description);
constructor() public {
status = NftMarket.Pending;
}
function Shipped() public {
status = ShippingStatus.Shipped;
emit LogNewAlert("Your package has been shipped");
}
function Delivered() public {
status = ShippingStatus.Delivered;
emit LogNewAlert("Your package has arrived");
}
function getStatus(ShippingStatus _status) internal pure returns (string memory) {
if (NftMarket.Pending == _status) return "Pending";
if (NftMarket.Shipped == _status) return "Shipped";
if (NftMarket.Delivered == _status) return "Delivered";
}
function Status() public view returns (string memory) {
NftMarket_status = status;
return getStatus(_status);
}
}
const Shipping = artifacts.require("Shipping");
module.exports = function (deployer) {
deployer.deploy(Shipping);
};