MorphoGetters
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
Name | Type | Description |
---|---|---|
user | address | The address of the user to get the liquidity data for. |
Returns
Name | Type | Description |
---|---|---|
<none> | Types.LiquidityData | The 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
Name | Type | Description |
---|---|---|
underlying | address | The address of the underlying asset. |
position | Types.Position | The position type, either pool or peer-to-peer and either supply or borrow. |
user | address |
Returns
Name | Type | Description |
---|---|---|
<none> | address | The 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
Name | Type | Description |
---|---|---|
underlying | address | The address of the underlying asset. |
position | Types.Position | The position type, either pool or peer-to-peer and either supply or borrow. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The buckets mask of the corresponding market side. |