Errors.sol 871 B

1234567891011121314151617181920212223242526272829303132
  1. // SPDX-License-Identifier: MIT
  2. // OpenZeppelin Contracts (last updated v5.1.0-rc.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. library Errors {
  11. /**
  12. * @dev The ETH balance of the account is not enough to perform the operation.
  13. */
  14. error InsufficientBalance(uint256 balance, uint256 needed);
  15. /**
  16. * @dev A call to an address target failed. The target may have reverted.
  17. */
  18. error FailedCall();
  19. /**
  20. * @dev The deployment failed.
  21. */
  22. error FailedDeployment();
  23. /**
  24. * @dev A necessary precompile is missing.
  25. */
  26. error MissingPrecompile(address);
  27. }