PythErrors.sol 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 verifier address to set in SetVerifierAddress governance is invalid.
  51. // Signature: 0xab8af376
  52. error InvalidVerifierAddressToSet();
  53. }