Skip to main content
HolidayCalendar is an append-only list of market holidays keyed by UTC day index (timestamp divided by 86400). EquityOracle reads it to return DARK on holidays and their offsets. It can only force a haircut or a revert, never a live price. Days must be added at least one day in advance and cannot be removed. HolidayCalendar lets you:
  • Check whether a UTC day is a listed holiday
  • Let the owner append future holidays
  • Read the lockout constant and the owner
Addresses per network. Every address is also on Addresses. The source code is src/oracles/HolidayCalendar.sol on GitHub. The ABI is /abis/HolidayCalendar.json.

Write methods

addHolidays

Appends UTC day indices to the holiday list. Owner only. Each day must start after the current time (HolidayNotFuture), at least LOCKOUT ahead (HolidayLockout), and not already be listed (HolidayAlreadySet).
Owner only. Reverts with NotOwner otherwise. Holidays cannot be removed once added.
Input parameters

Events

HolidayAdded

Fires once for every day added.

Errors

NotOwner

The caller is not the owner, or the constructor owner was zero.

HolidayNotFuture

The day starts at or before the current block time.

HolidayLockout

The day starts less than 1 day from now.

HolidayAlreadySet

The day is already listed.