atlasSolverCall
Last updated
Last updated
Searchers need to implement the following interface in their smart contracts:
See (Example Solver Repository)
Name | Type | Description |
---|---|---|
The bidAmount
will have to be transferred at the end of the solver call to the executionEnvironment
address. We provide opinionated modifiers which can be easily used to get started.
The SolverBase
contract includes important modifiers that you should utilize in your atlasSolverCall
function implementation:
safetyFirst
Modifier:This modifier:
Ensures that only the Atlas contract can call the function
Verifies that the solver operation is from the authorized owner
Handles any shortfall in the Atlas contract after the main function execution
Unwraps WETH if necessary to cover the msg.value
Reconciles the shortfall with the Atlas contract
payBids
Modifier:This modifier:
Handles the payment of the solver's bid to the Execution Environment
Supports payments in both POL (Native) and ERC20 tokens
Unwraps WETH if necessary to cover ETH payments
Uses SafeTransferLib
for secure token transfers
When inheriting from SolverBase
, it's crucial to use these modifiers correctly in your atlasSolverCall
function implementation to ensure proper security checks and bid payments.
solverOpFrom
address
The address initiating the solver operation.
executionEnvironment
address
The address of the Execution Environment.
bidToken
address
The token used for bidding; use zero address to indicate POL
bidAmount
uint256
The amount of tokens bid in wei
solverOpData
bytes
The data associated with the solver operation.
extraReturnData
bytes
Additional data to return after execution.
payable
-
Indicates that ether can be sent with the call (if any).