MarketLens
Properties
sdk
sdk
The sdk instance used by the lens.
Type: MarketSDK
contract
contract
The raw web3 contract instance for the lens.
Type: web3.eth.Contract
address
address
Contract address of the lens.
Type: string
Methods
getAllPoolsLength
getAllPoolsLength
Returns the number of pools in a directory.
Parameters:
directory: string
- Address of the pool directory.
Returns: string
getPoolAssetsWithData
getPoolAssetsWithData
Returns the list of all assets in the pool.
Parameters:
comptroller:
Comptroller
| string
- The comptroller contract of the pool.tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<
PoolAsset
[]>
getPoolSummary
getPoolSummary
Returns summary of the pool.
Parameters:
comptroller:
Comptroller
| string
- The comptroller contract of the pool.tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<{
totalSupply: BN,
totalBorrow: BN
underlyingTokens: string[],
underlyingSymbols:: string[]
}>
getPoolUserSummary
getPoolUserSummary
Returns summary of a user of the given pool.
Parameters:
comptroller:
Comptroller
| string
- The comptroller contract of the pool.account: string
- The user address to get the summary of.tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<{
supplyBalance: BN,
borrowBalance: BN
}>
getPoolUsersWithData
getPoolUsersWithData
Returns a list of all users with health under maxHealth
for the given pool.
Parameters:
comptroller:
Comptroller
| string
- The comptroller contract of the pool.maxHealth:: number | string | BN
- Max health of the users.tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<[
PoolUser[],
BN,
BN,
]>
getPublicPoolsWithData
getPublicPoolsWithData
Returns a list of all public pools inside the directory.
Parameters:
directory: string
- Pool directory of the pools.tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<{
indexes: BN[];
pools: Pool[];
totalSupply: BN[];
totalBorrow: BN[];
underlyingTokens: string[][];
underlyingSymbols: string[][];
errored: boolean[];
}>
wrappedNative
wrappedNative
Returns the address of wrapped native token of the network.
Parameters:
tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: string
Last updated