PythErrors.sol 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // SPDX-License-Identifier: Apache 2
  2. pragma solidity ^0.8.0;
  3. library PythErrors {
  4. // Function arguments are invalid (e.g., the arguments lengths mismatch)
  5. // Signature: 0xa9cb9e0d
  6. error InvalidArgument();
  7. // Update data is coming from an invalid data source.
  8. // Signature: 0xe60dce71
  9. error InvalidUpdateDataSource();
  10. // Update data is invalid (e.g., deserialization error)
  11. // Signature: 0xe69ffece
  12. error InvalidUpdateData();
  13. // Insufficient fee is paid to the method.
  14. // Signature: 0x025dbdd4
  15. error InsufficientFee();
  16. // There is no fresh update, whereas expected fresh updates.
  17. // Signature: 0xde2c57fa
  18. error NoFreshUpdate();
  19. // There is no price feed found within the given range or it does not exists.
  20. // Signature: 0x45805f5d
  21. error PriceFeedNotFoundWithinRange();
  22. // Price feed not found or it is not pushed on-chain yet.
  23. // Signature: 0x14aebe68
  24. error PriceFeedNotFound();
  25. // Requested price is stale.
  26. // Signature: 0x19abf40e
  27. error StalePrice();
  28. // Given message is not a valid Wormhole VAA.
  29. // Signature: 0x2acbe915
  30. error InvalidWormholeVaa();
  31. // Governance message is invalid (e.g., deserialization error).
  32. // Signature: 0x97363b35
  33. error InvalidGovernanceMessage();
  34. // Governance message is not for this contract.
  35. // Signature: 0x63daeb77
  36. error InvalidGovernanceTarget();
  37. // Governance message is coming from an invalid data source.
  38. // Signature: 0x360f2d87
  39. error InvalidGovernanceDataSource();
  40. // Governance message is old.
  41. // Signature: 0x88d1b847
  42. error OldGovernanceMessage();
  43. // The wormhole address to set in SetWormholeAddress governance is invalid.
  44. // Signature: 0x13d3ed82
  45. error InvalidWormholeAddressToSet();
  46. // The twap update data is invalid.
  47. error InvalidTwapUpdateData();
  48. // The twap update data set is invalid.
  49. error InvalidTwapUpdateDataSet();
  50. // The Input Price is negative.
  51. error NegativeInputPrice();
  52. // The Input Exponent is invalid.
  53. error InvalidInputExpo();
  54. // The combined price is greater than int64.max.
  55. error CombinedPriceOverflow();
  56. // The exponent is greater than 77 or less than -77.
  57. error ExponentOverflow();
  58. }