ValidCalls Result
Description
The ValidCallsResult
enumeration represents the outcome of the validateCalls
function within the AtlasVerification contract. It categorizes the results into valid operations and various error states, facilitating precise error handling and ensuring that only legitimate operations proceed within the protocol.
enum ValidCallsResult {
Valid,
// Results below this line will cause metacall to revert
UserFromInvalid,
UserSignatureInvalid,
DAppSignatureInvalid,
UserNonceInvalid,
InvalidDAppNonce,
UnknownAuctioneerNotAllowed,
InvalidAuctioneer,
InvalidBundler,
// Results above this line will cause metacall to revert
InvertBidValueCannotBeExPostBids, // Threshold value (included in the revert range)
// Results below this line will cause metacall to gracefully return
GasPriceHigherThanMax,
TxValueLowerThanCallValue,
TooManySolverOps,
UserDeadlineReached,
DAppDeadlineReached,
ExecutionEnvEmpty,
NoSolverOp,
InvalidSequence,
OpHashMismatch,
DeadlineMismatch,
InvalidControl,
InvalidSolverGasLimit,
InvalidCallConfig,
CallConfigMismatch,
DAppToInvalid,
UserToInvalid,
ControlMismatch,
InvalidCallChainHash,
DAppNotEnabled,
BothUserAndDAppNoncesCannotBeSequential
}
Enumeration Values
Value | Category | Description | Metacall Behavior |
---|---|---|---|
Valid | Success | The operation passed all validation checks and is considered valid. | Proceeds with execution |
UserFromInvalid | Reverting Error | The from address in the user operation is invalid or unauthorized. | Reverts |
UserSignatureInvalid | Reverting Error | The signature provided in the user operation is invalid or does not match the expected signer. | Reverts |
DAppSignatureInvalid | Reverting Error | The signature provided in the dApp operation is invalid or does not match the expected signer. | Reverts |
UserNonceInvalid | Reverting Error | The nonce provided in the user operation is invalid, possibly reused or out of sequence. | Reverts |
InvalidDAppNonce | Reverting Error | The nonce provided in the dApp operation is invalid, possibly reused or out of sequence. | Reverts |
UnknownAuctioneerNotAllowed | Reverting Error | An unknown auctioneer attempted to participate, but this is not permitted by the dApp configuration. | Reverts |
InvalidAuctioneer | Reverting Error | The auctioneer specified is invalid or unauthorized. | Reverts |
InvalidBundler | Reverting Error | The bundler address is invalid or unauthorized to perform the operation. | Reverts |
InvertBidValueCannotBeExPostBids | Threshold Error | Configuration conflict where both invertBidValue and exPostBids are enabled, making bid determination ambiguous. | Reverts |
GasPriceHigherThanMax | Graceful Return Error | The gas price of the transaction exceeds the maximum fee per gas specified by the user. | Returns gracefully |
TxValueLowerThanCallValue | Graceful Return Error | The ETH value sent with the transaction is lower than the value required by the call. | Returns gracefully |
TooManySolverOps | Graceful Return Error | The number of solver operations exceeds the maximum allowed limit. | Returns gracefully |
UserDeadlineReached | Graceful Return Error | The operation has exceeded the user's specified deadline. | Returns gracefully |
DAppDeadlineReached | Graceful Return Error | The operation has exceeded the dApp's specified deadline. | Returns gracefully |
ExecutionEnvEmpty | Graceful Return Error | The execution environment address is empty or invalid. | Returns gracefully |
NoSolverOp | Graceful Return Error | No solver operations were provided when at least one was required. | Returns gracefully |
InvalidSequence | Graceful Return Error | The sequence of operations is invalid or out of order. | Returns gracefully |
OpHashMismatch | Graceful Return Error | The hash of the user operation does not match the expected hash. | Returns gracefully |
DeadlineMismatch | Graceful Return Error | The specified deadline does not match the expected deadline. | Returns gracefully |
InvalidControl | Graceful Return Error | The control address does not match the expected dApp control contract. | Returns gracefully |
InvalidSolverGasLimit | Graceful Return Error | The gas limit specified for the solver operation is invalid or exceeds allowed limits. | Returns gracefully |
InvalidCallConfig | Graceful Return Error | The call configuration is invalid or contains conflicting settings. | Returns gracefully |
CallConfigMismatch | Graceful Return Error | The call configuration does not match the expected configuration in the dApp or user operation. | Returns gracefully |
DAppToInvalid | Graceful Return Error | The to address in the dApp operation is invalid or does not point to the Atlas contract. | Returns gracefully |
UserToInvalid | Graceful Return Error | The to address in the user operation is invalid or does not point to the Atlas contract. | Returns gracefully |
ControlMismatch | Graceful Return Error | The control addresses between operations do not match as expected. | Returns gracefully |
InvalidCallChainHash | Graceful Return Error | The call chain hash does not match the expected hash calculated during validation. | Returns gracefully |
DAppNotEnabled | Graceful Return Error | The dApp is not enabled or has been disabled, preventing the operation from proceeding. | Returns gracefully |
BothUserAndDAppNoncesCannotBeSequential | Graceful Return Error | Both user and dApp nonces are set to be sequential, which is not allowed. | Returns gracefully |
Usage Notes
- Error Handling: The ValidCallsResult enum allows for granular error handling, enabling the protocol to respond appropriately to various failure scenarios.
- Security Enforcement: By categorizing errors, the protocol ensures that only valid operations are executed, maintaining the integrity and security of the system.
- Graceful Failures: Some errors allow the protocol to handle failures gracefully without reverting, enabling features like nonce tracking even in failure scenarios.
- Metacall Behavior:
- Success: The metacall proceeds with execution when the result is Valid.
- Reverting Errors: Cause the metacall to revert, aborting the operation and preventing any state changes.
- Threshold Error: The InvertBidValueCannotBeExPostBids error is a special case that also causes the metacall to revert.
- Graceful Return Errors: Allow the metacall to return without reverting, enabling state changes such as nonce tracking while signaling issues.