Quantillon Protocol

Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CommonErrorLibrary

Git Source

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

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();

ConfigInvalid

error ConfigInvalid();

NotAdmin

error NotAdmin();

InvalidAdmin

error InvalidAdmin();

InvalidTreasury

error InvalidTreasury();

InvalidToken

error InvalidToken();

InvalidOracle

error InvalidOracle();

InvalidVault

error InvalidVault();

AlreadyInitialized

error AlreadyInitialized();

NotInitialized

error NotInitialized();

AlreadyActive

error AlreadyActive();

NotActive

error NotActive();

AlreadyPaused

error AlreadyPaused();

NotPaused

error NotPaused();

BelowThreshold

error BelowThreshold();

NoChangeDetected

error NoChangeDetected();

DivisionByZero

error DivisionByZero();

MultiplicationOverflow

error MultiplicationOverflow();

PercentageTooHigh

error PercentageTooHigh();

InvalidParameter

error InvalidParameter();

InvalidCondition

error InvalidCondition();

ETHTransferFailed

error ETHTransferFailed();

TokenTransferFailed

error TokenTransferFailed();

CannotSendToZero

error CannotSendToZero();

NoETHToRecover

error NoETHToRecover();

NoTokensToRecover

error NoTokensToRecover();

CannotRecoverOwnToken

error CannotRecoverOwnToken();

EmergencyModeActive

error EmergencyModeActive();

HoldingPeriodNotMet

error HoldingPeriodNotMet();

InvalidPrice

error InvalidPrice();

InsufficientCollateralization

error InsufficientCollateralization();

TooManyPositions

error TooManyPositions();

PositionNotActive

error PositionNotActive();

LiquidationCooldown

error LiquidationCooldown();

InvalidYieldShift

error InvalidYieldShift();

AdjustmentSpeedTooHigh

error AdjustmentSpeedTooHigh();

TargetRatioTooHigh

error TargetRatioTooHigh();

InvalidRatio

error InvalidRatio();

NotGovernance

error NotGovernance();

NotEmergency

error NotEmergency();

NotEmergencyRole

error NotEmergencyRole();

NotLiquidator

error NotLiquidator();

NotLiquidatorRole

error NotLiquidatorRole();

NotHedger

error NotHedger();

NotVaultManager

error NotVaultManager();

NotYieldManager

error NotYieldManager();

InsufficientYield

error InsufficientYield();

InvalidShiftRange

error InvalidShiftRange();