PoolDirectory
Properties
sdk
sdk
The sdk instance used by the directory.
Type: MarketSDK
contract
contract
The raw web3 contract instance for the directory.
Type: web3.eth.Contract
address
address
Contract address of the directory.
Type: string
Methods
_setDeployerWhitelistEnforcement
_setDeployerWhitelistEnforcement
Controls if the deployer whitelist is to be enforced.
Parameters:
enforceDeployerWhitelist: boolean
- Boolean indicating if the deployer whitelist is to be enforced.tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<
TransactionReceipt
>
_whitelistDeployers
_whitelistDeployers
Adds Ethereum accounts to the deployer whitelist.
Parameters:
deployers: string[]
- Array of Ethereum accounts to be whitelisted.tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<
TransactionReceipt
>
bookmarkPool
bookmarkPool
Bookmarks a pool Unitroller (Comptroller proxy) contract addresses.
Parameters:
comptroller: string |
Comptroller
- The pool Unitroller to bookmark.tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<
TransactionReceipt
>
deployPool
deployPool
Deploys a new pool and adds it
to the directory.
Parameters:
name: string
- The name of the pool.implementation: string
- The Comptroller implementation contract address.enforceWhitelist: boolean
- Boolean indicating if the pool's supplier/borrow whitelist is to be enforced.closeFactor: number | string | BN
- The pool's close factor (scaled by 1e18).maxAssets: number | string | BN
- Maximum number of assets in the pool.iquidationIncentive: number | string | BN
- The pool's liquidation incentive (scaled by 1e18).priceOracle: string
- The pool's PriceOracle contract address.tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<
TransactionReceipt
>
deployerWhitelist
deployerWhitelist
Maps Ethereum accounts to booleans indicating if they are allowed to deploy pools.
Parameters:
deployer: string
- Deployer address to get the whitelist status of.tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<boolean>
enforceDeployerWhitelist
enforceDeployerWhitelist
Returns a boolean indicating if the deployer whitelist is enforced.
Parameters:
tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<boolean>
getAllPools
getAllPools
Returns arrays of all Fuse pools' data.
Parameters:
tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<
Pool
[]>
getBookmarks
getBookmarks
Returns arrays of Fuse pool Unitroller (Comptroller proxy) contract addresses bookmarked by account
.
Parameters:
account: string
- The account to get the bookmarks of.tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<string[]>
getPoolsByAccount
getPoolsByAccount
Returns arrays of Fuse pool indexes and data created by account
.
Parameters:
account: string
- The account to get the created pools of.tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<
indexes: BN[];
pools:
Pool
[];
>
getPublicPools
getPublicPools
Returns arrays of all public Fuse pool indexes and data.
Parameters:
tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<
indexes: BN[];
pools:
Pool
[];
>
initialize
initialize
Initializes a deployer whitelist if desired.
Parameters:
_enforceDeployerWhitelist: boolean
- Boolean indicating if the deployer whitelist is to be enforced._deployerWHitelist: string []
- Array of Ethereum accounts to be whitelisted.tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<
TransactionReceipt
>
owner
owner
Returns the address of the current owner.
Parameters:
tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<string>
poolExists
poolExists
Maps Fuse pool Comptroller addresses to bools indicating if they have been posted to the directory.
Parameters:
comptroller: string |
Comptroller
- The comptroller to check for.tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<boolean>
pools
pools
Returns pool by poold.
Parameters:
poolId: string | number | BN
- ID of the pool to fetch.tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<
Pool
>
registerPool
registerPool
Adds a new Fuse pool to the directory.
Parameters:
name: string
- The name of the pool.comptroller: string
- The pool's Comptroller proxy contract address.tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<
TransactionReceipt
>
renounceOwnership
renounceOwnership
Leaves the contract without owner.
Parameters:
tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<
TransactionReceipt
>
setPoolName
setPoolName
Changes the name of a pool.
Parameters:
poolId: number | string | BN
- Id of the pool to change the name of.newName: string
- the new name for the pool.tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<
TransactionReceipt
>
transferOwnership
transferOwnership
Transfers ownership of the contract to a new account.
Parameters:
newOwner: string
- The account to transfer the ownership to.tx?:
NonPayableTx
- The transaction info object for making the transaction with.
Returns: Promise<
TransactionReceipt
>
Last updated