Skip to main content

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

ValueCategoryDescriptionMetacall Behavior
ValidSuccessThe operation passed all validation checks and is considered valid.Proceeds with execution
UserFromInvalidReverting ErrorThe from address in the user operation is invalid or unauthorized.Reverts
UserSignatureInvalidReverting ErrorThe signature provided in the user operation is invalid or does not match the expected signer.Reverts
DAppSignatureInvalidReverting ErrorThe signature provided in the dApp operation is invalid or does not match the expected signer.Reverts
UserNonceInvalidReverting ErrorThe nonce provided in the user operation is invalid, possibly reused or out of sequence.Reverts
InvalidDAppNonceReverting ErrorThe nonce provided in the dApp operation is invalid, possibly reused or out of sequence.Reverts
UnknownAuctioneerNotAllowedReverting ErrorAn unknown auctioneer attempted to participate, but this is not permitted by the dApp configuration.Reverts
InvalidAuctioneerReverting ErrorThe auctioneer specified is invalid or unauthorized.Reverts
InvalidBundlerReverting ErrorThe bundler address is invalid or unauthorized to perform the operation.Reverts
InvertBidValueCannotBeExPostBidsThreshold ErrorConfiguration conflict where both invertBidValue and exPostBids are enabled, making bid determination ambiguous.Reverts
GasPriceHigherThanMaxGraceful Return ErrorThe gas price of the transaction exceeds the maximum fee per gas specified by the user.Returns gracefully
TxValueLowerThanCallValueGraceful Return ErrorThe ETH value sent with the transaction is lower than the value required by the call.Returns gracefully
TooManySolverOpsGraceful Return ErrorThe number of solver operations exceeds the maximum allowed limit.Returns gracefully
UserDeadlineReachedGraceful Return ErrorThe operation has exceeded the user's specified deadline.Returns gracefully
DAppDeadlineReachedGraceful Return ErrorThe operation has exceeded the dApp's specified deadline.Returns gracefully
ExecutionEnvEmptyGraceful Return ErrorThe execution environment address is empty or invalid.Returns gracefully
NoSolverOpGraceful Return ErrorNo solver operations were provided when at least one was required.Returns gracefully
InvalidSequenceGraceful Return ErrorThe sequence of operations is invalid or out of order.Returns gracefully
OpHashMismatchGraceful Return ErrorThe hash of the user operation does not match the expected hash.Returns gracefully
DeadlineMismatchGraceful Return ErrorThe specified deadline does not match the expected deadline.Returns gracefully
InvalidControlGraceful Return ErrorThe control address does not match the expected dApp control contract.Returns gracefully
InvalidSolverGasLimitGraceful Return ErrorThe gas limit specified for the solver operation is invalid or exceeds allowed limits.Returns gracefully
InvalidCallConfigGraceful Return ErrorThe call configuration is invalid or contains conflicting settings.Returns gracefully
CallConfigMismatchGraceful Return ErrorThe call configuration does not match the expected configuration in the dApp or user operation.Returns gracefully
DAppToInvalidGraceful Return ErrorThe to address in the dApp operation is invalid or does not point to the Atlas contract.Returns gracefully
UserToInvalidGraceful Return ErrorThe to address in the user operation is invalid or does not point to the Atlas contract.Returns gracefully
ControlMismatchGraceful Return ErrorThe control addresses between operations do not match as expected.Returns gracefully
InvalidCallChainHashGraceful Return ErrorThe call chain hash does not match the expected hash calculated during validation.Returns gracefully
DAppNotEnabledGraceful Return ErrorThe dApp is not enabled or has been disabled, preventing the operation from proceeding.Returns gracefully
BothUserAndDAppNoncesCannotBeSequentialGraceful Return ErrorBoth 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.