Skip to main content

IDAppControl

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

NameTypeDescription
userOpUserOperation calldataThe user operation.
payable-Ether sent with the call (if any).

Return Value

TypeDescription
bytes memoryThe 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

NameTypeDescription
solverOpSolverOperation calldataThe solver operation.
returnDatabytesData 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

NameTypeDescription
solverOpSolverOperation calldataThe solver operation.
returnDatabytesData 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

NameTypeDescription
solvedboolIndicates if the operation was solved.
databytesAdditional 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

NameTypeDescription
bidTokenaddressThe token used for bidding.
bidAmountuint256The amount of tokens bid.
databytesAdditional 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

NameTypeDescription
userOpUserOperation calldataThe user operation.

Return Value

TypeDescription
DAppConfig memoryThe configuration settings for the DApp.

getCallConfig

function getCallConfig() external view returns (CallConfig memory callConfig);

Retrieves the current call configuration settings.

Return Value

TypeDescription
CallConfig memoryThe current call configuration settings.

getBidFormat

function getBidFormat(UserOperation calldata userOp) external view returns (address bidToken);

Retrieves the bid token format for a given user operation.

Parameters

NameTypeDescription
userOpUserOperation calldataThe user operation.

Return Value

TypeDescription
addressThe 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

NameTypeDescription
solverOpSolverOperation calldataThe solver operation.

Return Value

TypeDescription
uint256The value of the bid.

getDAppSignatory

function getDAppSignatory() external view returns (address governanceAddress);

Retrieves the governance address for a DApp.

Return Value

TypeDescription
addressThe governance address of the DApp.

requireSequentialUserNonces

function requireSequentialUserNonces() external view returns (bool isSequential);

Checks if sequential nonces are required for user operations.

Return Value

TypeDescription
booltrue 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

TypeDescription
booltrue 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

TypeDescription
booltrue 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

TypeDescription
booltrue if user operation is delegated, otherwise false.

allocatingDelegated

function allocatingDelegated() external view returns (bool delegated);

Checks if value allocation is delegated.

Return Value

TypeDescription
booltrue if value allocation is delegated, otherwise false.

verificationDelegated

function verificationDelegated() external view returns (bool delegated);

Checks if verification is delegated.

Return Value

TypeDescription
booltrue if verification is delegated, otherwise false.

CALL_CONFIG

function CALL_CONFIG() external view returns (uint32);

Returns the current call configuration setting.

Return Value

TypeDescription
uint32The current call configuration.

transferGovernance

function transferGovernance(address newGovernance) external;

Transfers governance control to a new governance address.

Parameters

NameTypeDescription
newGovernanceaddressThe address of the new governance.

acceptGovernance

function acceptGovernance() external;

Accepts the transfer of governance control to the new governance address.