PoolLens
PoolLensV1
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
getPoolAssetsWithData
getPoolAssetsWithData
Parameters:
comptroller:
Comptroller
| string
- The comptroller contract of the pool.tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<
PoolAsset
[]>
getPoolOwnership
getPoolOwnership
Parameters:
comptroller:
Comptroller
| string
- The comptroller contract of the pool.tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<{
comptrollerAdmin: string,
comptrollerAdminHasRights: boolean,
comptrollerFuseAdminHasRights: boolean,
outliners: CTokenOwnership[]
}>
getPoolSummary
getPoolSummary
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[]
}>
getPoolUserSummmary
getPoolUserSummmary
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
}>
getPoolsByAccountWithData
getPoolsByAccountWithData
Parameters:
account: string
- Account address to filter the pools info by.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[]
}>
getPoolsBySupplier
getPoolsBySupplier
Parameters:
supplier: string
- - Supplier address to filter the pools info by.tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<{
indexes: BN[],
accountPools:
Pool
[]
}>
getPoolsBySupplierWithData
getPoolsBySupplierWithData
Parameters:
supplier: string
- - Supplier address to filter the pools info by.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[]
}>
getPublicPoolUsersWithData
getPublicPoolUsersWithData
Parameters:
maxHealth: number | string | BN
-tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<{
comptrollers: string[],
users:
PoolUser
[][],
closeFactors: BN[],
liquidationIncentives: BN[],
errored: boolean[]
}>
getPublicPoolsWithData
getPublicPoolsWithData
Parameters:
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[]
}>
getUserSummary
getUserSummary
Parameters:
account: string
- - Account address to get the summary of.tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<{
supplyBalance: BN,
borrowBalance: BN
}>
getWhitelistedPoolsByAccount
getWhitelistedPoolsByAccount
Parameters:
acount: string
- Account address to filter the pools info by.tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<{
indexes: BN[],
accountPools:
Pool
[]
}>
getWhitelistedPoolsByAccountWithData
getWhitelistedPoolsByAccountWithData
Parameters:
accout: string
- - Account address to filter the pools info by.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[]
}>
PoolLensV2
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
directory
directory
Parameters:
tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<
PoolDirectory
>
getPoolOwnership
getPoolOwnership
Parameters:
comptroller:
Comptroller
| string
- The comptroller contract of the pool.tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<{
comptrollerAdmin: string,
comptrollerAdminHasRights: boolean,
comptrollerFuseAdminHasRights: boolean,
outliners: CTokenOwnership[]
}>
getPoolSummary
getPoolSummary
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[]
}>
getPoolsWithData
getPoolsWithData
Parameters:
indexes: (number | string | BN)[]
-pools:
Pool
[]
- Pools to filter.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[]
}>
getPublicPoolsWithData
getPublicPoolsWithData
Parameters:
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[]
}>
getWhitelistedPoolsByAccount
getWhitelistedPoolsByAccount
Parameters:
account: string
- Account address to filter the pools info by.tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<{
indexes: BN[],
accountPools:
Pool
[]
}>
Last updated