Solidity API
SafetyLocks
SafetyLocks manages the locking and unlocking of the Atlas environment during the execution of a metacall transaction.
constructor
constructor(uint256 escrowDuration, uint256 atlasSurchargeRate, uint256 bundlerSurchargeRate, address verification, address simulator, address initialSurchargeRecipient, address l2GasCalculator) internal
_setEnvironmentLock
function _setEnvironmentLock(struct DAppConfig dConfig, address executionEnvironment) internal
Sets the Atlas lock to the specified execution environment.
Parameters
Name | Type | Description |
---|---|---|
dConfig | struct DAppConfig | The DAppConfig of the current DAppControl contract. |
executionEnvironment | address | The address of the execution environment to set the lock to. |
withLockPhase
modifier withLockPhase(enum ExecutionPhase executionPhase)
_buildContext
function _buildContext(bytes32 userOpHash, address executionEnvironment, address bundler, uint32 dappGasLimit, uint8 solverOpCount, bool isSimulation) internal pure returns (struct Context)
Builds an Context struct with the specified parameters, called at the start of
_preOpsUserExecutionIteration
.
Parameters
Name | Type | Description |
---|---|---|
userOpHash | bytes32 | The hash of the UserOperation. |
executionEnvironment | address | The address of the execution environment. |
bundler | address | The address of the bundler. |
dappGasLimit | uint32 | The DAppControl's gas limit for preOps, allocateValue, and postOps hooks. |
solverOpCount | uint8 | The count of SolverOperations. |
isSimulation | bool | Whether the current execution is a simulation. |
Return Values
Name | Type | Description |
---|---|---|
[0] | struct Context | An Context struct initialized with the provided parameters. |