CommonErrorLibrary
Title: CommonErrorLibrary
Author: Quantillon Labs - Nicolas Bellengé - @chewbaccoin
Common errors used across multiple contracts in Quantillon Protocol
Main characteristics:
- Most frequently used errors across all contracts
- Reduces contract size by importing only needed errors
- Replaces require statements with custom errors for gas efficiency
- Used by 15+ contracts
Note: security-contact: team@quantillon.money
Constants
VERSION
Library version (semver); see deployments/{chainId}/versions.json for provenance.
string internal constant VERSION = "1.0.0"
Errors
InvalidAmount
error InvalidAmount();
ZeroAddress
error ZeroAddress();
InvalidAddress
error InvalidAddress();
InsufficientBalance
error InsufficientBalance();
NotAuthorized
error NotAuthorized();
ArrayLengthMismatch
error ArrayLengthMismatch();
BatchSizeTooLarge
error BatchSizeTooLarge();
EmptyArray
error EmptyArray();
InvalidTime
error InvalidTime();
AboveLimit
error AboveLimit();
WouldExceedLimit
error WouldExceedLimit();
ExcessiveSlippage
error ExcessiveSlippage();
ConfigValueTooHigh
error ConfigValueTooHigh();
ConfigValueTooLow
error ConfigValueTooLow();
NotAdmin
error NotAdmin();
InvalidAdmin
error InvalidAdmin();
InvalidTreasury
error InvalidTreasury();
InvalidToken
error InvalidToken();
InvalidOracle
error InvalidOracle();
InvalidVault
error InvalidVault();
AlreadyInitialized
error AlreadyInitialized();
NotInitialized
error NotInitialized();
NotActive
error NotActive();
BelowThreshold
error BelowThreshold();
NoChangeDetected
error NoChangeDetected();
DivisionByZero
error DivisionByZero();
PercentageTooHigh
error PercentageTooHigh();
InvalidParameter
error InvalidParameter();
InvalidCondition
error InvalidCondition();
ETHTransferFailed
error ETHTransferFailed();
NoETHToRecover
error NoETHToRecover();
CannotRecoverOwnToken
error CannotRecoverOwnToken();
EmergencyModeActive
error EmergencyModeActive();
HoldingPeriodNotMet
error HoldingPeriodNotMet();
InvalidPrice
error InvalidPrice();
InsufficientCollateralization
error InsufficientCollateralization();
TooManyPositions
error TooManyPositions();
PositionNotActive
error PositionNotActive();
LiquidationCooldown
error LiquidationCooldown();
InvalidRatio
error InvalidRatio();
NotGovernance
error NotGovernance();
NotEmergencyRole
error NotEmergencyRole();
NotLiquidatorRole
error NotLiquidatorRole();
NotVaultManager
error NotVaultManager();
NotYieldManager
error NotYieldManager();
InsufficientYield
error InsufficientYield();
InvalidShiftRange
error InvalidShiftRange();
YieldCalculationError
error YieldCalculationError();
VotingPeriodTooShort
error VotingPeriodTooShort();
VotingPeriodTooLong
error VotingPeriodTooLong();
VotingNotStarted
error VotingNotStarted();
VotingEnded
error VotingEnded();
AlreadyVoted
error AlreadyVoted();
NoVotingPower
error NoVotingPower();
VotingNotEnded
error VotingNotEnded();
ProposalAlreadyExecuted
error ProposalAlreadyExecuted();
ProposalCanceled
error ProposalCanceled();
ProposalFailed
error ProposalFailed();
QuorumNotMet
error QuorumNotMet();
ProposalAlreadyCanceled
error ProposalAlreadyCanceled();
ExecutionTimeNotReached
error ExecutionTimeNotReached();
LockTimeTooShort
error LockTimeTooShort();
LockTimeTooLong
error LockTimeTooLong();
RateLimitTooHigh
error RateLimitTooHigh();
InvalidOraclePrice
error InvalidOraclePrice();
YieldClaimFailed
error YieldClaimFailed();
InvalidThreshold
error InvalidThreshold();
NotWhitelisted
error NotWhitelisted();
InsufficientVotingPower
error InsufficientVotingPower();