Documentation ¶
Index ¶
- type AccountLiquidity
- type Comptroller
- func (this *Comptroller) AcceptAdmin() (string, error)
- func (this *Comptroller) AccountBorrowDay(account common.Address) (uint64, error)
- func (this *Comptroller) AccountBorrowMarket(account common.Address) (string, error)
- func (this *Comptroller) AccountCollateralPool(account common.Address) ([]string, error)
- func (this *Comptroller) Admin() (common.Address, error)
- func (this *Comptroller) AllMarkets() ([]string, error)
- func (this *Comptroller) Borrow(market_name string, account common.Address, amount *big.Int) (hash string, err error)
- func (this *Comptroller) BorrowGuardianPaused(market common.Address) (bool, error)
- func (this *Comptroller) ClaimAllInterest(holder common.Address, markets []common.Address, ...) (hash string, distributed, remains *big.Int, err error)
- func (this *Comptroller) ClaimAllWing(holders []common.Address, markets []string, borrows, suppliers, insurance bool, ...) (hash string, remains *big.Int, err error)
- func (this *Comptroller) ClaimInterest(holder common.Address, preExecute bool) (hash string, remains *big.Int, err error)
- func (this *Comptroller) ClaimInterestAtMarkets(holder common.Address, markets []common.Address, preExecute bool) (hash string, distributed, remains *big.Int, err error)
- func (this *Comptroller) ClaimWing(holder common.Address, preExecute bool) (hash string, remains *big.Int, err error)
- func (this *Comptroller) ClaimWingAtMarkets(holder common.Address, markets []string, preExecute bool) (hash string, remains *big.Int, err error)
- func (this *Comptroller) GetAccountLiquidity(account common.Address) (*AccountLiquidity, error)
- func (this *Comptroller) GetAddr() common.Address
- func (this *Comptroller) GlobalParam() (common.Address, error)
- func (this *Comptroller) Init(admin, globalParam, wingAddr, priceOracle, oscoreOracle common.Address, ...) (string, error)
- func (this *Comptroller) InsuranceRepayFactor() (*big.Int, error)
- func (this *Comptroller) InterestIndex(market string) (*big.Int, error)
- func (this *Comptroller) InterestUserIndex(market string, account common.Address) (*big.Int, error)
- func (this *Comptroller) IsComptroller() (bool, error)
- func (this *Comptroller) LastWingBalance() (*big.Int, error)
- func (this *Comptroller) LiquidateCalculate(account common.Address) (string, *big.Int, error)
- func (this *Comptroller) LiquidationIncentiveFactor() (*big.Int, error)
- func (this *Comptroller) MarketInfo(market string) (*MarketInfo, error)
- func (this *Comptroller) MarketUtilities() ([]*MarketUtility, error)
- func (this *Comptroller) MaxSupplyValue() (*big.Int, error)
- func (this *Comptroller) MintGuardianPaused(market common.Address) (bool, error)
- func (this *Comptroller) OScoreOracle() (common.Address, error)
- func (this *Comptroller) PauseGuardian() (common.Address, error)
- func (this *Comptroller) PendingAdmin() (common.Address, error)
- func (this *Comptroller) PriceOracle() (common.Address, error)
- func (this *Comptroller) RegisterMarket(marketName string, supplyPool common.Address, borrowPool common.Address, ...) (string, error)
- func (this *Comptroller) RepayInsurance(borrower common.Address) (string, error)
- func (this *Comptroller) SeizeGuardianPaused() (bool, error)
- func (this *Comptroller) SetBorrowPaused(market string, state bool) (string, error)
- func (this *Comptroller) SetDistributeWingSwitch(state bool) (string, error)
- func (this *Comptroller) SetGlobalParam(globalParam common.Address) (string, error)
- func (this *Comptroller) SetInsuranceMintPaused(market string, state bool) (string, error)
- func (this *Comptroller) SetInsuranceRepayFactor(factor *big.Int) (string, error)
- func (this *Comptroller) SetLiquidationIncentive(incentive *big.Int) (string, error)
- func (this *Comptroller) SetMaxSupplyValue(value *big.Int) (string, error)
- func (this *Comptroller) SetMintPaused(market string, state bool) (string, error)
- func (this *Comptroller) SetOScoreOracle(oracle common.Address) (string, error)
- func (this *Comptroller) SetPauseGuardian(newPausedGuardian common.Address) (string, error)
- func (this *Comptroller) SetPendingAdmin(newPendingAdmin common.Address) (string, error)
- func (this *Comptroller) SetPriceOracle(oracle common.Address) (string, error)
- func (this *Comptroller) SetSeizePaused(state bool) (string, error)
- func (this *Comptroller) SetTransferPaused(state bool) (string, error)
- func (this *Comptroller) SetWingAddr(wing common.Address) (string, error)
- func (this *Comptroller) TotalSupplyValue() (*big.Int, error)
- func (this *Comptroller) TransferGuardianPaused() (bool, error)
- func (this *Comptroller) TransferIn(market_name string, account common.Address, amount *big.Int) (hash string, err error)
- func (this *Comptroller) UpdateMarketBorrowPool(market string, borrowPool common.Address) (string, error)
- func (this *Comptroller) UpdateMarketInsurancePool(market string, insurancePool common.Address) (string, error)
- func (this *Comptroller) UpdateMarketSupplyPool(market string, supplyPool common.Address) (string, error)
- func (this *Comptroller) UpdateMarketUnderlying(market string, underlying common.Address) (string, error)
- func (this *Comptroller) UpdateMarketUnderlyingDecimals(market string, underlyingDecimals uint64) (string, error)
- func (this *Comptroller) UpdateMarketWingWeight(market string, weight uint64) (string, error)
- func (this *Comptroller) UpdateSigner(newSigner *ontSDK.Account)
- func (this *Comptroller) UpdateWingSBI(market common.Address, supplyPortion, borrowPortion, insurancePortion uint8) (string, error)
- func (this *Comptroller) UserCompletedBorrowNum(account common.Address) (*big.Int, error)
- func (this *Comptroller) WingAddr() (common.Address, error)
- func (this *Comptroller) WingBorrowIndex(market string) (*big.Int, error)
- func (this *Comptroller) WingBorrowIndexSnapshot(market string, dayNumber uint64) (*big.Int, error)
- func (this *Comptroller) WingBorrowerIndex(market string, account common.Address) (*big.Int, error)
- func (this *Comptroller) WingDistributedNum(market string) (*big.Int, error)
- func (this *Comptroller) WingGuarantorIndex(market string, account common.Address) (*big.Int, error)
- func (this *Comptroller) WingInsuranceIndex(market string) (*big.Int, error)
- func (this *Comptroller) WingMarketAccrued(market string) (*MarketWingAccrued, error)
- func (this *Comptroller) WingSBIPortion(market common.Address) (*WingSBI, error)
- func (this *Comptroller) WingSupplierIndex(market string, account common.Address) (*big.Int, error)
- func (this *Comptroller) WingSupplyIndex(market string) (*big.Int, error)
- func (this *Comptroller) WingUserAccrued(account common.Address) (*big.Int, error)
- func (this *Comptroller) WingUserPunished(account common.Address) (*big.Int, error)
- type IfComptroller
- type MarketInfo
- type MarketUtility
- type MarketWingAccrued
- type WingSBI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountLiquidity ¶
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 (*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) AllMarkets ¶
func (this *Comptroller) AllMarkets() ([]string, error)
func (*Comptroller) BorrowGuardianPaused ¶
func (this *Comptroller) BorrowGuardianPaused(market common.Address) (bool, error)
func (*Comptroller) ClaimAllInterest ¶
func (*Comptroller) ClaimAllWing ¶
func (*Comptroller) ClaimInterest ¶
func (*Comptroller) ClaimInterestAtMarkets ¶
func (*Comptroller) ClaimWingAtMarkets ¶
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) InsuranceRepayFactor ¶
func (this *Comptroller) InsuranceRepayFactor() (*big.Int, error)
func (*Comptroller) InterestIndex ¶
func (this *Comptroller) InterestIndex(market string) (*big.Int, error)
func (*Comptroller) InterestUserIndex ¶
func (*Comptroller) IsComptroller ¶
func (this *Comptroller) IsComptroller() (bool, error)
func (*Comptroller) LastWingBalance ¶
func (this *Comptroller) LastWingBalance() (*big.Int, error)
func (*Comptroller) LiquidateCalculate ¶
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 (*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 string, 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) SetInsuranceMintPaused ¶
func (this *Comptroller) SetInsuranceMintPaused(market string, state bool) (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 string, 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) TransferIn ¶
func (*Comptroller) UpdateMarketBorrowPool ¶
func (*Comptroller) UpdateMarketInsurancePool ¶
func (*Comptroller) UpdateMarketSupplyPool ¶
func (*Comptroller) UpdateMarketUnderlying ¶
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 (*Comptroller) UserCompletedBorrowNum ¶
func (*Comptroller) WingBorrowIndex ¶
func (this *Comptroller) WingBorrowIndex(market string) (*big.Int, error)
func (*Comptroller) WingBorrowIndexSnapshot ¶
func (*Comptroller) WingBorrowerIndex ¶
func (*Comptroller) WingDistributedNum ¶
func (this *Comptroller) WingDistributedNum(market string) (*big.Int, error)
func (*Comptroller) WingGuarantorIndex ¶
func (*Comptroller) WingInsuranceIndex ¶
func (this *Comptroller) WingInsuranceIndex(market string) (*big.Int, error)
func (*Comptroller) WingMarketAccrued ¶
func (this *Comptroller) WingMarketAccrued(market string) (*MarketWingAccrued, error)
func (*Comptroller) WingSBIPortion ¶
func (this *Comptroller) WingSBIPortion(market common.Address) (*WingSBI, error)
func (*Comptroller) WingSupplierIndex ¶
func (*Comptroller) WingSupplyIndex ¶
func (this *Comptroller) WingSupplyIndex(market string) (*big.Int, error)
func (*Comptroller) WingUserAccrued ¶
func (*Comptroller) WingUserPunished ¶
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 ¶
func (*MarketUtility) Deserialize ¶
func (this *MarketUtility) Deserialize(source *common.ZeroCopySource) error
Click to show internal directories.
Click to hide internal directories.