Skip to main content

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

NameTypeDescription
dConfigstruct DAppConfigThe DAppConfig of the current DAppControl contract.
executionEnvironmentaddressThe 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

NameTypeDescription
executionEnvironmentaddressThe address of the current Execution Environment.
userOpHashbytes32The UserOperation hash.
bundleraddressThe address of the bundler.
solverOpCountuint8The count of SolverOperations.
isSimulationboolBoolean indicating whether the call is a simulation or not.

Return Values

NameTypeDescription
[0]struct ContextAn Context struct initialized with the provided parameters.