BTokenInterface

Overview

License: MIT

abstract contract BTokenInterface is BTokenStorage

Events info

AccrueInterest

event AccrueInterest(uint256 cashPrior, uint256 interestAccumulated, uint256 borrowIndex, uint256 totalBorrows)

Event emitted when interest is accrued

Mint

event Mint(address minter, uint256 mintAmount, uint256 mintTokens)

Event emitted when tokens are minted

Redeem

event Redeem(address redeemer, uint256 redeemAmount, uint256 redeemTokens)

Event emitted when tokens are redeemed

Borrow

event Borrow(address borrower, uint256 borrowAmount, uint256 accountBorrows, uint256 totalBorrows)

Event emitted when underlying is borrowed

RepayBorrow

event RepayBorrow(address payer, address borrower, uint256 repayAmount, uint256 accountBorrows, uint256 totalBorrows)

Event emitted when a borrow is repaid

LiquidateBorrow

event LiquidateBorrow(address liquidator, address borrower, uint256 repayAmount, address cTokenCollateral, uint256 seizeTokens)

Event emitted when a borrow is liquidated

NewPendingAdmin

event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin)

Event emitted when pendingAdmin is changed

NewAdmin

event NewAdmin(address oldAdmin, address newAdmin)

Event emitted when pendingAdmin is accepted, which means admin is updated

NewBondtroller

event NewBondtroller(Bondtroller oldBondtroller, Bondtroller newBondtroller)

Event emitted when bondtroller is changed

NewMarketInterestRateModel

event NewMarketInterestRateModel(InterestRateModel oldInterestRateModel, InterestRateModel newInterestRateModel)

Event emitted when interestRateModel is changed

NewReserveFactor

event NewReserveFactor(uint256 oldReserveFactorMantissa, uint256 newReserveFactorMantissa)

Event emitted when the reserve factor is changed

ReservesAdded

event ReservesAdded(address benefactor, uint256 addAmount, uint256 newTotalReserves)

Event emitted when the reserves are added

ReservesReduced

event ReservesReduced(address admin, uint256 reduceAmount, uint256 newTotalReserves)

Event emitted when the reserves are reduced

Transfer

event Transfer(address indexed from, address indexed to, uint256 amount)

EIP20 Transfer event

Approval

event Approval(address indexed owner, address indexed spender, uint256 amount)

EIP20 Approval event

Constants info

isCToken (0xfe9c44ae)

bool constant isCToken = true

Indicator that this is a CToken contract (for inspection)

Functions info

transfer (0xa9059cbb)

function transfer(address dst, uint256 amount) external virtual returns (bool)

Failure event

transferFrom (0x23b872dd)

function transferFrom(
    address src,
    address dst,
    uint256 amount
) external virtual returns (bool)

approve (0x095ea7b3)

function approve(
    address spender,
    uint256 amount
) external virtual returns (bool)

allowance (0xdd62ed3e)

function allowance(
    address owner,
    address spender
) external view virtual returns (uint256)

balanceOf (0x70a08231)

function balanceOf(address owner) external view virtual returns (uint256)

balanceOfUnderlying (0x3af9e669)

function balanceOfUnderlying(address owner) external virtual returns (uint256)

getAccountSnapshot (0xc37f68e2)

function getAccountSnapshot(
    address account
) external view virtual returns (uint256, uint256, uint256, uint256)

borrowRatePerBlock (0xf8f9da28)

function borrowRatePerBlock() external view virtual returns (uint256)

supplyRatePerBlock (0xae9d70b0)

function supplyRatePerBlock() external view virtual returns (uint256)

totalBorrowsCurrent (0x73acee98)

function totalBorrowsCurrent() external virtual returns (uint256)

borrowBalanceCurrent (0x17bfdfbc)

function borrowBalanceCurrent(
    address account
) external virtual returns (uint256)

borrowBalanceStored (0x95dd9193)

function borrowBalanceStored(
    address account
) public view virtual returns (uint256)

exchangeRateCurrent (0xbd6d894d)

function exchangeRateCurrent() public virtual returns (uint256)

exchangeRateStored (0x182df0f5)

function exchangeRateStored() public view virtual returns (uint256)

getCash (0x3b1d21a2)

function getCash() external view virtual returns (uint256)

accrueInterest (0xa6afed95)

function accrueInterest() public virtual returns (uint256)

_setBondtroller (0xb4ac7688)

function _setBondtroller(
    Bondtroller newBondtroller
) public virtual returns (uint256)

_setReserveFactor (0xfca7820b)

function _setReserveFactor(
    uint256 newReserveFactorMantissa
) external virtual returns (uint256)

_reduceReserves (0x601a0bf1)

function _reduceReserves(
    uint256 reduceAmount
) external virtual returns (uint256)

_setInterestRateModel (0xf2b3abbd)

function _setInterestRateModel(
    InterestRateModel newInterestRateModel
) public virtual returns (uint256)

Last updated