2023-03-21 21:46:08 +01:00
|
|
|
pragma solidity >=0.6.12;
|
|
|
|
|
|
|
|
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
|
2023-03-25 13:32:56 +01:00
|
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
2023-03-26 10:58:23 +02:00
|
|
|
// File-version: 3
|
2023-03-21 21:46:08 +01:00
|
|
|
|
2023-03-25 13:32:56 +01:00
|
|
|
interface IExpire {
|
2023-03-26 10:58:23 +02:00
|
|
|
// Contract has expired.
|
2023-03-21 21:46:08 +01:00
|
|
|
event Expired(uint256 _timestamp);
|
|
|
|
|
2023-03-26 10:58:23 +02:00
|
|
|
// Expiry time has changed.
|
|
|
|
event ExpiryChange(uint256 indexed _oldTimestamp, uint256 _newTimestamp);
|
|
|
|
|
2023-03-25 12:14:46 +01:00
|
|
|
// The current expiration timestamp.
|
2023-03-21 21:46:08 +01:00
|
|
|
function expires() external returns (uint256);
|
2023-03-26 10:58:23 +02:00
|
|
|
|
|
|
|
// Check expiry and apply expiration if expired.
|
|
|
|
// Return values must be:
|
|
|
|
// 0: not yet expired.
|
|
|
|
// 1: already expired.
|
|
|
|
// >1: expiry executed.
|
|
|
|
function applyExpiry() external returns(uint8);
|
2023-03-21 21:46:08 +01:00
|
|
|
}
|