Skip to content

DexUserViews ​

Git Source

Inherits:Variables, Structs, DexConstantsViews, DexPublicViews

Functions ​

getUserSupplyData ​

Get user supply data for a specific DEX and user

solidity
function getUserSupplyData(address dex_, address user_) public view returns (UserSupplyData memory userSupplyData_);

Parameters

NameTypeDescription
dex_addressThe address of the DEX
user_addressThe address of the user

Returns

NameTypeDescription
userSupplyData_UserSupplyDataStruct containing user supply data

getUserSupplyDatas ​

Get user supply data for multiple users in a specific DEX

solidity
function getUserSupplyDatas(address dex_, address[] calldata users_)
    public
    view
    returns (UserSupplyData[] memory userSuppliesData_);

Parameters

NameTypeDescription
dex_addressThe address of the DEX
users_address[]Array of user addresses

Returns

NameTypeDescription
userSuppliesData_UserSupplyData[]Array of UserSupplyData structs for each user

getUserBorrowData ​

Get user borrow data for a specific DEX and user

solidity
function getUserBorrowData(address dex_, address user_) public view returns (UserBorrowData memory userBorrowData_);

Parameters

NameTypeDescription
dex_addressThe address of the DEX
user_addressThe address of the user

Returns

NameTypeDescription
userBorrowData_UserBorrowDataStruct containing user borrow data

getUserBorrowDatas ​

Get user borrow data for multiple users in a specific DEX

solidity
function getUserBorrowDatas(address dex_, address[] calldata users_)
    public
    view
    returns (UserBorrowData[] memory userBorrowingsData_);

Parameters

NameTypeDescription
dex_addressThe address of the DEX
users_address[]Array of user addresses

Returns

NameTypeDescription
userBorrowingsData_UserBorrowData[]Array of UserBorrowData structs for each user

getUserBorrowSupplyDatas ​

Get both user supply and borrow data for multiple users in a specific DEX

solidity
function getUserBorrowSupplyDatas(address dex_, address[] calldata users_)
    public
    view
    returns (UserSupplyData[] memory userSuppliesData_, UserBorrowData[] memory userBorrowingsData_);

Parameters

NameTypeDescription
dex_addressThe address of the DEX
users_address[]Array of user addresses

Returns

NameTypeDescription
userSuppliesData_UserSupplyData[]Array of UserSupplyData structs for each user
userBorrowingsData_UserBorrowData[]Array of UserBorrowData structs for each user