{
    "Function": "slitherConstructorConstantVariables",
    "File": "contracts/FETH.sol",
    "Parent Contracts": [],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "contract FETH {\n  using AddressUpgradeable for address payable;\n  using LockedBalance for LockedBalance.Lockups;\n  using Math for uint256;\n\n  /// @notice Tracks an account's info.\n  struct AccountInfo {\n    /// @notice The number of tokens which have been unlocked already.\n    uint96 freedBalance;\n    /// @notice The first applicable lockup bucket for this account.\n    uint32 lockupStartIndex;\n    /// @notice Stores up to 25 buckets of locked balance for a user, one per hour.\n    LockedBalance.Lockups lockups;\n    /// @notice Returns the amount which a spender is still allowed to withdraw from this account.\n    mapping(address => uint256) allowance;\n  }\n\n  /// @notice Stores per-account details.\n  mapping(address => AccountInfo) private accountToInfo;\n\n  // Lockup configuration\n  /// @notice The minimum lockup period in seconds.\n  uint256 private immutable lockupDuration;\n  /// @notice The interval to which lockup expiries are rounded, limiting the max number of outstanding lockup buckets.\n  uint256 private immutable lockupInterval;\n\n  /// @notice The Foundation market contract with permissions to manage lockups.\n  address payable private immutable foundationMarket;\n\n  // ERC-20 metadata fields\n  /**\n   * @notice The number of decimals the token uses.\n   * @dev This method can be used to improve usability when displaying token amounts, but all interactions\n   * with this contract use whole amounts not considering decimals.\n   * @return 18\n   */\n  uint8 public constant decimals = 18;\n  /**\n   * @notice The name of the token.\n   * @return Foundation Wrapped Ether\n   */\n  string public constant name = \"Foundation Wrapped Ether\";\n  /**\n   * @notice The symbol of the token.\n   * @return FETH\n   */\n  string public constant symbol = \"FETH\";\n\n  // ERC-20 events\n  /**\n   * @notice Emitted when the allowance for a spender account is updated.\n   * @param from The account the spender is authorized to transact for.\n   * @param spender The account with permissions to manage FETH tokens for the `from` account.\n   * @param amount The max amount of tokens which can be spent by the `spender` account.\n   */\n  event Approval(address indexed from, address indexed spender, uint256 amount);\n  /**\n   * @notice Emitted when a transfer of FETH tokens is made from one account to another.\n   * @param from The account which is sending FETH tokens.\n   * @param to The account which is receiving FETH tokens.\n   * @param amount The number of FETH tokens which were sent.\n   */\n  event Transfer(address indexed from, address indexed to, uint256 amount);\n\n  // Custom events\n  /**\n   * @notice Emitted when FETH tokens are locked up by the Foundation market for 24-25 hours\n   * and may include newly deposited ETH which is added to the account's total FETH balance.\n   * @param account The account which has access to the FETH after the `expiration`.\n   * @param expiration The time at which the `from` account will have access to the locked FETH.\n   * @param amount The number of FETH tokens which where locked up.\n   * @param valueDeposited The amount of ETH added to their account's total FETH balance,\n   * this may be lower than `amount` if available FETH was leveraged.\n   */\n  event BalanceLocked(address indexed account, uint256 indexed expiration, uint256 amount, uint256 valueDeposited);\n  /**\n   * @notice Emitted when FETH tokens are unlocked by the Foundation market.\n   * @dev This event will not be emitted when lockups expire,\n   * it's only for tokens which are unlocked before their expiry.\n   * @param account The account which had locked FETH freed before expiration.\n   * @param expiration The time this balance was originally scheduled to be unlocked.\n   * @param amount The number of FETH tokens which were unlocked.\n   */\n  event BalanceUnlocked(address indexed account, uint256 indexed expiration, uint256 amount);\n  /**\n   * @notice Emitted when ETH is withdrawn from a user's account.\n   * @dev This may be triggered by the user, an approved operator, or the Foundation market.\n   * @param from The account from which FETH was deducted in order to send the ETH.\n   * @param to The address the ETH was sent to.\n   * @param amount The number of tokens which were deducted from the user's FETH balance and transferred as ETH.\n   */\n  event ETHWithdrawn(address indexed from, address indexed to, uint256 amount);\n\n  /// @dev Allows the Foundation market permission to manage lockups for a user.\n  modifier onlyFoundationMarket() {\n    if (msg.sender != foundationMarket) {\n      revert FETH_Only_FND_Market_Allowed();\n    }\n    _;\n  }\n\n  /**\n   * @notice Initializes variables which may differ on testnet.\n   * @param _foundationMarket The address of the Foundation NFT marketplace.\n   * @param _lockupDuration The minimum length of time to lockup tokens for when `BalanceLocked`, in seconds.\n   */\n  constructor(address payable _foundationMarket, uint256 _lockupDuration) {\n    if (!_foundationMarket.isContract()) {\n      revert FETH_Market_Must_Be_A_Contract();\n    }\n    foundationMarket = _foundationMarket;\n    lockupDuration = _lockupDuration;\n    lockupInterval = _lockupDuration / 24;\n    if (lockupInterval * 24 != _lockupDuration || _lockupDuration == 0) {\n      revert FETH_Invalid_Lockup_Duration();\n    }\n  }\n\n  /**\n   * @notice Transferring ETH (via `msg.value`) to the contract performs a `deposit` into the user's account.\n   */\n  receive() external payable {\n    depositFor(msg.sender);\n  }\n\n  /**\n   * @notice Approves a `spender` as an operator with permissions to transfer from your account.\n   * @param spender The address of the operator account that has approval to spend funds\n   * from the `msg.sender`'s account.\n   * @param amount The max number of FETH tokens from `msg.sender`'s account that this spender is\n   * allowed to transact with.\n   * @return success Always true.\n   */\n  function approve(address spender, uint256 amount) external returns (bool success) {\n    accountToInfo[msg.sender].allowance[spender] = amount;\n    emit Approval(msg.sender, spender, amount);\n    return true;\n  }\n\n  /**\n   * @notice Deposit ETH (via `msg.value`) and receive the equivalent amount in FETH tokens.\n   * These tokens are not subject to any lockup period.\n   */\n  function deposit() external payable {\n    depositFor(msg.sender);\n  }\n\n  /**\n   * @notice Deposit ETH (via `msg.value`) and credit the `account` provided with the equivalent amount in FETH tokens.\n   * These tokens are not subject to any lockup period.\n   * @dev This may be used by the Foundation market to credit a user's account with FETH tokens.\n   * @param account The account to credit with FETH tokens.\n   */\n  function depositFor(address account) public payable {\n    if (msg.value == 0) {\n      revert FETH_Must_Deposit_Non_Zero_Amount();\n    }\n    AccountInfo storage accountInfo = accountToInfo[account];\n    // ETH value cannot realistically overflow 96 bits.\n    unchecked {\n      accountInfo.freedBalance += uint96(msg.value);\n    }\n    emit Transfer(address(0), account, msg.value);\n  }\n\n  /**\n   * @notice Used by the market contract only:\n   * Remove an account's lockup and then create a new lockup, potentially for a different account.\n   * @dev Used by the market when an offer for an NFT is increased.\n   * This may be for a single account (increasing their offer)\n   * or two different accounts (outbidding someone elses offer).\n   * @param unlockFrom The account whose lockup is to be removed.\n   * @param unlockExpiration The original lockup expiration for the tokens to be unlocked.\n   * This will revert if the lockup has already expired.\n   * @param unlockAmount The number of tokens to be unlocked from `unlockFrom`'s account.\n   * This will revert if the tokens were previously unlocked.\n   * @param lockupFor The account to which the funds are to be deposited for (via the `msg.value`) and tokens locked up.\n   * @param lockupAmount The number of tokens to be locked up for the `lockupFor`'s account.\n   * `msg.value` must be <= `lockupAmount` and any delta will be taken from the account's available FETH balance.\n   * @return expiration The expiration timestamp for the FETH tokens that were locked.\n   */\n  function marketChangeLockup(\n    address unlockFrom,\n    uint256 unlockExpiration,\n    uint256 unlockAmount,\n    address lockupFor,\n    uint256 lockupAmount\n  ) external payable onlyFoundationMarket returns (uint256 expiration) {\n    _marketUnlockFor(unlockFrom, unlockExpiration, unlockAmount);\n    return _marketLockupFor(lockupFor, lockupAmount);\n  }\n\n  /**\n   * @notice Used by the market contract only:\n   * Lockup an account's FETH tokens for 24-25 hours.\n   * @dev Used by the market when a new offer for an NFT is made.\n   * @param account The account to which the funds are to be deposited for (via the `msg.value`) and tokens locked up.\n   * @param amount The number of tokens to be locked up for the `lockupFor`'s account.\n   * `msg.value` must be <= `amount` and any delta will be taken from the account's available FETH balance.\n   * @return expiration The expiration timestamp for the FETH tokens that were locked.\n   */\n  function marketLockupFor(address account, uint256 amount)\n    external\n    payable\n    onlyFoundationMarket\n    returns (uint256 expiration)\n  {\n    return _marketLockupFor(account, amount);\n  }\n\n  /**\n   * @notice Used by the market contract only:\n   * Remove an account's lockup, making the FETH tokens available for transfer or withdrawal.\n   * @dev Used by the market when an offer is invalidated, which occurs when an auction for the same NFT\n   * receives its first bid or the buyer purchased the NFT another way, such as with `buy`.\n   * @param account The account whose lockup is to be unlocked.\n   * @param expiration The original lockup expiration for the tokens to be unlocked unlocked.\n   * This will revert if the lockup has already expired.\n   * @param amount The number of tokens to be unlocked from `account`.\n   * This will revert if the tokens were previously unlocked.\n   */\n  function marketUnlockFor(\n    address account,\n    uint256 expiration,\n    uint256 amount\n  ) external onlyFoundationMarket {\n    _marketUnlockFor(account, expiration, amount);\n  }\n\n  /**\n   * @notice Used by the market contract only:\n   * Removes tokens from the user's available balance and returns ETH to the caller.\n   * @dev Used by the market when a user's available FETH balance is used to make a purchase\n   * including accepting a buy price or a private sale, or placing a bid in an auction.\n   * @param from The account whose available balance is to be withdrawn from.\n   * @param amount The number of tokens to be deducted from `unlockFrom`'s available balance and transferred as ETH.\n   * This will revert if the tokens were previously unlocked.\n   */\n  function marketWithdrawFrom(address from, uint256 amount) external onlyFoundationMarket {\n    AccountInfo storage accountInfo = _freeFromEscrow(from);\n    _deductBalanceFrom(accountInfo, amount);\n\n    // With the external call after state changes, we do not need a nonReentrant guard\n    payable(msg.sender).sendValue(amount);\n\n    emit ETHWithdrawn(from, msg.sender, amount);\n  }\n\n  /**\n   * @notice Used by the market contract only:\n   * Removes a lockup from the user's account and then returns ETH to the caller.\n   * @dev Used by the market to extract unexpired funds as ETH to distribute for\n   * a sale when the user's offer is accepted.\n   * @param account The account whose lockup is to be removed.\n   * @param expiration The original lockup expiration for the tokens to be unlocked.\n   * This will revert if the lockup has already expired.\n   * @param amount The number of tokens to be unlocked and withdrawn as ETH.\n   */\n  function marketWithdrawLocked(\n    address account,\n    uint256 expiration,\n    uint256 amount\n  ) external onlyFoundationMarket {\n    _removeFromLockedBalance(account, expiration, amount);\n\n    // With the external call after state changes, we do not need a nonReentrant guard\n    payable(msg.sender).sendValue(amount);\n\n    emit ETHWithdrawn(account, msg.sender, amount);\n  }\n\n  /**\n   * @notice Transfers an amount from your account.\n   * @param to The address of the account which the tokens are transferred from.\n   * @param amount The number of FETH tokens to be transferred.\n   * @return success Always true (reverts if insufficient funds).\n   */\n  function transfer(address to, uint256 amount) external returns (bool success) {\n    return transferFrom(msg.sender, to, amount);\n  }\n\n  /**\n   * @notice Transfers an amount from the account specified if the `msg.sender` has approval.\n   * @param from The address from which the available tokens are transferred from.\n   * @param to The address to which the tokens are to be transferred.\n   * @param amount The number of FETH tokens to be transferred.\n   * @return success Always true (reverts if insufficient funds or not approved).\n   */\n  function transferFrom(\n    address from,\n    address to,\n    uint256 amount\n  ) public returns (bool success) {\n    if (to == address(0)) {\n      revert FETH_Transfer_To_Burn_Not_Allowed();\n    } else if (to == address(this)) {\n      revert FETH_Transfer_To_FETH_Not_Allowed();\n    }\n    AccountInfo storage fromAccountInfo = _freeFromEscrow(from);\n    if (from != msg.sender) {\n      _deductAllowanceFrom(fromAccountInfo, amount);\n    }\n    _deductBalanceFrom(fromAccountInfo, amount);\n    AccountInfo storage toAccountInfo = accountToInfo[to];\n\n    // Total ETH cannot realistically overflow 96 bits.\n    unchecked {\n      toAccountInfo.freedBalance += uint96(amount);\n    }\n\n    emit Transfer(from, to, amount);\n\n    return true;\n  }\n\n  /**\n   * @notice Withdraw all tokens available in your account and receive ETH.\n   */\n  function withdrawAvailableBalance() external {\n    AccountInfo storage accountInfo = _freeFromEscrow(msg.sender);\n    uint256 amount = accountInfo.freedBalance;\n    if (amount == 0) {\n      revert FETH_No_Funds_To_Withdraw();\n    }\n    delete accountInfo.freedBalance;\n\n    // With the external call after state changes, we do not need a nonReentrant guard\n    payable(msg.sender).sendValue(amount);\n\n    emit ETHWithdrawn(msg.sender, msg.sender, amount);\n  }\n\n  /**\n   * @notice Withdraw the specified number of tokens from the `from` accounts available balance\n   * and send ETH to the destination address, if the `msg.sender` has approval.\n   * @param from The address from which the available funds are to be withdrawn.\n   * @param to The destination address for the ETH to be transferred to.\n   * @param amount The number of tokens to be withdrawn and transferred as ETH.\n   */\n  function withdrawFrom(\n    address from,\n    address payable to,\n    uint256 amount\n  ) external {\n    if (amount == 0) {\n      revert FETH_No_Funds_To_Withdraw();\n    }\n    AccountInfo storage accountInfo = _freeFromEscrow(from);\n    if (from != msg.sender) {\n      _deductAllowanceFrom(accountInfo, amount);\n    }\n    _deductBalanceFrom(accountInfo, amount);\n\n    // With the external call after state changes, we do not need a nonReentrant guard\n    to.sendValue(amount);\n\n    emit ETHWithdrawn(from, to, amount);\n  }\n\n  /**\n   * @dev Require msg.sender has been approved and deducts the amount from the available allowance.\n   */\n  function _deductAllowanceFrom(AccountInfo storage accountInfo, uint256 amount) private {\n    if (accountInfo.allowance[msg.sender] != type(uint256).max) {\n      if (accountInfo.allowance[msg.sender] < amount) {\n        revert FETH_Insufficient_Allowance(accountInfo.allowance[msg.sender]);\n      }\n      // The check above ensures allowance cannot underflow.\n      unchecked {\n        accountInfo.allowance[msg.sender] -= amount;\n      }\n    }\n  }\n\n  /**\n   * @dev Removes an amount from the account's available FETH balance.\n   */\n  function _deductBalanceFrom(AccountInfo storage accountInfo, uint256 amount) private {\n    // Free from escrow in order to consider any expired escrow balance\n    if (accountInfo.freedBalance < amount) {\n      revert FETH_Insufficient_Available_Funds(accountInfo.freedBalance);\n    }\n    // The check above ensures balance cannot underflow.\n    unchecked {\n      accountInfo.freedBalance -= uint96(amount);\n    }\n  }\n\n  /**\n   * @dev Moves expired escrow to the available balance.\n   */\n  function _freeFromEscrow(address account) private returns (AccountInfo storage) {\n    AccountInfo storage accountInfo = accountToInfo[account];\n    uint256 escrowIndex = accountInfo.lockupStartIndex;\n    LockedBalance.Lockup memory escrow = accountInfo.lockups.get(escrowIndex);\n\n    // If the first bucket (the oldest) is empty or not yet expired, no change to escrowStartIndex is required\n    if (escrow.expiration == 0 || escrow.expiration >= block.timestamp) {\n      return accountInfo;\n    }\n\n    while (true) {\n      // Total ETH cannot realistically overflow 96 bits.\n      unchecked {\n        accountInfo.freedBalance += escrow.totalAmount;\n        accountInfo.lockups.del(escrowIndex);\n        // Escrow index cannot overflow 32 bits.\n        escrow = accountInfo.lockups.get(escrowIndex + 1);\n      }\n\n      // If the next bucket is empty, the start index is set to the previous bucket\n      if (escrow.expiration == 0) {\n        break;\n      }\n\n      // Escrow index cannot overflow 32 bits.\n      unchecked {\n        // Increment the escrow start index if the next bucket is not empty\n        ++escrowIndex;\n      }\n\n      // If the next bucket is expired, that's the new start index\n      if (escrow.expiration >= block.timestamp) {\n        break;\n      }\n    }\n\n    // Escrow index cannot overflow 32 bits.\n    unchecked {\n      accountInfo.lockupStartIndex = uint32(escrowIndex);\n    }\n    return accountInfo;\n  }\n\n  /**\n   * @notice Lockup an account's FETH tokens for 24-25 hours.\n   */\n  /* solhint-disable-next-line code-complexity */\n  function _marketLockupFor(address account, uint256 amount) private returns (uint256 expiration) {\n    if (account == address(0)) {\n      revert FETH_Cannot_Deposit_For_Lockup_With_Address_Zero();\n    }\n    if (amount == 0) {\n      revert FETH_Must_Lockup_Non_Zero_Amount();\n    }\n\n    // Block timestamp in seconds is small enough to never overflow\n    unchecked {\n      // Lockup expires after 24 hours, rounded up to the next hour for a total of [24-25) hours\n      expiration = lockupDuration + block.timestamp.ceilDiv(lockupInterval) * lockupInterval;\n    }\n\n    // Update available escrow\n    // Always free from escrow to ensure the max bucket count is <= 25\n    AccountInfo storage accountInfo = _freeFromEscrow(account);\n    if (msg.value < amount) {\n      // The check above prevents underflow with delta.\n      unchecked {\n        uint256 delta = amount - msg.value;\n        if (accountInfo.freedBalance < delta) {\n          revert FETH_Insufficient_Available_Funds(accountInfo.freedBalance);\n        }\n        // The check above prevents underflow of freed balance.\n        accountInfo.freedBalance -= uint96(delta);\n      }\n    } else if (msg.value != amount) {\n      // There's no reason to send msg.value more than the amount being locked up\n      revert FETH_Too_Much_ETH_Provided();\n    }\n\n    // Add to locked escrow\n    unchecked {\n      // The number of buckets is always < 256 bits.\n      for (uint256 escrowIndex = accountInfo.lockupStartIndex; ; ++escrowIndex) {\n        LockedBalance.Lockup memory escrow = accountInfo.lockups.get(escrowIndex);\n        if (escrow.expiration == 0) {\n          if (expiration > type(uint32).max) {\n            revert FETH_Expiration_Too_Far_In_Future();\n          }\n          // Amount (ETH) will always be < 96 bits.\n          accountInfo.lockups.set(escrowIndex, expiration, amount);\n          break;\n        }\n        if (escrow.expiration == expiration) {\n          // Total ETH will always be < 96 bits.\n          accountInfo.lockups.setTotalAmount(escrowIndex, escrow.totalAmount + amount);\n          break;\n        }\n      }\n    }\n\n    emit BalanceLocked(account, expiration, amount, msg.value);\n  }\n\n  /**\n   * @notice Remove an account's lockup, making the FETH tokens available for transfer or withdrawal.\n   */\n  function _marketUnlockFor(\n    address account,\n    uint256 expiration,\n    uint256 amount\n  ) private {\n    AccountInfo storage accountInfo = _removeFromLockedBalance(account, expiration, amount);\n    // Total ETH cannot realistically overflow 96 bits.\n    unchecked {\n      accountInfo.freedBalance += uint96(amount);\n    }\n  }\n\n  /**\n   * @dev Removes the specified amount from locked escrow, potentially before its expiration.\n   */\n  /* solhint-disable-next-line code-complexity */\n  function _removeFromLockedBalance(\n    address account,\n    uint256 expiration,\n    uint256 amount\n  ) private returns (AccountInfo storage) {\n    if (expiration < block.timestamp) {\n      revert FETH_Escrow_Expired();\n    }\n\n    AccountInfo storage accountInfo = accountToInfo[account];\n    uint256 escrowIndex = accountInfo.lockupStartIndex;\n    LockedBalance.Lockup memory escrow = accountInfo.lockups.get(escrowIndex);\n\n    if (escrow.expiration == expiration) {\n      // If removing from the first bucket, we may be able to delete it\n      if (escrow.totalAmount == amount) {\n        accountInfo.lockups.del(escrowIndex);\n\n        // Bump the escrow start index unless it's the last one\n        if (accountInfo.lockups.get(escrowIndex + 1).expiration != 0) {\n          // The number of escrow buckets will never overflow 32 bits.\n          unchecked {\n            ++accountInfo.lockupStartIndex;\n          }\n        }\n      } else {\n        if (escrow.totalAmount < amount) {\n          revert FETH_Insufficient_Escrow(escrow.totalAmount);\n        }\n        // The require above ensures balance will not underflow.\n        unchecked {\n          accountInfo.lockups.setTotalAmount(escrowIndex, escrow.totalAmount - amount);\n        }\n      }\n    } else {\n      // Removing from the 2nd+ bucket\n      while (true) {\n        // The number of escrow buckets will never overflow 32 bits.\n        unchecked {\n          ++escrowIndex;\n        }\n        escrow = accountInfo.lockups.get(escrowIndex);\n        if (escrow.expiration == expiration) {\n          if (amount > escrow.totalAmount) {\n            revert FETH_Insufficient_Escrow(escrow.totalAmount);\n          }\n          // The require above ensures balance will not underflow.\n          unchecked {\n            accountInfo.lockups.setTotalAmount(escrowIndex, escrow.totalAmount - amount);\n          }\n          // We may have an entry with 0 totalAmount but expiration will be set\n          break;\n        }\n        if (escrow.expiration == 0) {\n          revert FETH_Escrow_Not_Found();\n        }\n      }\n    }\n\n    emit BalanceUnlocked(account, expiration, amount);\n    return accountInfo;\n  }\n\n  /**\n   * @notice Returns the amount which a spender is still allowed to transact from the `account`'s balance.\n   * @param account The owner of the funds.\n   * @param operator The address with approval to spend from the `account`'s balance.\n   * @return amount The number of tokens the `operator` is still allowed to transact with.\n   */\n  function allowance(address account, address operator) external view returns (uint256 amount) {\n    AccountInfo storage accountInfo = accountToInfo[account];\n    return accountInfo.allowance[operator];\n  }\n\n  /**\n   * @notice Returns the balance of an account which is available to transfer or withdraw.\n   * @dev This will automatically increase as soon as locked tokens reach their expiry date.\n   * @param account The account to query the available balance of.\n   * @return balance The available balance of the account.\n   */\n  function balanceOf(address account) external view returns (uint256 balance) {\n    AccountInfo storage accountInfo = accountToInfo[account];\n    balance = accountInfo.freedBalance;\n\n    // Total ETH cannot realistically overflow 96 bits and escrowIndex will always be < 256 bits.\n    unchecked {\n      // Add expired lockups\n      for (uint256 escrowIndex = accountInfo.lockupStartIndex; ; ++escrowIndex) {\n        LockedBalance.Lockup memory escrow = accountInfo.lockups.get(escrowIndex);\n        if (escrow.expiration == 0 || escrow.expiration >= block.timestamp) {\n          break;\n        }\n        balance += escrow.totalAmount;\n      }\n    }\n  }\n\n  /**\n   * @notice Gets the Foundation market address which has permissions to manage lockups.\n   * @return market The Foundation market contract address.\n   */\n  function getFoundationMarket() external view returns (address market) {\n    return foundationMarket;\n  }\n\n  /**\n   * @notice Returns the balance and each outstanding (unexpired) lockup bucket for an account, grouped by expiry.\n   * @dev `expires.length` == `amounts.length`\n   * and `amounts[i]` is the number of tokens which will expire at `expires[i]`.\n   * The results returned are sorted by expiry, with the earliest expiry date first.\n   * @param account The account to query the locked balance of.\n   * @return expiries The time at which each outstanding lockup bucket expires.\n   * @return amounts The number of FETH tokens which will expire for each outstanding lockup bucket.\n   */\n  function getLockups(address account) external view returns (uint256[] memory expiries, uint256[] memory amounts) {\n    AccountInfo storage accountInfo = accountToInfo[account];\n\n    // Count lockups\n    uint256 lockedCount;\n    // The number of buckets is always < 256 bits.\n    unchecked {\n      for (uint256 escrowIndex = accountInfo.lockupStartIndex; ; ++escrowIndex) {\n        LockedBalance.Lockup memory escrow = accountInfo.lockups.get(escrowIndex);\n        if (escrow.expiration == 0) {\n          break;\n        }\n        if (escrow.expiration >= block.timestamp && escrow.totalAmount > 0) {\n          // Lockup count will never overflow 256 bits.\n          ++lockedCount;\n        }\n      }\n    }\n\n    // Allocate arrays\n    expiries = new uint256[](lockedCount);\n    amounts = new uint256[](lockedCount);\n\n    // Populate results\n    uint256 i;\n    // The number of buckets is always < 256 bits.\n    unchecked {\n      for (uint256 escrowIndex = accountInfo.lockupStartIndex; ; ++escrowIndex) {\n        LockedBalance.Lockup memory escrow = accountInfo.lockups.get(escrowIndex);\n        if (escrow.expiration == 0) {\n          break;\n        }\n        if (escrow.expiration >= block.timestamp && escrow.totalAmount > 0) {\n          expiries[i] = escrow.expiration;\n          amounts[i] = escrow.totalAmount;\n          ++i;\n        }\n      }\n    }\n  }\n\n  /**\n   * @notice Returns the total balance of an account, including locked FETH tokens.\n   * @dev Use `balanceOf` to get the number of tokens available for transfer or withdrawal.\n   * @param account The account to query the total balance of.\n   * @return balance The total FETH balance tracked for this account.\n   */\n  function totalBalanceOf(address account) external view returns (uint256 balance) {\n    AccountInfo storage accountInfo = accountToInfo[account];\n    balance = accountInfo.freedBalance;\n\n    // Total ETH cannot realistically overflow 96 bits and escrowIndex will always be < 256 bits.\n    unchecked {\n      // Add all lockups\n      for (uint256 escrowIndex = accountInfo.lockupStartIndex; ; ++escrowIndex) {\n        LockedBalance.Lockup memory escrow = accountInfo.lockups.get(escrowIndex);\n        if (escrow.expiration == 0) {\n          break;\n        }\n        balance += escrow.totalAmount;\n      }\n    }\n  }\n\n  /**\n   * @notice Returns the total amount of ETH locked in this contract.\n   * @return supply The total amount of ETH locked in this contract.\n   */\n  function totalSupply() external view returns (uint256 supply) {\n    /* It is possible for this to diverge from the total token count by transferring ETH on self destruct\n       but this is on-par with the WETH implementation and done for gas savings. */\n    return address(this).balance;\n  }\n}"
}