Links

PoolLens

PoolLensV1

Properties
Methods

Properties

sdk

The sdk instance used by the lens.
Type: MarketSDK

contract

The raw web3 contract instance for the lens.

address

Contract address of the lens.
Type: string

Methods

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

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

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

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

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

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

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

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

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

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

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

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
Methods

Properties

sdk

The sdk instance used by the lens.
Type: MarketSDK

contract

The raw web3 contract instance for the lens.

address

Contract address of the lens.
Type: string

Methods

directory

Parameters:
  • tx?: NonPayableTx - The transaction info object for making the transaction with.
Returns: Promise<PoolDirectory>

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

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

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

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

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[] }>