The IDAppControl interface allows developers to define application-specific logic and settings that execute at various stages of an Atlas transaction. It enables DApps to customize the behavior of the protocol to suit their specific needs.
Functions
preOpsCall
function preOpsCall(UserOperation calldata userOp) external payable returns (bytes memory);
Executes custom logic before the user operation is processed.
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 custom logic before a solver operation is processed.
Parameters
Name | Type | Description |
---|
solverOp | SolverOperation calldata | The solver operation. |
returnData | bytes | Data returned from the pre-operations call. |
payable | - | Ether sent with the call (if any). |
postSolverCall
function postSolverCall(SolverOperation calldata solverOp, bytes calldata returnData) external payable;
Executes custom logic after a solver operation is processed.
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 custom 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
Type | Description |
---|
DAppConfig memory | The configuration settings for the DApp. |
getCallConfig
function getCallConfig() external view returns (CallConfig memory callConfig);
Retrieves the current call configuration settings.
Return Value
Type | Description |
---|
CallConfig memory | The current call configuration settings. |
function getBidFormat(UserOperation calldata userOp) external view returns (address bidToken);
Retrieves the bid token format for a given user operation.
Parameters
Name | Type | Description |
---|
userOp | UserOperation calldata | The user operation. |
Return Value
Type | Description |
---|
address | The address of the bid token. |
getBidValue
function getBidValue(SolverOperation calldata solverOp) external view returns (uint256);
Retrieves the bid value for a given solver operation.
Parameters
Name | Type | Description |
---|
solverOp | SolverOperation calldata | The solver operation. |
Return Value
Type | Description |
---|
uint256 | The value of the bid. |
getDAppSignatory
function getDAppSignatory() external view returns (address governanceAddress);
Retrieves the governance address for a DApp.
Return Value
Type | Description |
---|
address | The governance address of the DApp. |
requireSequentialUserNonces
function requireSequentialUserNonces() external view returns (bool isSequential);
Checks if sequential nonces are required for user operations.
Return Value
Type | Description |
---|
bool | true if sequential nonces are required, otherwise false. |
requireSequentialDAppNonces
function requireSequentialDAppNonces() external view returns (bool isSequential);
Checks if sequential nonces are required for DApp operations.
Return Value
Type | Description |
---|
bool | true if sequential nonces are required, otherwise false. |
preOpsDelegated
function preOpsDelegated() external view returns (bool delegated);
Checks if the pre-operations call is delegated.
Return Value
Type | Description |
---|
bool | true if pre-operations call is delegated, otherwise false. |
userDelegated
function userDelegated() external view returns (bool delegated);
Checks if the user operation is delegated.
Return Value
Type | Description |
---|
bool | true if user operation is delegated, otherwise false. |
allocatingDelegated
function allocatingDelegated() external view returns (bool delegated);
Checks if value allocation is delegated.
Return Value
Type | Description |
---|
bool | true if value allocation is delegated, otherwise false. |
verificationDelegated
function verificationDelegated() external view returns (bool delegated);
Checks if verification is delegated.
Return Value
Type | Description |
---|
bool | true if verification is delegated, otherwise false. |
CALL_CONFIG
function CALL_CONFIG() external view returns (uint32);
Returns the current call configuration setting.
Return Value
Type | Description |
---|
uint32 | The current call configuration. |
transferGovernance
function transferGovernance(address newGovernance) external;
Transfers governance control to a new governance address.
Parameters
Name | Type | Description |
---|
newGovernance | address | The address of the new governance. |
acceptGovernance
function acceptGovernance() external;
Accepts the transfer of governance control to the new governance address.