Skip to main content

DAppOperation

DAppOperation

bytes32 constant DAPP_TYPEHASH = keccak256(
"DAppOperation(address from,address to,uint256 nonce,uint256 deadline,address control,address bundler,bytes32 userOpHash,bytes32 callChainHash)"
);

struct DAppOperation {
address from;
address to;
uint256 nonce;
uint256 deadline;
address control;
address bundler;
bytes32 userOpHash;
bytes32 callChainHash;
bytes signature;
}

Description

The DAppOperation struct represents an operation initiated by a decentralized application (dApp) within the Atlas Protocol. It encapsulates all necessary details to validate and execute the operation securely.

Fields

NameTypeDescription
fromaddressAddress of the signer who authorized the DApp operation.
toaddressAtlas contract address intended to receive the operation.
nonceuint256Unique nonce for the DApp operation, ensuring replay protection and correct sequencing.
deadlineuint256Block number by which the operation must be executed, preventing indefinite pending operations.
controladdressAddress of the DAppControl contract managing governance and signatories for the dApp.
bundleraddressAddress of the bundler (msg.sender) responsible for forwarding the transaction within the Atlas Protocol.
userOpHashbytes32Keccak256 hash of the user's operation (userOp.to and userOp.data), linking the user and dApp operations.
callChainHashbytes32Keccak256 hash of the solvers' transactions, ensuring the integrity of solver operations related to this dApp operation.
signaturebytesDigital signature verifying the authenticity of the DApp operation, signed by from.

Usage Notes

  • Security Assurance: The signature field ensures that only authorized dApps can initiate operations, safeguarding against unauthorized actions.
  • Operation Linking: userOpHash and callChainHash create a secure linkage between user operations and solver operations, maintaining operational coherence.
  • Deadline Enforcement: The deadline field prevents operations from being executed indefinitely, ensuring timely processing within the protocol.