Errors

Git Source

Author: luoyhang003

Centralized custom errors for all contracts in the protocol.

Each error saves gas compared to revert strings. The @dev comment also includes the corresponding 4-byte selector for debugging and off-chain tooling.

Errors

InvalidArrayLength

Thrown when array lengths do not match or are zero.

Selector: 0x9d89020a

error InvalidArrayLength();

ZeroAddress

Thrown when a provided address is zero.

Selector: 0xd92e233d

error ZeroAddress();

ZeroAmount

Thrown when a provided amount is zero.

Selector: 0x1f2a2005

error ZeroAmount();

IndexOutOfBounds

Thrown when an index is out of bounds.

Selector: 0x4e23d035

error IndexOutOfBounds();

UserNotWhitelisted

Thrown when a user is not whitelisted but tries to interact.

Selector: 0x2ba75b25

error UserNotWhitelisted();

InvalidDecimals

Thrown when a token has invalid decimals (e.g., >18).

Selector: 0xd25598a0

error InvalidDecimals();

UnsupportedAsset

Thrown when an asset is not supported.

Selector: 0x24a01144

error UnsupportedAsset();

AssetAlreadyAdded

Thrown when trying to add an already added asset.

Selector: 0x5ed26801

error AssetAlreadyAdded();

AssetAlreadyRemoved

Thrown when trying to remove an asset that was already removed.

Selector: 0x422afd8f

error AssetAlreadyRemoved();

TransferBlacklisted

Thrown when transfer is attempted by/for a blacklisted address.

Selector: 0x6554e8c5

error TransferBlacklisted();

DepositPaused

Thrown when deposits are paused.

Selector: 0x35edea30

error DepositPaused();

ExceedTokenDepositCap

Thrown when a deposit exceeds per-token deposit cap.

Selector: 0xcc60dc5b

error ExceedTokenDepositCap();

ExceedTotalDepositCap

Thrown when a deposit exceeds global deposit cap.

Selector: 0x5054f250

error ExceedTotalDepositCap();

MintZeroShare

Thrown when minting results in zero shares.

Selector: 0x1d31001e

error MintZeroShare();

DepositZeroAsset

Thrown when attempting to deposit zero assets.

Selector: 0xd69b89cc

error DepositZeroAsset();

InvalidOracle

Thrown when the oracle for an asset is invalid or missing.

Selector: 0x9589a27d

error InvalidOracle();

WithdrawPaused

Thrown when withdrawals are paused.

Selector: 0x8c3e1d33

error WithdrawPaused();

RequestZeroShare

Thrown when attempting to request withdrawal of zero shares.

Selector: 0x02db00e0

error RequestZeroShare();

InvalidReceiptStatus

Thrown when a withdrawal receipt has invalid status for the operation.

Selector: 0x9a3a286f

error InvalidReceiptStatus();

NotRequester

Thrown when a caller is not the original withdrawal requester.

Selector: 0x0e020b04

error NotRequester();

RecipientAlreadyAdded

Thrown when a recipient is already added.

Selector: 0x7f2a2d20

error RecipientAlreadyAdded();

RecipientAlreadyRemoved

Thrown when a recipient is already removed.

Selector: 0x7d78b4a2

error RecipientAlreadyRemoved();

InvalidRouteEnabledStatus

Thrown when attempting to set auto-route to its current state.

Selector: 0x618af2bf

error InvalidRouteEnabledStatus();

NotRouterRecipient

Thrown when a non-registered recipient is used.

Selector: 0xc31e8ebe

error NotRouterRecipient();

RemoveActiveRouter

Thrown when attempting to remove the currently active recipient.

Selector: 0x1d3ba5c9

error RemoveActiveRouter();

AutoRouteEnabled

Thrown when attempting to manual route the asstes when auto route is enabled.

Selector: 0x92d56bf7

error AutoRouteEnabled();

AlreadyBlacklisted

Thrown when trying to blacklist an already blacklisted user.

Selector: 0xf53de75f

error AlreadyBlacklisted();

AlreadyWhitelisted

Thrown when trying to whitelist an already whitelisted user.

Selector: 0xb73e95e1

error AlreadyWhitelisted();

OracleAlreadyAdded

Thrown when an oracle is already registered for an asset.

Selector: 0x652a449e

error OracleAlreadyAdded();

OracleNotExist

Thrown when an oracle does not exist for an asset.

Selector: 0x4dca4f7d

error OracleNotExist();

ExceedMaxDeviation

Thrown when price deviation exceeds maximum allowed.

Selector: 0x8774ad87

error ExceedMaxDeviation();

PriceUpdateTooFrequent

Thrown when price updates are attempted too frequently.

Selector: 0x8f46908a

error PriceUpdateTooFrequent();

PriceValidityExpired

Thrown when a price validity period has expired.

Selector: 0x7c9d063a

error PriceValidityExpired();

ExceedMaxDeviationBps

Thrown when tolerance basis points exceed maximum deviation.

Selector: 0xb8d855e2

error ExceedMaxDeviationBps();

InvalidPriceUpdateInterval

Thrown when price update interval is invalid.

Selector: 0xfff67f52

error InvalidPriceUpdateInterval();

PriceMaxValidityExceeded

Thrown when price validity duration exceeds allowed maximum.

Selector: 0x6eca7e24

error PriceMaxValidityExceeded();

ExceedMaxMintFeeRate

Thrown when mint fee rate exceeds maximum allowed.

Selector: 0x8f59faf8

error ExceedMaxMintFeeRate();

ExceedMaxRedeemFeeRate

Thrown when redeem fee rate exceeds maximum allowed.

Selector: 0x86871089

error ExceedMaxRedeemFeeRate();

InvalidPrice

Thrown when a reported price is invalid.

Selector: 0x00bfc921

error InvalidPrice();

StalePrice

Thrown when a reported price is stale.

Selector: 0x19abf40e

error StalePrice();

IncompleteRound

Thrown when a Chainlink round is incomplete.

Selector: 0x8ad52bdd

error IncompleteRound();