ConfigTypes
The CallConfig
struct and CallConfigIndex
enum play pivotal roles in configuring and managing the behavior of metacall operations within the Atlas Protocol. They provide granular control over nonce handling, execution phases, signature verifications, and other operational parameters to ensure secure and efficient transaction processing.
Check out our Configuration Guide for a comprehensive guide on configuring your DApp.
CallConfig Struct
struct CallConfig {
bool userNoncesSequential;
bool dappNoncesSequential;
bool requirePreOps;
bool trackPreOpsReturnData;
bool trackUserReturnData;
bool delegateUser;
bool requirePreSolver;
bool requirePostSolver;
bool requirePostOpsCall;
bool zeroSolvers;
bool reuseUserOp;
bool userAuctioneer;
bool solverAuctioneer;
bool unknownAuctioneer;
bool verifyCallChainHash;
bool forwardReturnData;
bool requireFulfillment;
bool trustedOpHash;
bool invertBidValue;
bool exPostBids;
bool allowAllocateValueFailure;
}
Description
The CallConfig
struct encapsulates a set of boolean flags that dictate the behavior and requirements of metacall operations. Each field within the struct enables or disables specific features, controls the flow of execution phases, and enforces security measures to maintain the integrity of transactions.
Fields
Name | Type | Description |
---|---|---|
userNoncesSequential | bool | If true, the userOp nonce must be the next sequential nonce for the user's address in Atlas's nonce system. If false, nonces can be non-sequential as long as they are unique. |
dappNoncesSequential | bool | If true, the dappOp nonce must be the next sequential nonce for the dApp signer's address. If false, the nonce is not checked as it's tied to the userOp nonce via callChainHash. |
requirePreOps | bool | Executes the preOps hook before the userOp execution if true. If false, the preOps hook is skipped. |
trackPreOpsReturnData | bool | If true, the return data from the preOps hook is passed to the next call phase. If false, it's discarded. |
trackUserReturnData | bool | If true, the return data from the userOp call is passed to the next call phase. If false, it's discarded. |
delegateUser | bool | If true, the userOp call is made using delegatecall from the Execution Environment. If false, userOp is called using a standard call. |
requirePreSolver | bool | Executes the preSolver hook before the solverOp execution if true. If false, the preSolver hook is skipped. |
requirePostSolver | bool | Executes the postSolver hook after the solverOp execution if true. If false, the postSolver hook is skipped. |
requirePostOpsCall | bool | Executes the postOps hook as the final step of the metacall if true. If false, the postOps hook is skipped. |
zeroSolvers | bool | Allows the metacall to proceed even if there are no solverOps if true. |
reuseUserOp | bool | If true, the metacall will revert if unsuccessful to avoid storing nonce data, allowing the userOp to be reused. |
userAuctioneer | bool | Allows the user to be the auctioneer (the signer of the dAppOp) if true. |
solverAuctioneer | bool | Allows the solver to be the auctioneer if true. If enabled, the solver's solverOp must be the only one. |
unknownAuctioneer | bool | Permits anyone to be the auctioneer if true. Standard signatory checks are bypassed. |
verifyCallChainHash | bool | Ensures that the dAppOp.callChainHash matches the actual callChainHash as calculated in AtlasVerification if true. |
forwardReturnData | bool | Includes return data from previous steps as calldata in the call to the solver contract if true. |
requireFulfillment | bool | If true, a winning solver must be found; otherwise, the metacall will fail. |
trustedOpHash | bool | If true, the userOpHash excludes certain userOp inputs, implying that solvers trust changes made to these parts after signing their solverOps. |
invertBidValue | bool | If true, the solver with the lowest successful bid wins instead of the highest. |
exPostBids | bool | If true, bids are determined on-chain using _getBidAmount in Atlas. |
allowAllocateValueFailure | bool | If true, the metacall will proceed even if value allocation fails. If false, the metacall will revert if value allocation fails. |
CallConfigIndex Enum
enum CallConfigIndex {
UserNoncesSequential,
DAppNoncesSequential,
RequirePreOps,
TrackPreOpsReturnData,
TrackUserReturnData,
DelegateUser,
RequirePreSolver,
RequirePostSolver,
RequirePostOpsCall,
ZeroSolvers,
ReuseUserOp,
UserAuctioneer,
SolverAuctioneer,
UnknownAuctioneer,
VerifyCallChainHash,
ForwardReturnData,
RequireFulfillment,
TrustedOpHash,
InvertBidValue,
ExPostBids,
AllowAllocateValueFailure
}
Description
The CallConfigIndex
enum assigns a unique index to each field within the CallConfig
struct. This indexing facilitates efficient bitwise operations, storage optimizations, and streamlined access to specific configuration flags during contract execution.
Usage
The CallConfigIndex
enum is primarily used for:
- Bitwise Operations: Efficiently setting, toggling, and checking configuration flags using bit manipulation techniques.
- Storage Optimization: Reducing storage costs by packing multiple boolean flags into a single integer using their corresponding indices.
- Configuration Management: Streamlining the process of accessing and modifying specific configuration flags without affecting others.