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
Name | Type | Description |
---|---|---|
userOp | struct UserOperation | The UserOperation of the metacall. |
solverOps | struct SolverOperation[] | The array of SolverOperations of the metacall. |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | The 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
Name | Type | Description |
---|---|---|
userOp | struct UserOperation | The UserOperation of the metacall. |
solverOp | struct SolverOperation | The SolverOperation of the solver whose charge is being estimated. |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | The 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