Module 1: Expiry window
Every order carries an expiry. The start time is optional, for an order that should only open later, such as after a release or during the hours you watch your screen.
Status
Ready
Signed
Start + expiry
Code · OrbuSettlementDesk.sol
function _checkLive(Order calldata o, bytes32 h) private view {
if (cancelled[h]) revert OrderIsCancelled();
if (o.nonce < minNonce[o.maker]) revert NonceTooLow();
if (block.timestamp < o.policy.startsAt) revert NotOpenYet();
if (block.timestamp >= o.expiry) revert Expired();
}Tests that cover it
test_windowNotOpenYet test_expiryIsExclusive
What it does
No fill before the start time or after the expiry the maker signs.
On chain
- Desk
- Not deployed yet
- Enforced
- —
- Roster
- Opens after the token launches
- Reads
- block time
