Skip to main content

IAtlasVerification

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

NameTypeDescription
dConfigDAppConfig calldataThe configuration settings for the DApp.
userOpUserOperation calldataThe user-initiated operation.
solverOpsSolverOperation[] calldataAn array of solver-proposed operations.
dAppOpDAppOperation calldataThe DApp-specific operation.
msgValueuint256The Ether value sent with the message.
msgSenderaddressThe address of the message sender.
isSimulationboolIndicates if the call is a simulation.

Return Value

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

NameTypeDescription
solverOpSolverOperation calldataThe solver's proposed operation.
userOpHashbytes32The hash of the user's operation.
userMaxFeePerGasuint256The maximum fee per gas the user is willing to pay.
bundleraddressThe address of the bundler executing the transaction.
allowsTrustedOpHashboolIndicates if trusted operation hashes are allowed.

Return Value

TypeDescription
uint256The result of the verification process.

verifyCallConfig

function verifyCallConfig(uint32 callConfig) external view returns (ValidCallsResult);

Verifies the call configuration settings.

Parameters

NameTypeDescription
callConfiguint32The call configuration settings.

Return Value

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

NameTypeDescription
userOpUserOperation calldataThe user operation to hash.

Return Value

TypeDescription
bytes32The hash of the user operation.

getUserOperationPayload

function getUserOperationPayload(UserOperation calldata userOp) external view returns (bytes32 payload);

Retrieves the payload of a user operation.

Parameters

NameTypeDescription
userOpUserOperation calldataThe user operation.

Return Value

TypeDescription
bytes32The payload of the user operation.

getSolverPayload

function getSolverPayload(SolverOperation calldata solverOp) external view returns (bytes32 payload);

Retrieves the payload of a solver operation.

Parameters

NameTypeDescription
solverOpSolverOperation calldataThe solver operation.

Return Value

TypeDescription
bytes32The payload of the solver operation.

getDAppOperationPayload

function getDAppOperationPayload(DAppOperation calldata dAppOp) external view returns (bytes32 payload);

Retrieves the payload of a DApp operation.

Parameters

NameTypeDescription
dAppOpDAppOperation calldataThe DApp operation.

Return Value

TypeDescription
bytes32The payload of the DApp operation.

getDomainSeparator

function getDomainSeparator() external view returns (bytes32 domainSeparator);

Returns the domain separator used in EIP-712 signing.

Return Value

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

NameTypeDescription
useraddressThe address of the user.
sequentialboolIndicates if nonces must be sequential.

Return Value

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

NameTypeDescription
useraddressThe address of the user.
refNonceuint256The reference nonce to search after.

Return Value

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

NameTypeDescription
dAppaddressThe address of the DApp.

Return Value

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

NameTypeDescription
accountaddressThe address of the user account.

Return Value

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

NameTypeDescription
accountaddressThe address of the DApp account.

Return Value

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

NameTypeDescription
accountaddressThe address of the user account.
wordIndexuint248The index of the word to retrieve the bitmap from.

Return Value

TypeDescription
uint256The nonce tracker bitmap at the specified word index.

initializeGovernance

function initializeGovernance(address control) external;

Initializes governance for a DApp control contract.

Parameters

NameTypeDescription
controladdressThe address of the DAppControl contract.

addSignatory

function addSignatory(address control, address signatory) external;

Adds a new signatory to a DApp control contract.

Parameters

NameTypeDescription
controladdressThe address of the DAppControl contract.
signatoryaddressThe address of the new signatory.

removeSignatory

function removeSignatory(address control, address signatory) external;

Removes an existing signatory from a DApp control contract.

Parameters

NameTypeDescription
controladdressThe address of the DAppControl contract.
signatoryaddressThe 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

NameTypeDescription
oldGovernanceaddressThe address of the current governance.
newGovernanceaddressThe address of the new governance.

disableDApp

function disableDApp(address control) external;

Disables a DApp, preventing further interactions.

Parameters

NameTypeDescription
controladdressThe 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

NameTypeDescription
controladdressThe address of the DAppControl contract.

Return Value

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

NameTypeDescription
controladdressThe address of the DAppControl contract.
signatoryaddressThe address to check as a signatory.

Return Value

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

NameTypeDescription
keybytes32The key representing the signatory.

Return Value

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

NameTypeDescription
controladdressThe address of the DAppControl contract.

Return Value

TypeDescription
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

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 logic before a solver operation.

Parameters

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

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 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.

[Previous content remains unchanged]

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.