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
Name | Type | Description |
---|---|---|
from | address | Address of the signer who authorized the DApp operation. |
to | address | Atlas contract address intended to receive the operation. |
nonce | uint256 | Unique nonce for the DApp operation, ensuring replay protection and correct sequencing. |
deadline | uint256 | Block number by which the operation must be executed, preventing indefinite pending operations. |
control | address | Address of the DAppControl contract managing governance and signatories for the dApp. |
bundler | address | Address of the bundler (msg.sender) responsible for forwarding the transaction within the Atlas Protocol. |
userOpHash | bytes32 | Keccak256 hash of the user's operation (userOp.to and userOp.data), linking the user and dApp operations. |
callChainHash | bytes32 | Keccak256 hash of the solvers' transactions, ensuring the integrity of solver operations related to this dApp operation. |
signature | bytes | Digital 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.