SchedulerConstants.sol 1.5 KB

123456789101112131415161718192021222324252627282930
  1. // SPDX-License-Identifier: Apache 2
  2. pragma solidity ^0.8.0;
  3. // This contract holds the Scheduler structs
  4. contract SchedulerConstants {
  5. /// Maximum number of price feeds per subscription
  6. uint8 public constant MAX_PRICE_IDS_PER_SUBSCRIPTION = 255;
  7. /// Maximum number of addresses in the reader whitelist
  8. uint8 public constant MAX_READER_WHITELIST_SIZE = 255;
  9. /// Maximum deposit limit for permanent subscriptions in wei
  10. uint256 public constant MAX_DEPOSIT_LIMIT = 100 ether;
  11. /// Maximum time in the past (relative to current block timestamp)
  12. /// for which a price update timestamp is considered valid
  13. /// when validating the update conditions.
  14. /// @dev Note: We don't use this when parsing update data from the Pyth contract
  15. /// because don't want to reject update data if it contains a price from a market
  16. /// that closed a few days ago, since it will contain a timestamp from the last
  17. /// trading period. We enforce this value ourselves against the maximum
  18. /// timestamp in the provided update data.
  19. uint64 public constant PAST_TIMESTAMP_MAX_VALIDITY_PERIOD = 1 hours;
  20. /// Maximum time in the future (relative to current block timestamp)
  21. /// for which a price update timestamp is considered valid
  22. uint64 public constant FUTURE_TIMESTAMP_MAX_VALIDITY_PERIOD = 10 seconds;
  23. /// Fixed gas overhead component used in keeper fee calculation.
  24. /// This is a rough estimate of the tx overhead for a keeper to call updatePriceFeeds.
  25. uint256 public constant GAS_OVERHEAD = 30000;
  26. }