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(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

NameTypeDescription
userOpHashbytes32The hash of the UserOperation.
executionEnvironmentaddressThe address of the execution environment.
bundleraddressThe address of the bundler.
dappGasLimituint32The DAppControl's gas limit for preOps, allocateValue, and postOps hooks.
solverOpCountuint8The count of SolverOperations.
isSimulationboolWhether the current execution is a simulation.

Return Values

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