Solidity API
SafetyLocks
SafetyLocks manages the locking and unlocking of the Atlas environment during the execution of a metacall transaction.
constructor
constructor(uint256 escrowDuration, 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(address executionEnvironment, bytes32 userOpHash, address bundler, 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 |
|---|---|---|
| executionEnvironment | address | The address of the current Execution Environment. |
| userOpHash | bytes32 | The UserOperation hash. |
| bundler | address | The address of the bundler. |
| solverOpCount | uint8 | The count of SolverOperations. |
| isSimulation | bool | Boolean indicating whether the call is a simulation or not. |
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | struct Context | An Context struct initialized with the provided parameters. |