Co-authored-by: Ernesto García <ernestognw@gmail.com> Co-authored-by: cairo <cairoeth@protonmail.com> Co-authored-by: sudo rm -rf --no-preserve-root / <pcaversaccio@users.noreply.github.com>
32 lines
799 B
Solidity
32 lines
799 B
Solidity
// SPDX-License-Identifier: MIT
|
|
|
|
pragma solidity ^0.8.20;
|
|
|
|
/**
|
|
* @dev Collection of common custom errors used in multiple contracts
|
|
*
|
|
* IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.
|
|
* It is recommended to avoid relying on the error API for critical functionality.
|
|
*/
|
|
library Errors {
|
|
/**
|
|
* @dev The ETH balance of the account is not enough to perform the operation.
|
|
*/
|
|
error InsufficientBalance(uint256 balance, uint256 needed);
|
|
|
|
/**
|
|
* @dev A call to an address target failed. The target may have reverted.
|
|
*/
|
|
error FailedCall();
|
|
|
|
/**
|
|
* @dev The deployment failed.
|
|
*/
|
|
error FailedDeployment();
|
|
|
|
/**
|
|
* @dev A necessary precompile is missing.
|
|
*/
|
|
error MissingPrecompile(address);
|
|
}
|