Order
struct Order {
    uint256 id;
    uint256 amountInBaseLots;
    uint256 priceInTicks;
    uint256 prevOrderId;
    uint256 nextOrderId;
    uint256 cancelTimestamp;
    Side side;
    address owner;
}

isExpired

isExpired
function isExpired(
    Order memory self
) internal view returns (bool)

Determines whether an order is expired by checking if its cancel timestamp is set and is less than the current block timestamp.

isNull

isNull
function isNull(
    Order memory self
) internal pure returns (bool)

Checks if an order is null by verifying if its ID is equal to the predefined NULL_ORDER_ID.

assertExists

assertExists
function assertExists(
    Order memory self
) internal pure

Asserts that an order exists by checking if it is not null. If the order is null, it reverts with an OrderNotFound error.