if_ctrl

package
v0.0.0-...-29f768c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2020 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountLiquidity

type AccountLiquidity struct {
	Liquidity *big.Int
	Shortfall *big.Int
}

func DeserializeAccountLiquidity

func DeserializeAccountLiquidity(data []byte) (*AccountLiquidity, error)

type Comptroller

type Comptroller struct {
	Sdk    *ontSDK.OntologySdk
	Signer *ontSDK.Account
	Addr   common.Address

	GasPrice uint64
	GasLimit uint64
}

func NewComptroller

func NewComptroller(nodeRPCAddr string, contractAddr string, signer *ontSDK.Account, gasPrice,
	gasLimit uint64) (*Comptroller, error)

func (*Comptroller) AcceptAdmin

func (this *Comptroller) AcceptAdmin() (string, error)

func (*Comptroller) AccountBorrowDay

func (this *Comptroller) AccountBorrowDay(account common.Address) (uint64, error)

func (*Comptroller) AccountBorrowMarket

func (this *Comptroller) AccountBorrowMarket(account common.Address) (string, error)

func (*Comptroller) AccountCollateralPool

func (this *Comptroller) AccountCollateralPool(account common.Address) ([]string, error)

func (*Comptroller) Admin

func (this *Comptroller) Admin() (common.Address, error)

func (*Comptroller) AllMarkets

func (this *Comptroller) AllMarkets() ([]string, error)

func (*Comptroller) BorrowGuardianPaused

func (this *Comptroller) BorrowGuardianPaused(market common.Address) (bool, error)

func (*Comptroller) ClaimAllInterest

func (this *Comptroller) ClaimAllInterest(holder common.Address, markets []common.Address, borrows, suppliers,
	insurance bool, preExecute bool) (hash string, distributed, remains *big.Int, err error)

func (*Comptroller) ClaimAllWing

func (this *Comptroller) ClaimAllWing(holders []common.Address, markets []string, borrows, suppliers,
	insurance bool, preExecute bool) (hash string, remains *big.Int, err error)

func (*Comptroller) ClaimInterest

func (this *Comptroller) ClaimInterest(holder common.Address, preExecute bool) (hash string,
	remains *big.Int, err error)

func (*Comptroller) ClaimInterestAtMarkets

func (this *Comptroller) ClaimInterestAtMarkets(holder common.Address, markets []common.Address,
	preExecute bool) (hash string, distributed, remains *big.Int, err error)

func (*Comptroller) ClaimWing

func (this *Comptroller) ClaimWing(holder common.Address, preExecute bool) (hash string,
	remains *big.Int, err error)

func (*Comptroller) ClaimWingAtMarkets

func (this *Comptroller) ClaimWingAtMarkets(holder common.Address, markets []string,
	preExecute bool) (hash string, remains *big.Int, err error)

func (*Comptroller) GetAccountLiquidity

func (this *Comptroller) GetAccountLiquidity(account common.Address) (*AccountLiquidity, error)

func (*Comptroller) GetAddr

func (this *Comptroller) GetAddr() common.Address

func (*Comptroller) GlobalParam

func (this *Comptroller) GlobalParam() (common.Address, error)

func (*Comptroller) Init

func (this *Comptroller) Init(admin, globalParam, wingAddr, priceOracle, oscoreOracle common.Address, maxSupply,
	insuranceRepayFactor, liquidateIncentiveFactor *big.Int) (string, error)

func (*Comptroller) InsuranceRepayFactor

func (this *Comptroller) InsuranceRepayFactor() (*big.Int, error)

func (*Comptroller) InterestIndex

func (this *Comptroller) InterestIndex(market string) (*big.Int, error)

func (*Comptroller) InterestUserIndex

func (this *Comptroller) InterestUserIndex(market string, account common.Address) (*big.Int, error)

func (*Comptroller) IsComptroller

func (this *Comptroller) IsComptroller() (bool, error)

func (*Comptroller) LastWingBalance

func (this *Comptroller) LastWingBalance() (*big.Int, error)

func (*Comptroller) LiquidateCalculate

func (this *Comptroller) LiquidateCalculate(account common.Address) (string, *big.Int, error)

func (*Comptroller) LiquidationIncentiveFactor

func (this *Comptroller) LiquidationIncentiveFactor() (*big.Int, error)

func (*Comptroller) MarketInfo

func (this *Comptroller) MarketInfo(market string) (*MarketInfo, error)

func (*Comptroller) MarketUtilities

func (this *Comptroller) MarketUtilities() ([]*MarketUtility, error)

func (*Comptroller) MaxSupplyValue

func (this *Comptroller) MaxSupplyValue() (*big.Int, error)

func (*Comptroller) MintGuardianPaused

func (this *Comptroller) MintGuardianPaused(market common.Address) (bool, error)

func (*Comptroller) OScoreOracle

func (this *Comptroller) OScoreOracle() (common.Address, error)

func (*Comptroller) PauseGuardian

func (this *Comptroller) PauseGuardian() (common.Address, error)

func (*Comptroller) PendingAdmin

func (this *Comptroller) PendingAdmin() (common.Address, error)

func (*Comptroller) PriceOracle

func (this *Comptroller) PriceOracle() (common.Address, error)

func (*Comptroller) RegisterMarket

func (this *Comptroller) RegisterMarket(marketName string, supplyPool common.Address, borrowPool common.Address,
	insurancePool common.Address, underlying common.Address, underlyingDecimals uint8,
	wingWeight uint8) (string, error)

func (*Comptroller) RepayInsurance

func (this *Comptroller) RepayInsurance(borrower common.Address) (string, error)

func (*Comptroller) SeizeGuardianPaused

func (this *Comptroller) SeizeGuardianPaused() (bool, error)

func (*Comptroller) SetBorrowPaused

func (this *Comptroller) SetBorrowPaused(market common.Address, state bool) (string, error)

func (*Comptroller) SetDistributeWingSwitch

func (this *Comptroller) SetDistributeWingSwitch(state bool) (string, error)

func (*Comptroller) SetGlobalParam

func (this *Comptroller) SetGlobalParam(globalParam common.Address) (string, error)

func (*Comptroller) SetInsuranceRepayFactor

func (this *Comptroller) SetInsuranceRepayFactor(factor *big.Int) (string, error)

func (*Comptroller) SetLiquidationIncentive

func (this *Comptroller) SetLiquidationIncentive(incentive *big.Int) (string, error)

func (*Comptroller) SetMaxSupplyValue

func (this *Comptroller) SetMaxSupplyValue(value *big.Int) (string, error)

func (*Comptroller) SetMintPaused

func (this *Comptroller) SetMintPaused(market common.Address, state bool) (string, error)

func (*Comptroller) SetOScoreOracle

func (this *Comptroller) SetOScoreOracle(oracle common.Address) (string, error)

func (*Comptroller) SetPauseGuardian

func (this *Comptroller) SetPauseGuardian(newPausedGuardian common.Address) (string, error)

func (*Comptroller) SetPendingAdmin

func (this *Comptroller) SetPendingAdmin(newPendingAdmin common.Address) (string, error)

func (*Comptroller) SetPriceOracle

func (this *Comptroller) SetPriceOracle(oracle common.Address) (string, error)

func (*Comptroller) SetSeizePaused

func (this *Comptroller) SetSeizePaused(state bool) (string, error)

func (*Comptroller) SetTransferPaused

func (this *Comptroller) SetTransferPaused(state bool) (string, error)

func (*Comptroller) SetWingAddr

func (this *Comptroller) SetWingAddr(wing common.Address) (string, error)

func (*Comptroller) TotalSupplyValue

func (this *Comptroller) TotalSupplyValue() (*big.Int, error)

func (*Comptroller) TransferGuardianPaused

func (this *Comptroller) TransferGuardianPaused() (bool, error)

func (*Comptroller) UpdateMarketBorrowPool

func (this *Comptroller) UpdateMarketBorrowPool(market string, borrowPool common.Address) (string, error)

func (*Comptroller) UpdateMarketInsurancePool

func (this *Comptroller) UpdateMarketInsurancePool(market string, insurancePool common.Address) (string, error)

func (*Comptroller) UpdateMarketSupplyPool

func (this *Comptroller) UpdateMarketSupplyPool(market string, supplyPool common.Address) (string, error)

func (*Comptroller) UpdateMarketUnderlying

func (this *Comptroller) UpdateMarketUnderlying(market string, underlying common.Address) (string, error)

func (*Comptroller) UpdateMarketUnderlyingDecimals

func (this *Comptroller) UpdateMarketUnderlyingDecimals(market string, underlyingDecimals uint64) (string, error)

func (*Comptroller) UpdateMarketWingWeight

func (this *Comptroller) UpdateMarketWingWeight(market string, weight uint64) (string, error)

func (*Comptroller) UpdateSigner

func (this *Comptroller) UpdateSigner(newSigner *ontSDK.Account)

func (*Comptroller) UpdateWingSBI

func (this *Comptroller) UpdateWingSBI(market common.Address, supplyPortion, borrowPortion, insurancePortion uint8) (string, error)

func (*Comptroller) UserCompletedBorrowNum

func (this *Comptroller) UserCompletedBorrowNum(account common.Address) (*big.Int, error)

func (*Comptroller) WingAddr

func (this *Comptroller) WingAddr() (common.Address, error)

func (*Comptroller) WingBorrowIndex

func (this *Comptroller) WingBorrowIndex(market string) (*big.Int, error)

func (*Comptroller) WingBorrowIndexSnapshot

func (this *Comptroller) WingBorrowIndexSnapshot(market string, dayNumber uint64) (*big.Int, error)

func (*Comptroller) WingBorrowerIndex

func (this *Comptroller) WingBorrowerIndex(market string, account common.Address) (*big.Int, error)

func (*Comptroller) WingDistributedNum

func (this *Comptroller) WingDistributedNum(market string) (*big.Int, error)

func (*Comptroller) WingGuarantorIndex

func (this *Comptroller) WingGuarantorIndex(market string, account common.Address) (*big.Int, error)

func (*Comptroller) WingInsuranceIndex

func (this *Comptroller) WingInsuranceIndex(market string) (*big.Int, error)

func (*Comptroller) WingMarketAccrued

func (this *Comptroller) WingMarketAccrued(market string) (*big.Int, error)

func (*Comptroller) WingSBIPortion

func (this *Comptroller) WingSBIPortion(market common.Address) (*WingSBI, error)

func (*Comptroller) WingSupplierIndex

func (this *Comptroller) WingSupplierIndex(market string, account common.Address) (*big.Int, error)

func (*Comptroller) WingSupplyIndex

func (this *Comptroller) WingSupplyIndex(market string) (*big.Int, error)

func (*Comptroller) WingUserAccrued

func (this *Comptroller) WingUserAccrued(account common.Address) (*big.Int, error)

func (*Comptroller) WingUserPunished

func (this *Comptroller) WingUserPunished(account common.Address) (*big.Int, error)

type IfComptroller

type IfComptroller struct {
	FilePath                 string `json:"file_path"`
	Address                  string `json:"address"`
	Admin                    string `json:"admin"`
	InsuranceRepayFactor     string `json:"insurance_repay_factor"`
	LiquidateIncentiveFactor string `json:"liquidate_incentive_factor"`
	MaxSupplyValue           string `json:"max_supply_value"`
}

type MarketInfo

type MarketInfo struct {
	BorrowPool    common.Address
	SupplyPool    common.Address
	InsurancePool common.Address

	Underlying common.Address

	UnderlyingDecimals uint8
	WingWeight         uint8
}

func DeserializeMarketInfo

func DeserializeMarketInfo(data []byte) (*MarketInfo, error)

type MarketUtility

type MarketUtility struct {
	MarketName string
	Utility    string
}

func (*MarketUtility) Deserialize

func (this *MarketUtility) Deserialize(source *common.ZeroCopySource) error

type WingSBI

type WingSBI struct {
	SupplyPortion    uint8
	BorrowPortion    uint8
	InsurancePortion uint8
}

func DeserializeWingSBI

func DeserializeWingSBI(data []byte) (*WingSBI, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL