Versions in this module Expand all Collapse all v1 v1.0.0 Dec 12, 2019 Changes in this version + const CompoundBAT + const CompoundDAI + const CompoundETH + const CompoundREP + const CompoundSAI + const CompoundUSDC + const CompoundWBTC + const CompoundZRX + const Comptroller + const Unitroller + var CompoundTokens = map[string]Address + type Address string + func (a Address) EthAddress() common.Address + func (a Address) String() string + type BClient struct + func NewBClient(auth *bind.TransactOpts, client *ethclient.Client) *BClient + func (bc *BClient) Borrow(ctx context.Context, address Address, borrowAmount *big.Int) error + func (bc *BClient) CanLiquidate(ctx context.Context, account common.Address) (bool, error) + func (bc *BClient) GetBorrowRate(ctx context.Context, address Address) (*big.Int, error) + func (bc *BClient) GetLiqd(ctx context.Context, borrowToken Address, opts LiquidateOpts) error + type Client struct + func NewClient(url string) *Client + func (c *Client) GetAccount(address string) (*models.AccountResponse, error) + func (c *Client) GetAccounts() (*models.AccountResponse, error) + func (c *Client) GetBorrowInterestedAccrued(token Address, resp *models.AccountResponse) (string, error) + func (c *Client) GetCToken(address string) (*models.CTokenResponse, error) + func (c *Client) GetCTokens() (*models.CTokenResponse, error) + func (c *Client) GetLiquidatableAccounts() (map[string]float64, error) + func (c *Client) GetSupplyInterestEarned(token Address, resp *models.AccountResponse) (float64, error) + func (c *Client) GetTotalBorrowValueInEth(address string) (float64, error) + func (c *Client) GetTotalCollateralValueInEth(address string) (float64, error) + func (c *Client) GetTotalSupplyInterestedEarned(resp *models.AccountResponse) (float64, error) + func (c *Client) WatchHealth(ctx context.Context, address string, riskChan, warnChan chan float64) error + type LiquidateOpts struct + Borrower common.Address + CTokenCollateral Address + RepayAmount *big.Int