MorphoGetters

Git Source

Inherits: IMorphoGetters, MorphoInternal

Author: Morpho Labs

Abstract contract exposing all accessible getters.

Functions

DOMAIN_SEPARATOR

Returns the domain separator of the EIP712.

function DOMAIN_SEPARATOR() external view returns (bytes32);

pool

Returns the pool address.

function pool() external view returns (address);

addressesProvider

Returns the addresses provider address.

function addressesProvider() external view returns (address);

eModeCategoryId

Returns the e-mode category ID of Morpho on the Aave protocol.

function eModeCategoryId() external view returns (uint256);

market

Returns the market data.

function market(address underlying) external view returns (Types.Market memory);

marketsCreated

Returns the list of the markets created.

function marketsCreated() external view returns (address[] memory);

scaledPoolSupplyBalance

Returns the scaled balance of user on the underlying market, supplied on pool (with underlying decimals).

function scaledPoolSupplyBalance(address underlying, address user) external view returns (uint256);

scaledP2PSupplyBalance

Returns the scaled balance of user on the underlying market, supplied peer-to-peer (with underlying decimals).

function scaledP2PSupplyBalance(address underlying, address user) external view returns (uint256);

scaledPoolBorrowBalance

Returns the scaled balance of user on the underlying market, borrowed from pool (with underlying decimals).

function scaledPoolBorrowBalance(address underlying, address user) external view returns (uint256);

scaledP2PBorrowBalance

Returns the scaled balance of user on the underlying market, borrowed peer-to-peer (with underlying decimals).

function scaledP2PBorrowBalance(address underlying, address user) external view returns (uint256);

scaledCollateralBalance

Returns the scaled balance of user on the underlying market, supplied on pool & used as collateral (with underlying decimals).

function scaledCollateralBalance(address underlying, address user) external view returns (uint256);

supplyBalance

Returns the total supply balance of user on the underlying market (in underlying).

function supplyBalance(address underlying, address user) external view returns (uint256);

borrowBalance

Returns the total borrow balance of user on the underlying market (in underlying).

function borrowBalance(address underlying, address user) external view returns (uint256);

collateralBalance

Returns the supply collateral balance of user on the underlying market (in underlying).

function collateralBalance(address underlying, address user) external view returns (uint256);

userCollaterals

Returns the list of collateral underlyings of user.

function userCollaterals(address user) external view returns (address[] memory);

userBorrows

Returns the list of borrowed underlyings of user.

function userBorrows(address user) external view returns (address[] memory);

isManagedBy

Returns whether manager is a manager of delegator.

function isManagedBy(address delegator, address manager) external view returns (bool);

userNonce

Returns the nonce of user for the manager approval signature.

function userNonce(address user) external view returns (uint256);

defaultIterations

Returns the default iterations.

function defaultIterations() external view returns (Types.Iterations memory);

positionsManager

Returns the address of the positions manager.

function positionsManager() external view returns (address);

rewardsManager

Returns the address of the rewards manager.

function rewardsManager() external view returns (address);

treasuryVault

Returns the address of the treasury vault.

function treasuryVault() external view returns (address);

isClaimRewardsPaused

Returns whether the claim rewards is paused or not.

function isClaimRewardsPaused() external view returns (bool);

updatedIndexes

Returns the updated indexes (peer-to-peer and pool).

function updatedIndexes(address underlying) external view returns (Types.Indexes256 memory indexes);

liquidityData

Returns the liquidity data about the position of user.

function liquidityData(address user) external view returns (Types.LiquidityData memory);

Parameters

NameTypeDescription
useraddressThe address of the user to get the liquidity data for.

Returns

NameTypeDescription
<none>Types.LiquidityDataThe liquidity data of the user.

getNext

Returns the account after user in the same bucket of the corresponding market side.

Input address zero to get the head of the bucket.

function getNext(address underlying, Types.Position position, address user) external view returns (address);

Parameters

NameTypeDescription
underlyingaddressThe address of the underlying asset.
positionTypes.PositionThe position type, either pool or peer-to-peer and either supply or borrow.
useraddress

Returns

NameTypeDescription
<none>addressThe address of the next account in the data structure.

getBucketsMask

Returns the buckets mask of the corresponding market side.

function getBucketsMask(address underlying, Types.Position position) external view returns (uint256);

Parameters

NameTypeDescription
underlyingaddressThe address of the underlying asset.
positionTypes.PositionThe position type, either pool or peer-to-peer and either supply or borrow.

Returns

NameTypeDescription
<none>uint256The buckets mask of the corresponding market side.