Skip to main content

EscrowBits

The EscrowBits library provides utility functions for handling and interpreting escrow-related outcomes within the Atlas Protocol. It defines constants representing various solver outcomes and offers functions to determine the execution status based on these outcomes. This library is integral for managing escrow reconciliations and ensuring that funds are appropriately handled in different solver scenarios.

State Variables

VariableTypeDescription
_NO_REFUNDuint256Represents scenarios where no gas refund is owed to the solver.
_PARTIAL_REFUNDuint256Represents scenarios where a partial gas refund is owed to the solver.
_FULL_REFUNDuint256Represents scenarios where a full gas refund is owed to the solver after execution.

Functions

canExecute

Signature:

function canExecute(uint256 result) internal pure returns (bool)

Parameters:

NameTypeDescription
resultuint256The outcome result code to evaluate.

Returns:

NameTypeDescription
boolboolIndicates if the operation can be executed.

partialRefund

Signature:

function partialRefund(uint256 result) internal pure returns (bool)

Parameters:

NameTypeDescription
resultuint256The outcome result code to evaluate.
function partialRefund(uint256 result) internal pure returns (bool)

Parameters:

NameTypeDescription
resultuint256The outcome result code to evaluate.

Returns:

NameTypeDescription
boolboolIndicates if a partial refund is required.

executionSuccessful

Signature:

function executionSuccessful(uint256 result) internal pure returns (bool)

Parameters:

NameTypeDescription
resultuint256The outcome result code to evaluate.

Returns:

NameTypeDescription
boolboolIndicates if the execution was successful.

executedWithError

Signature:

function executedWithError(uint256 result) internal pure returns (bool)

Parameters:

NameTypeDescription
resultuint256The outcome result code to evaluate.

Returns:

NameTypeDescription
boolboolIndicates if the execution resulted in an error.

bundlersFault

Signature:

function bundlersFault(uint256 result) internal pure returns (bool)

Parameters:

NameTypeDescription
resultuint256The outcome result code to evaluate.

Returns:

NameTypeDescription
boolboolIndicates if the fault is due to the bundler and no solver refund is required.