Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (21 sloc) 569 Bytes
pragma solidity ^0.4.21;
import "./Item.sol";
contract EmbargoedItem is Item {
uint until;
function EmbargoedItem(string _fileHash, uint _until) Item(_fileHash) public {
until = _until;
}
function isEmbargoed() public view returns (bool) {
if (until < block.timestamp) {
return false;
}
return true;
}
modifier embargoed() {
require(isEmbargoed() == true);
_;
}
function getFileHash() public view embargoed returns (string) {
return super.getFileHash();
}
}