Skip to main content

Solidity API

Storage​

Storage manages all storage variables and constants for the Atlas smart contract.

VERIFICATION​

contract IAtlasVerification VERIFICATION

SIMULATOR​

address SIMULATOR

L2_GAS_CALCULATOR​

address L2_GAS_CALCULATOR

ESCROW_DURATION​

uint256 ESCROW_DURATION

name​

string name

symbol​

string symbol

decimals​

uint8 decimals

SCALE​

uint256 SCALE

FIXED_GAS_OFFSET​

uint256 FIXED_GAS_OFFSET

t_lock​

uint256 t_lock

t_solverLock​

uint256 t_solverLock

t_solverTo​

address t_solverTo

t_gasLedger​

uint256 t_gasLedger

t_borrowsLedger​

uint256 t_borrowsLedger

S_totalSupply​

uint256 S_totalSupply

S_bondedTotalSupply​

uint256 S_bondedTotalSupply

S_surchargeRates​

uint256 S_surchargeRates

S_cumulativeSurcharge​

uint256 S_cumulativeSurcharge

S_surchargeRecipient​

address S_surchargeRecipient

S_pendingSurchargeRecipient​

address S_pendingSurchargeRecipient

s_balanceOf​

mapping(address => struct EscrowAccountBalance) s_balanceOf

S_accessData​

mapping(address => struct EscrowAccountAccessData) S_accessData

S_solverOpHashes​

mapping(bytes32 => bool) S_solverOpHashes

constructor​

constructor(uint256 escrowDuration, uint256 atlasSurchargeRate, uint256 bundlerSurchargeRate, address verification, address simulator, address initialSurchargeRecipient, address l2GasCalculator) public payable

setSurchargeRates​

function setSurchargeRates(uint256 newAtlasRate, uint256 newBundlerRate) external

_onlySurchargeRecipient​

function _onlySurchargeRecipient() internal view

totalSupply​

function totalSupply() external view returns (uint256)

bondedTotalSupply​

function bondedTotalSupply() external view returns (uint256)

accessData​

function accessData(address account) external view returns (uint112 bonded, uint32 lastAccessedBlock, uint24 auctionWins, uint24 auctionFails, uint64 totalGasValueUsed)

solverOpHashes​

function solverOpHashes(bytes32 opHash) external view returns (bool)

cumulativeSurcharge​

function cumulativeSurcharge() external view returns (uint256)

surchargeRecipient​

function surchargeRecipient() external view returns (address)

pendingSurchargeRecipient​

function pendingSurchargeRecipient() external view returns (address)

atlasSurchargeRate​

function atlasSurchargeRate() external view returns (uint256)

bundlerSurchargeRate​

function bundlerSurchargeRate() external view returns (uint256)

_surchargeRates​

function _surchargeRates() internal view returns (uint256 atlasRate, uint256 bundlerRate)

_totalSurchargeRate​

function _totalSurchargeRate() internal view returns (uint256 totalSurchargeRate)

lock​

function lock() external view returns (address activeEnvironment, uint32 callConfig, uint8 phase)

isUnlocked​

function isUnlocked() external view returns (bool)

Returns the current lock state of Atlas.

Return Values​

NameTypeDescription
[0]boolBoolean indicating whether Atlas is in a locked state or not.

solverLockData​

function solverLockData() external view returns (address currentSolver, bool calledBack, bool fulfilled)

Returns information about the current state of the solver lock.

Return Values​

NameTypeDescription
currentSolveraddressAddress of the current solver.
calledBackboolBoolean indicating whether the solver has called back via reconcile.
fulfilledboolBoolean indicating whether the solver's outstanding debt has been repaid via reconcile.

_lock​

function _lock() internal view returns (address activeEnvironment, uint32 callConfig, uint8 phase)

_activeEnvironment​

function _activeEnvironment() internal view returns (address)

_activeCallConfig​

function _activeCallConfig() internal view returns (uint32)

_phase​

function _phase() internal view returns (uint8)

_solverLockData​

function _solverLockData() internal view returns (address currentSolver, bool calledBack, bool fulfilled)

Returns information about the current state of the solver lock.

Return Values​

NameTypeDescription
currentSolveraddressAddress of the current solver.
calledBackboolBoolean indicating whether the solver has called back via reconcile.
fulfilledboolBoolean indicating whether the solver's outstanding debt has been repaid via reconcile.

_isUnlocked​

function _isUnlocked() internal view returns (bool)

_setLock​

function _setLock(address activeEnvironment, uint32 callConfig, uint8 phase) internal

_releaseLock​

function _releaseLock() internal

_setLockPhase​

function _setLockPhase(uint8 newPhase) internal