Errors.sol 896 B

12345678910111213141516171819202122232425262728293031323334
  1. // SPDX-License-Identifier: MIT
  2. // OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)
  3. pragma solidity ^0.8.20;
  4. /**
  5. * @dev Collection of common custom errors used in multiple contracts
  6. *
  7. * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.
  8. * It is recommended to avoid relying on the error API for critical functionality.
  9. *
  10. * _Available since v5.1._
  11. */
  12. library Errors {
  13. /**
  14. * @dev The ETH balance of the account is not enough to perform the operation.
  15. */
  16. error InsufficientBalance(uint256 balance, uint256 needed);
  17. /**
  18. * @dev A call to an address target failed. The target may have reverted.
  19. */
  20. error FailedCall();
  21. /**
  22. * @dev The deployment failed.
  23. */
  24. error FailedDeployment();
  25. /**
  26. * @dev A necessary precompile is missing.
  27. */
  28. error MissingPrecompile(address);
  29. }