Atlas Errors
The AtlasErrors
contract centralizes all custom error definitions used across the Atlas Protocol. Utilizing Solidity's custom error feature (introduced in Solidity 0.8.4), it provides efficient and descriptive error handling mechanisms that reduce gas costs compared to traditional require
statements with error strings.
Simulator Errors
Error Name | Parameters | Description |
---|---|---|
SimulatorBalanceTooLow | None | Triggered when the simulator's balance is insufficient. |
Unauthorized | None | Triggered when an unauthorized action is attempted. |
Unreachable | None | Indicates that an unreachable code path was executed. |
NoAuctionWinner | None | Triggered when an auction concludes without a winner. |
InvalidEntryFunction | None | Indicates the use of an invalid entry function. |
SimulationPassed | None | Indicates that a simulation has successfully passed. |
User Simulation Errors
Error Name | Parameters | Description |
---|---|---|
UserSimulationFailed | None | Indicates that a user simulation has failed. |
UserSimulationSucceeded | None | Indicates that a user simulation has succeeded. |
UserUnexpectedSuccess | None | Triggered when a user operation unexpectedly succeeds. |
UserNotFulfilled | None | Indicates that a user operation was not fulfilled as expected. |
Bid and Solver Errors
Error Name | Parameters | Description |
---|---|---|
BidFindSuccessful | uint256 bidAmount | Emitted when a bid is successfully found with the specified amount. |
UnexpectedNonRevert | None | Indicates that an unexpected non-revert occurred during execution. |
InvalidSolver | None | Triggered when an invalid solver attempts an operation. |
BidNotPaid | None | Indicates that the solver's bid was not paid as required. |
InvertedBidExceedsCeiling | None | Triggered when an inverted bid exceeds the defined ceiling limit. |
BalanceNotReconciled | None | Indicates that the solver's balance does not reconcile with expectations. |
SolverOpReverted | None | Triggered when a solver operation reverts during execution. |
AlteredControl | None | Indicates that control parameters have been altered unexpectedly. |
InvalidEntry | None | Triggered when an invalid entry is detected in operations. |
CallbackNotCalled | None | Indicates that a required callback was not executed as expected. |
PreSolverFailed | None | Triggered when pre-solver operations fail. |
PostSolverFailed | None | Indicates that post-solver operations failed during execution. |
InsufficientEscrow | None | Triggered when escrow funds are insufficient for the intended operation. |
Escrow Errors
Error Name | Parameters | Description |
---|---|---|
UncoveredResult | None | Indicates that a result was uncovered unexpectedly. |
InvalidEscrowDuration | None | Triggered when an invalid escrow duration is specified. |
InsufficientUnbondedBalance | uint256 balance, uint256 requested | Emitted when the unbonded balance is insufficient for the requested amount. |
InsufficientBondedBalance | uint256 balance, uint256 requested | Indicates that the bonded balance is insufficient for the requested amount. |
PermitDeadlineExpired | None | Triggered when a permit's deadline has expired. |
InvalidSigner | None | Indicates that the signer provided is invalid. |
EscrowLockActive | None | Emitted when an escrow lock is active, preventing certain operations. |
InsufficientWithdrawableBalance | uint256 balance, uint256 requested | Indicates insufficient balance available for withdrawal. |
InsufficientAvailableBalance | uint256 balance, uint256 requested | Emitted when the available balance is insufficient for the requested action. |
InsufficientSurchargeBalance | uint256 balance, uint256 requested | Indicates insufficient surcharge balance for the requested operation. |
InsufficientBalanceForDeduction | uint256 balance, uint256 requested | Emitted when there isn't enough balance to perform a deduction. |
ValueTooLarge | None | Indicates that a provided value exceeds protocol-defined limits. |
BidTooHigh | uint256 indexInSolverOps, uint256 bidAmount | Triggered when a bid exceeds acceptable limits within solver operations. |
DAppIntegration Errors
Error Name | Parameters | Description |
---|---|---|
OnlyGovernance | None | Indicates that only governance entities can perform the action. |
SignatoryActive | None | Triggered when attempting to add a signatory that's already active. |
InvalidCaller | None | Emitted when an unauthorized caller attempts an action. |
InvalidDAppControl | None | Indicates an invalid DAppControl address. |
DAppNotEnabled | None | Triggered when attempting to interact with a disabled dApp. |
AtlasLockActive | None | Indicates that the Atlas lock is active, preventing certain operations. |
InvalidSignatory | None | Emitted when an invalid signatory is provided. |
Permit69 Errors
Error Name | Parameters | Description |
---|---|---|
InvalidEnvironment | None | Indicates an invalid environment parameter. |
EnvironmentMismatch | None | Triggered when there is a mismatch in environment settings. |
InvalidLockState | None | Emitted when the lock state is invalid or inconsistent. |
GasAccounting Errors
Error Name | Parameters | Description |
---|---|---|
LedgerFinalized | uint8 id | Indicates that a ledger has been finalized and cannot be modified further. |
LedgerBalancing | uint8 id | Triggered during ledger balancing operations. |
MissingFunds | uint8 id | Emitted when expected funds are missing from the ledger. |
InsufficientFunds | None | Indicates that there are insufficient funds to perform the intended operation. |
NoUnfilledRequests | None | Triggered when there are no unfilled requests in the ledger. |
SolverMustReconcile | None | Indicates that a solver must reconcile before proceeding. |
DoubleReconcile | None | Triggered when a solver attempts to reconcile more than once. |
InvalidExecutionEnvironment | address correctEnvironment | Emitted when the execution environment does not match the expected address. |
InvalidSolverFrom | address solverFrom | Indicates that the solver's from address is invalid. |
InsufficientSolverBalance | uint256 actual, uint256 msgValue, uint256 holds, uint256 needed | Emitted when a solver's balance is insufficient for the required operation. |
InsufficientAtlETHBalance | uint256 actual, uint256 needed | Indicates that the AtlETH balance is insufficient for the intended action. |
InsufficientTotalBalance | uint256 shortfall | Emitted when the total balance is insufficient to cover the operation. |
UnbalancedAccounting | None | Indicates discrepancies in accounting, leading to unbalanced records. |
SafetyLocks Errors
Error Name | Parameters | Description |
---|---|---|
NotInitialized | None | Emitted when an operation is attempted on an uninitialized contract. |
AlreadyInitialized | None | Indicates that an initialization has already been performed. |
AtlasVerification Errors
Error Name | Parameters | Description |
---|---|---|
NoUnusedNonceInBitmap | None | Triggered when there are no unused nonces available in the bitmap. |
DAppControl Errors
Error Name | Parameters | Description |
---|---|---|
BothUserAndDAppNoncesCannotBeSequential | None | Indicates a configuration conflict where both user and dApp nonces are set to sequential. |
BothPreOpsAndUserReturnDataCannotBeTracked | None | Triggered when both pre-operations and user return data tracking are enabled simultaneously. |
InvalidControl | None | Emitted when an invalid control parameter is provided. |
NoDelegatecall | None | Indicates that a delegatecall is required but not performed. |
MustBeDelegatecalled | None | Emitted when a function must be called via delegatecall but isn't. |
OnlyAtlas | None | Indicates that only the Atlas contract can perform the action. |
WrongPhase | None | Triggered when an operation is attempted in an incorrect execution phase. |
WrongDepth | None | Emitted when the call depth exceeds expected limits. |
InsufficientLocalFunds | None | Indicates insufficient local funds for the operation. |
NotImplemented | None | Emitted when attempting to use a function that is not implemented. |
InvertBidValueCannotBeExPostBids | None | Indicates a configuration conflict between bid inversion and ex-post bidding. |
Usage Notes
- Centralized Error Handling: By defining all errors within
AtlasErrors
, the protocol ensures consistent and gas-efficient error handling across all contracts. - Descriptive Errors: Custom errors provide clear and specific feedback, facilitating easier debugging and maintenance.
- Gas Efficiency: Custom errors consume less gas compared to traditional
require
statements with error strings, optimizing contract performance.