Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "comptroller"

Index

Functions

enterMarkets

  • enterMarkets(markets?: string | string[], options?: CallOptions): Promise<TrxResponse>
  • Enters the user's address into Fortress Protocol markets.

    example
    const fortress = new Fortress(window.ethereum);
    
    (async function () {
      const trx = await fortress.enterMarkets(Fortress.DAI); // Use [] for multiple
      console.log('Ethers.js transaction object', trx);
    })().catch(console.error);

    Parameters

    • Default value markets: string | string[] = []

      An array of strings of markets to enter, meaning use those supplied assets as collateral.

    • Default value options: CallOptions = {}

    Returns Promise<TrxResponse>

    Returns an Ethers.js transaction object of the enterMarkets transaction.

exitMarket

  • exitMarket(market: string, options?: CallOptions): Promise<TrxResponse>
  • Exits the user's address from a Fortress Protocol market.

    example
    const fortress = new Fortress(window.ethereum);
    
    (async function () {
      const trx = await fortress.exitMarket(Fortress.DAI);
      console.log('Ethers.js transaction object', trx);
    })().catch(console.error);

    Parameters

    • market: string

      A string of the symbol of the market to exit.

    • Default value options: CallOptions = {}

    Returns Promise<TrxResponse>

    Returns an Ethers.js transaction object of the exitMarket transaction.