The IAtlasVerification interface handles the validation and verification processes within the Atlas Protocol. It ensures that all operations comply with the protocol's rules and maintains the integrity of transactions.
Functions
validateCalls
function validateCalls(
DAppConfig calldata dConfig,
UserOperation calldata userOp,
SolverOperation[] calldata solverOps,
DAppOperation calldata dAppOp,
uint256 msgValue,
address msgSender,
bool isSimulation
) external returns (ValidCallsResult);
Validates the sequence of calls in a transaction based on the provided configurations and operations.
Parameters
Name | Type | Description |
---|
dConfig | DAppConfig calldata | The configuration settings for the DApp. |
userOp | UserOperation calldata | The user-initiated operation. |
solverOps | SolverOperation[] calldata | An array of solver-proposed operations. |
dAppOp | DAppOperation calldata | The DApp-specific operation. |
msgValue | uint256 | The Ether value sent with the message. |
msgSender | address | The address of the message sender. |
isSimulation | bool | Indicates if the call is a simulation. |
Return Value
Type | Description |
---|
ValidCallsResult | The result of the call validation process. |
verifySolverOp
function verifySolverOp(
SolverOperation calldata solverOp,
bytes32 userOpHash,
uint256 userMaxFeePerGas,
address bundler,
bool allowsTrustedOpHash
) external view returns (uint256 result);
Verifies a solver's operation against the user's operation hash and fee parameters.
Parameters
Name | Type | Description |
---|
solverOp | SolverOperation calldata | The solver's proposed operation. |
userOpHash | bytes32 | The hash of the user's operation. |
userMaxFeePerGas | uint256 | The maximum fee per gas the user is willing to pay. |
bundler | address | The address of the bundler executing the transaction. |
allowsTrustedOpHash | bool | Indicates if trusted operation hashes are allowed. |
Return Value
Type | Description |
---|
uint256 | The result of the verification process. |
verifyCallConfig
function verifyCallConfig(uint32 callConfig) external view returns (ValidCallsResult);
Verifies the call configuration settings.
Parameters
Name | Type | Description |
---|
callConfig | uint32 | The call configuration settings. |
Return Value
Type | Description |
---|
ValidCallsResult | The result of the call configuration verification. |
getUserOperationHash
function getUserOperationHash(UserOperation calldata userOp) external view returns (bytes32 hash);
Generates a hash for a given user operation.
Parameters
Name | Type | Description |
---|
userOp | UserOperation calldata | The user operation to hash. |
Return Value
Type | Description |
---|
bytes32 | The hash of the user operation. |
getUserOperationPayload
function getUserOperationPayload(UserOperation calldata userOp) external view returns (bytes32 payload);
Retrieves the payload of a user operation.
Parameters
Name | Type | Description |
---|
userOp | UserOperation calldata | The user operation. |
Return Value
Type | Description |
---|
bytes32 | The payload of the user operation. |
getSolverPayload
function getSolverPayload(SolverOperation calldata solverOp) external view returns (bytes32 payload);
Retrieves the payload of a solver operation.
Parameters
Name | Type | Description |
---|
solverOp | SolverOperation calldata | The solver operation. |
Return Value
Type | Description |
---|
bytes32 | The payload of the solver operation. |
getDAppOperationPayload
function getDAppOperationPayload(DAppOperation calldata dAppOp) external view returns (bytes32 payload);
Retrieves the payload of a DApp operation.
Parameters
Name | Type | Description |
---|
dAppOp | DAppOperation calldata | The DApp operation. |
Return Value
Type | Description |
---|
bytes32 | The payload of the DApp operation. |
getDomainSeparator
function getDomainSeparator() external view returns (bytes32 domainSeparator);
Returns the domain separator used in EIP-712 signing.
Return Value
Type | Description |
---|
bytes32 | The domain separator hash. |
getUserNextNonce
function getUserNextNonce(address user, bool sequential) external view returns (uint256 nextNonce);
Retrieves the next nonce for a user, optionally requiring sequential nonces.
Parameters
Name | Type | Description |
---|
user | address | The address of the user. |
sequential | bool | Indicates if nonces must be sequential. |
Return Value
Type | Description |
---|
uint256 | The next nonce for the user. |
getUserNextNonSeqNonceAfter
function getUserNextNonSeqNonceAfter(address user, uint256 refNonce) external view returns (uint256);
Retrieves the next non-sequential nonce for a user after a reference nonce.
Parameters
Name | Type | Description |
---|
user | address | The address of the user. |
refNonce | uint256 | The reference nonce to search after. |
Return Value
Type | Description |
---|
uint256 | The next non-sequential nonce after the reference nonce. |
getDAppNextNonce
function getDAppNextNonce(address dApp) external view returns (uint256 nextNonce);
Retrieves the next nonce for a DApp.
Parameters
Name | Type | Description |
---|
dApp | address | The address of the DApp. |
Return Value
Type | Description |
---|
uint256 | The next nonce for the DApp. |
userSequentialNonceTrackers
function userSequentialNonceTrackers(address account) external view returns (uint256 lastUsedSeqNonce);
Returns the last used sequential nonce for a user account.
Parameters
Name | Type | Description |
---|
account | address | The address of the user account. |
Return Value
Type | Description |
---|
uint256 | The last used sequential nonce. |
dAppSequentialNonceTrackers
function dAppSequentialNonceTrackers(address account) external view returns (uint256 lastUsedSeqNonce);
Returns the last used sequential nonce for a DApp account.
Parameters
Name | Type | Description |
---|
account | address | The address of the DApp account. |
Return Value
Type | Description |
---|
uint256 | The last used sequential nonce. |
userNonSequentialNonceTrackers
function userNonSequentialNonceTrackers(
address account,
uint248 wordIndex
) external view returns (uint256 bitmap);
Retrieves the non-sequential nonce tracker bitmap for a user account at a specific word index.
Parameters
Name | Type | Description |
---|
account | address | The address of the user account. |
wordIndex | uint248 | The index of the word to retrieve the bitmap from. |
Return Value
Type | Description |
---|
uint256 | The nonce tracker bitmap at the specified word index. |
initializeGovernance
function initializeGovernance(address control) external;
Initializes governance for a DApp control contract.
Parameters
Name | Type | Description |
---|
control | address | The address of the DAppControl contract. |
addSignatory
function addSignatory(address control, address signatory) external;
Adds a new signatory to a DApp control contract.
Parameters
Name | Type | Description |
---|
control | address | The address of the DAppControl contract. |
signatory | address | The address of the new signatory. |
removeSignatory
function removeSignatory(address control, address signatory) external;
Removes an existing signatory from a DApp control contract.
Parameters
Name | Type | Description |
---|
control | address | The address of the DAppControl contract. |
signatory | address | The address of the signatory to remove. |
changeDAppGovernance
function changeDAppGovernance(address oldGovernance, address newGovernance) external;
Transfers governance control from an old governance address to a new one.
Parameters
Name | Type | Description |
---|
oldGovernance | address | The address of the current governance. |
newGovernance | address | The address of the new governance. |
disableDApp
function disableDApp(address control) external;
Disables a DApp, preventing further interactions.
Parameters
Name | Type | Description |
---|
control | address | The address of the DAppControl contract. |
getGovFromControl
function getGovFromControl(address control) external view returns (address);
Retrieves the governance address associated with a DApp control contract.
Parameters
Name | Type | Description |
---|
control | address | The address of the DAppControl contract. |
Return Value
Type | Description |
---|
address | The governance address. |
isDAppSignatory
function isDAppSignatory(address control, address signatory) external view returns (bool);
Checks if a given address is a signatory for a specific DApp control contract.
Parameters
Name | Type | Description |
---|
control | address | The address of the DAppControl contract. |
signatory | address | The address to check as a signatory. |
Return Value
Type | Description |
---|
bool | true if the address is a signatory, else false. |
signatories
function signatories(bytes32 key) external view returns (bool);
Checks if a specific key corresponds to a valid signatory.
Parameters
Name | Type | Description |
---|
key | bytes32 | The key representing the signatory. |
Return Value
Type | Description |
---|
bool | true if the key is a valid signatory, else false. |
dAppSignatories
function dAppSignatories(address control) external view returns (address[] memory);
Retrieves all signatories associated with a specific DApp control contract.
Parameters
Name | Type | Description |
---|
control | address | The address of the DAppControl contract. |
Return Value
Type | Description |
---|
address[] | An array of signatory addresses associated with the DApp. |
preOpsCall
function preOpsCall(UserOperation calldata userOp) external payable returns (bytes memory);
Executes logic before the user operation.
Parameters
Name | Type | Description |
---|
userOp | UserOperation calldata | The user operation. |
payable | - | Ether sent with the call (if any). |
Return Value
Type | Description |
---|
bytes memory | The returned data from the pre-operations call. |
preSolverCall
function preSolverCall(SolverOperation calldata solverOp, bytes calldata returnData) external payable;
Executes logic before a solver operation.
Parameters
Name | Type | Description |
---|
solverOp | SolverOperation calldata | The solver operation. |
returnData | bytes | Data returned from the previous call. |
payable | - | Ether sent with the call (if any). |
postSolverCall
function postSolverCall(SolverOperation calldata solverOp, bytes calldata returnData) external payable;
Executes logic after a solver operation.
Parameters
Name | Type | Description |
---|
solverOp | SolverOperation calldata | The solver operation. |
returnData | bytes | Data returned from the solver operation. |
payable | - | Ether sent with the call (if any). |
postOpsCall
function postOpsCall(bool solved, bytes calldata data) external payable;
Executes logic after all operations have been processed.
Parameters
Name | Type | Description |
---|
solved | bool | Indicates if the operation was solved. |
data | bytes | Additional data related to the operation. |
payable | - | Ether sent with the call (if any). |
allocateValueCall
function allocateValueCall(address bidToken, uint256 bidAmount, bytes calldata data) external;
Allocates value generated from solver operations to specified recipients.
Parameters
Name | Type | Description |
---|
bidToken | address | The token used for bidding. |
bidAmount | uint256 | The amount of tokens bid. |
data | bytes | Additional data for value allocation. |
getDAppConfig
function getDAppConfig(UserOperation calldata userOp) external view returns (DAppConfig memory dConfig);
Retrieves the configuration settings for a DApp based on the user operation.
Parameters
Name | Type | Description |
---|
userOp | UserOperation calldata | The user operation. |
Return Value