Links

MarketAdmin

Properties

Properties

sdk

The sdk instance used by the market admin.
Type: MarketSDK

contract

The raw web3 contract instance for the market admin.

address

Contract address of the market admin.
Type: string

Methods

acceptAdmin

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

addRewardsDistrubutor

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

comptroller

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

deployMarket

Deploys a cToken directory into comptroller.
Parameters:
  • deployData: DeployMarketData - An object with all the values needed for deployment.
  • tx?: NonPayableTx - The transaction info object for making the transaction with.
Returns: Promise<TransactionReceipt>

isMarketAdmin

Returns whether the contract is a MarketAdmin contract.
Parameters:
  • tx?: NonPayableTx - The transaction info object for making the transaction with.
Returns: Promise<boolean>

owner

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

reduceReserves

Reduces reserves from a cToken.
Parameters:
  • cToken: string - The cToken to reduce reserves from.
  • reduceAmount: number | string | BN - The amount to reduce.
  • to: string - The account to transfer funds to.
  • tx?: NonPayableTx - The transaction info object for making the transaction with.
Returns: Promise<TransactionReceipt>

renounceOwnership

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

setAdminFee

Sets the admin fee for a cToken.
Parameters:
  • cToken: string - The cToken to set the admin fee of.
  • newAdminFeeMantissa: number | string | BN - new admin fee for the cToken.
  • tx?: NonPayableTx - The transaction info object for making the transaction with.
Returns: Promise<TransactionReceipt>

setBorrowCaps

Sets borrow caps for the given cTokens.
Parameters:
  • cTokens: string[] - The addresses of the cTokens.
  • newBorrowCaps: (number | string | BN)[] - The new borrow caps for the tokens.
  • tx?: NonPayableTx - The transaction info object for making the transaction with.
Returns: Promise<TransactionReceipt>

setCTokenActionState

Sets the borrow/mint pause state for the given cToken.
Parameters:
  • cToken: string - The cToken to update the state of.
  • action: CTokenActions - The cToken action to update the state of.
  • state: boolean - The new state for the given action and cToken.
  • tx?: NonPayableTx - The transaction info object for making the transaction with.
Returns: Promise<TransactionReceipt>

setCloseFactor

Sets the close factor for a comptroller.
Parameters:
  • newCLoseFactorMantissa: number | string | BN - New close factor.
  • tx?: NonPayableTx - The transaction info object for making the transaction with.
Returns: Promise<TransactionReceipt>

setCollateralFactor

Sets collateral factor for a cToken.
Parameters:
  • cToken: string - The cToken to update the collateral factor of.
  • newCollateralFactorMantissa: number | string | BN - New collateral factor.
  • tx?: NonPayableTx - The transaction info object for making the transaction with.
Returns: Promise<TransactionReceipt>

setGlobalActionState

Updates the state of transfer/seize pause.
Parameters:
  • action: GlobalActions - The action to update the state of.
  • state: boolean - New state for the selected action.
  • tx?: NonPayableTx - The transaction info object for making the transaction with.
Returns: Promise<TransactionReceipt>

setIRM

Updates the interest rate model for a particular cToken.
Parameters:
  • cToken: string - The cToken to update the interest rate model of.
  • newIRM: string - New IRM address.
  • tx?: NonPayableTx - The transaction info object for making the transaction with.
Returns: Promise<TransactionReceipt>

setLiquidationIncentive

Updates liquidation incentive of the comptroller.
Parameters:
  • newLiquidationIncentive: number | string | BN - New liquidation incentive for the comptroller.
  • tx?: NonPayableTx - The transaction info object for making the transaction with.
Returns: Promise<TransactionReceipt>

setNameAndSymbol

Updates the name of symbol for a particular cToken.
Parameters:
  • cToken: string - The cToken to update the name or symbol of.
  • name: string - New name for the cToken.
  • symbol: string - New symbol for the cToken.
  • tx?: NonPayableTx - The transaction info object for making the transaction with.
Returns: Promise<TransactionReceipt>

setPriceOracle

Updates the price oracle of the comptroller.
Parameters:
  • newOracle: string - New price oracle address.
  • tx?: NonPayableTx - The transaction info object for making the transaction with.
Returns: Promise<TransactionReceipt>

setReserveFactor

Updates the reserve factor for a particular cToken.
Parameters:
  • cToken: string - The cToken to update the reserve factor of.
  • newReserveFactor: number | string | BN - New reserve factor for the cToken.
  • tx?: NonPayableTx - The transaction info object for making the transaction with.
Returns: Promise<TransactionReceipt>

setSupplyCaps

Updates supply caps for particular cTokens.
Parameters:
  • cToken: string[] - A list of cTokens to update the supply caps of.
  • newSupplyCaps: (number | string | BN)[] - New supply caps for the cTokens.
  • tx?: NonPayableTx - The transaction info object for making the transaction with.
Returns: Promise<TransactionReceipt>

setWhitelistEnforcement

Updates enforcement status for the comptroller whitelist.
Parameters:
  • enforce: boolean - The new enforcement status for the whitelist.
  • tx?: NonPayableTx - The transaction info object for making the transaction with.
Returns: Promise<TransactionReceipt>

setWhitelistStatuses

Updates supplier statuses in the whitelist.
Parameters:
  • suppliers: string[] - The list of suppliers to update the statuses of.
  • statuses: boolean[] - New statuses for the suppliers.
  • tx?: NonPayableTx - The transaction info object for making the transaction with.
Returns: Promise<TransactionReceipt>

supportMarket

Adds a new cToken to the market.
Parameters:
  • cToken: string - Address of the new cToken to add.
  • tx?: NonPayableTx - The transaction info object for making the transaction with.
Returns: Promise<TransactionReceipt>

transferOwnership

Transfers contract ownership to a different account.
Parameters:
  • newOwner: string - New owner of the contract.
  • tx?: NonPayableTx - The transaction info object for making the transaction with.
Returns: Promise<TransactionReceipt>

unsupportMarket

Removes a cToken from the market.
Parameters:
  • cToken: string - The cToken to remove from the market.
  • tx?: NonPayableTx - The transaction info object for making the transaction with.
Returns: Promise<TransactionReceipt>

withdrawAdminFees

Withdraws admin fee from the cToken.
Parameters:
  • cToken: string - The cToken to withdraw admin fee of.
  • withdrawAmount: number | string | BN - The amount of fee to withdraw.
  • to: string - The address to send the withdraw amount to.
  • tx?: NonPayableTx - The transaction info object for making the transaction with.
Returns: Promise<TransactionReceipt>