Skip to main content

Solidity API

Simulator

_SIM_GAS_SUGGESTED_BUFFER

uint256 _SIM_GAS_SUGGESTED_BUFFER

_SIM_GAS_BEFORE_METACALL

uint256 _SIM_GAS_BEFORE_METACALL

deployer

address deployer

atlas

address atlas

DeployerWithdrawal

event DeployerWithdrawal(address to, uint256 amount)

constructor

constructor() public

estimateMetacallGasLimit

function estimateMetacallGasLimit(struct UserOperation userOp, struct SolverOperation[] solverOps) public view returns (uint256)

Returns an estimation of the gas limit for a metacall, given the supplied UserOperation and array of SolverOperations. This is the gas limit that the bundler should use when executing the metacall.

Parameters

NameTypeDescription
userOpstruct UserOperationThe UserOperation of the metacall.
solverOpsstruct SolverOperation[]The array of SolverOperations of the metacall.

Return Values

NameTypeDescription
[0]uint256The estimated gas limit for the metacall.

estimateMaxSolverWinGasCharge

function estimateMaxSolverWinGasCharge(struct UserOperation userOp, struct SolverOperation solverOp) external view returns (uint256)

Returns an estimation of the max amount (in native token) a winning solver could be charged, given the supplied UserOperation and SolverOperation, assuming the Atlas and Bundler surcharge rates do not change, and assuming the supplied solverOp wins.

Parameters

NameTypeDescription
userOpstruct UserOperationThe UserOperation of the metacall.
solverOpstruct SolverOperationThe SolverOperation of the solver whose charge is being estimated.

Return Values

NameTypeDescription
[0]uint256The estimated max gas charge in native token units.

simUserOperation

function simUserOperation(struct UserOperation userOp) external payable returns (bool success, enum Result simResult, uint256)

simSolverCall

function simSolverCall(struct UserOperation userOp, struct SolverOperation solverOp, struct DAppOperation dAppOp) external payable returns (bool success, enum Result simResult, uint256)

simSolverCalls

function simSolverCalls(struct UserOperation userOp, struct SolverOperation[] solverOps, struct DAppOperation dAppOp) external payable returns (bool success, enum Result simResult, uint256)

_errorCatcher

function _errorCatcher(struct UserOperation userOp, struct SolverOperation[] solverOps, struct DAppOperation dAppOp, uint256 estGasLimit) internal returns (enum Result result, uint256 additionalErrorCode)

metacallSimulation

function metacallSimulation(struct UserOperation userOp, struct SolverOperation[] solverOps, struct DAppOperation dAppOp, uint256 estGasLimit) external payable

setAtlas

function setAtlas(address _atlas) external

withdrawETH

function withdrawETH(address to) external

receive

receive() external payable

fallback

fallback() external payable