ErrorsLib library defines all custom errors used throughout the Morpho Vault V2 system for gas-efficient error handling.
Libraries
ErrorsLib
Library of custom error definitions for Morpho Vault V2
The
Thrown when attempting to use a function that has been abdicated (permanently disabled).
Thrown when an operation would exceed the absolute cap limit.
Thrown when attempting to decrease an absolute cap to a value that is not lower than the current cap.
Thrown when attempting to increase an absolute cap to a value that is not higher than the current cap.
Thrown when an ERC20 approve call returns false.
Thrown when an ERC20 approve call reverts.
Thrown when attempting to execute a function that requires timelock submission first.
Thrown when a recipient is not allowed to receive shares based on the receive shares gate.
Thrown when a recipient is not allowed to receive assets based on the receive assets gate.
Thrown when a sender is not allowed to send shares based on the send shares gate.
Thrown when a sender is not allowed to send assets based on the send assets gate.
Thrown when a general cap limit is exceeded.
Thrown when a type cast would result in overflow.
Thrown when attempting to submit timelocked data that is already pending.
Thrown when attempting to execute data that has not been submitted to the timelock.
Thrown when the fee invariant is violated.
Thrown when a fee exceeds the maximum allowed value.
Thrown when a signature verification fails due to an invalid signer.
Thrown when attempting to set a maximum rate that exceeds the allowed limit.
Thrown when an expected contract address has no code deployed.
Thrown when an address is not a registered adapter.
Thrown when an adapter is not found in the adapter registry.
Thrown when a penalty exceeds the maximum allowed value.
Thrown when a permit signature has expired.
Thrown when attempting to set a relative cap above 100% (1e18).
Thrown when an operation would exceed the relative cap limit.
Thrown when attempting to decrease a relative cap to a value that is not lower than the current cap.
Thrown when attempting to increase a relative cap to a value that is not higher than the current cap.
Thrown when attempting to decrease a timelock to a value that is not lower than the current duration.
Thrown when attempting to execute timelocked data before the timelock period has expired.
Thrown when attempting to increase a timelock to a value that is not higher than the current duration.
Thrown when an ERC20 transferFrom call returns false.
Thrown when an ERC20 transferFrom call reverts.
Thrown when an ERC20 transfer call returns false.
Thrown when an ERC20 transfer call reverts.
Thrown when a caller does not have the required authorization.
Thrown when attempting to set an absolute cap to zero.
Thrown when a zero address is provided where a valid address is required.
Thrown when attempting an allocation with zero amount.