IonLens

Git Source

Inherits: IIonLens

State Variables

IonPoolStorageLocation

bytes32 private constant IonPoolStorageLocation = 0xceba3d526b4d5afd91d1b752bf1fd37917c20a6daf576bcb41dd1c57c1f67e00;

EXTSLOAD_SELECTOR

bytes4 private constant EXTSLOAD_SELECTOR = 0x1e2eaeaf;

Functions

constructor

constructor();

_getIonPoolStorage

function _getIonPoolStorage() internal pure returns (IonPoolStorage storage $);

_toUint256PointerMapping

function _toUint256PointerMapping(mapping(bytes32 => uint256) storage inPtr)
    private
    pure
    returns (mapping(address => StorageSlot.Uint256Slot) storage outPtr);

queryPoolSlot

function queryPoolSlot(IIonPool pool, uint256 slot) public view returns (uint256 value);

ilkCount

function ilkCount(IIonPool pool) external view returns (uint256);

Returns

getIlkIndex

function getIlkIndex(IIonPool pool, address ilkAddress) external view returns (uint8);

Returns

totalNormalizedDebt

function totalNormalizedDebt(IIonPool pool, uint8 ilkIndex) external view returns (uint256);

Returns

rateUnaccrued

function rateUnaccrued(IIonPool pool, uint8 ilkIndex) external view returns (uint256);

Returns

lastRateUpdate

function lastRateUpdate(IIonPool pool, uint8 ilkIndex) external view returns (uint256);

Returns

spot

function spot(IIonPool pool, uint8 ilkIndex) external view returns (address);

Returns

debtCeiling

function debtCeiling(IIonPool pool, uint8 ilkIndex) external view returns (uint256);

Returns

dust

function dust(IIonPool pool, uint8 ilkIndex) external view returns (uint256);

Returns

gem

function gem(IIonPool pool, uint8 ilkIndex, address user) external view returns (uint256);

Returns

unbackedDebt

function unbackedDebt(IIonPool pool, address unbackedDebtor) external view returns (uint256);

Returns

isOperator

function isOperator(IIonPool pool, address user, address operator) external view returns (bool);

Returns

debtUnaccrued

function debtUnaccrued(IIonPool pool) public view returns (uint256);

debt

This includes unbacked debt.

function debt(IIonPool pool) external view returns (uint256);

Returns

liquidity

function liquidity(IIonPool pool) external view returns (uint256);

Returns

supplyCap

function supplyCap(IIonPool pool) external view returns (uint256);

Returns

totalUnbackedDebt

function totalUnbackedDebt(IIonPool pool) external view returns (uint256);

Returns

interestRateModule

function interestRateModule(IIonPool pool) external view returns (address);

Returns

whitelist

function whitelist(IIonPool pool) external view returns (address);

Errors

SloadFailed

error SloadFailed();

InvalidFieldSlot

error InvalidFieldSlot();

Structs

Ilk

struct Ilk {
    IlkSlot0 slot0;
    StorageSlot.AddressSlot spot;
    StorageSlot.Uint256Slot debtCeiling;
    StorageSlot.Uint256Slot dust;
}

Vault

struct Vault {
    StorageSlot.Uint256Slot collateral;
    StorageSlot.Uint256Slot normalizedDebt;
}

IonPoolStorage

struct IonPoolStorage {
    Ilk[] ilks;
    EnumerableSet.AddressSet ilkAddresses;
    mapping(uint256 ilkIndex => mapping(address user => Vault)) vaults;
    mapping(uint256 ilkIndex => mapping(address user => StorageSlot.Uint256Slot)) gem;
    mapping(address unbackedDebtor => StorageSlot.Uint256Slot) unbackedDebt;
    mapping(address user => mapping(address operator => StorageSlot.Uint256Slot)) isOperator;
    StorageSlot.Uint256Slot debt;
    StorageSlot.Uint256Slot liquidity;
    StorageSlot.Uint256Slot supplyCap;
    StorageSlot.Uint256Slot totalUnbackedDebt;
    StorageSlot.AddressSlot interestRateModule;
    StorageSlot.AddressSlot whitelist;
}