Documentation ¶
Index ¶
- type AccountSnapshot
- type DayDebtInfo
- type DebtInfo
- type IfBorrowPool
- func (this *IfBorrowPool) AcceptAdmin() (string, error)
- func (this *IfBorrowPool) AccountSnapshot(owner common.Address) (*AccountSnapshot, error)
- func (this *IfBorrowPool) AccrueAccountInterest(addr common.Address) (string, error)
- func (this *IfBorrowPool) AccrueInterest() (string, error)
- func (this *IfBorrowPool) AccruedDayNumber() (uint64, error)
- func (this *IfBorrowPool) Admin() (common.Address, error)
- func (this *IfBorrowPool) Allowance(owner, spender common.Address) (*big.Int, error)
- func (this *IfBorrowPool) Approve(owner, spender common.Address, amount *big.Int) (string, error)
- func (this *IfBorrowPool) BalanceOf(owner common.Address) (*big.Int, error)
- func (this *IfBorrowPool) BalanceOfUnderlying(owner common.Address) (*big.Int, error)
- func (this *IfBorrowPool) Borrow(borrower common.Address, borrowAmount *big.Int) (string, error)
- func (this *IfBorrowPool) BorrowBalanceStored(account common.Address) (*big.Int, error)
- func (this *IfBorrowPool) BorrowRatePerBlock() (*big.Int, error)
- func (this *IfBorrowPool) Comptroller() (common.Address, error)
- func (this *IfBorrowPool) Decimals() (string, error)
- func (this *IfBorrowPool) ExchangeRateStored() (*big.Int, error)
- func (this *IfBorrowPool) FormalBorrowDays() (uint64, error)
- func (this *IfBorrowPool) FormalInterest() (common.I128, error)
- func (this *IfBorrowPool) FormalPrincipal() (common.I128, error)
- func (this *IfBorrowPool) GetAddr() common.Address
- func (this *IfBorrowPool) GetCash() (*big.Int, error)
- func (this *IfBorrowPool) GetDayDebtInfo(dayNumber uint64) (*DayDebtInfo, error)
- func (this *IfBorrowPool) GetOscoreInfoByLevel(level byte) (*OscoreInfo, error)
- func (this *IfBorrowPool) GlobalParam() (common.Address, error)
- func (this *IfBorrowPool) IncreaseCollateral(from common.Address, addAmount *big.Int) (string, error)
- func (this *IfBorrowPool) Init(admin common.Address, marketName string, oracle, comptroller common.Address, ...) (string, error)
- func (this *IfBorrowPool) InsuranceInterestFactor() (*big.Int, error)
- func (this *IfBorrowPool) InterimBorrowDays() (uint64, error)
- func (this *IfBorrowPool) InterimInterestRate() (bool, error)
- func (this *IfBorrowPool) IsBorrow() (bool, error)
- func (this *IfBorrowPool) Liquidate(liquidator, borrower common.Address) (string, error)
- func (this *IfBorrowPool) MarketName() (string, error)
- func (this *IfBorrowPool) Mint(minter common.Address, mintAmount *big.Int) (string, error)
- func (this *IfBorrowPool) NeoVMApprove(owner, spender common.Address, amount *big.Int) (string, error)
- func (this *IfBorrowPool) NeoVMBalanceOf(owner common.Address) (*big.Int, error)
- func (this *IfBorrowPool) OScoreOracle() (common.Address, error)
- func (this *IfBorrowPool) PendingAdmin() (common.Address, error)
- func (this *IfBorrowPool) PunishInterestRate() (bool, error)
- func (this *IfBorrowPool) Redeem(redeemer common.Address, redeemTokens *big.Int) (string, error)
- func (this *IfBorrowPool) RedeemUnderlying(redeemer common.Address, redeemAmount *big.Int) (string, error)
- func (this *IfBorrowPool) ReduceCollateral(from common.Address, addAmount *big.Int) (string, error)
- func (this *IfBorrowPool) ReduceReserves(reduceAmount *big.Int) (string, error)
- func (this *IfBorrowPool) RepayBorrow(borrower common.Address, repayAmount *big.Int) (string, error)
- func (this *IfBorrowPool) RepayBorrowBehalf(payer, borrower common.Address, repayAmount *big.Int) (string, error)
- func (this *IfBorrowPool) ReserveFactor() (*big.Int, error)
- func (this *IfBorrowPool) SetComptroller(comptroller common.Address) (string, error)
- func (this *IfBorrowPool) SetFormalBorrowDays(days uint64) (string, error)
- func (this *IfBorrowPool) SetInsuranceAddr(insurance common.Address) (string, error)
- func (this *IfBorrowPool) SetInsuranceFactor(factor *big.Int) (string, error)
- func (this *IfBorrowPool) SetInsuranceInterestFactor(factor *big.Int) (string, error)
- func (this *IfBorrowPool) SetInterimBorrowDays(days uint64) (string, error)
- func (this *IfBorrowPool) SetInterimInterestRate(factor *big.Int) (string, error)
- func (this *IfBorrowPool) SetMarketAddr(market common.Address) (string, error)
- func (this *IfBorrowPool) SetMarketName(marketName string) (string, error)
- func (this *IfBorrowPool) SetOracle(oracle common.Address) (string, error)
- func (this *IfBorrowPool) SetOscoreInfo(param []*OscoreInfo) (string, error)
- func (this *IfBorrowPool) SetPendingAdmin(pendingAdmin common.Address) (string, error)
- func (this *IfBorrowPool) SetPriceOracle(oracle common.Address) (string, error)
- func (this *IfBorrowPool) SetPunishInterestRate(factor *big.Int) (string, error)
- func (this *IfBorrowPool) SetReserveFactor(factor *big.Int) (string, error)
- func (this *IfBorrowPool) SupplyRatePerBlock() (*big.Int, error)
- func (this *IfBorrowPool) TotalInsuranceInterest() (common.I128, error)
- func (this *IfBorrowPool) TotalInterest() (common.I128, error)
- func (this *IfBorrowPool) TotalReserves() (*big.Int, error)
- func (this *IfBorrowPool) Transfer(from, to common.Address, amount *big.Int) (string, error)
- func (this *IfBorrowPool) TransferFrom(from, src, to common.Address, amount *big.Int) (string, error)
- func (this *IfBorrowPool) UpdateSigner(newSigner *ontSDK.Account)
- type OscoreInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountSnapshot ¶
type AccountSnapshot struct { Collateral *big.Int // 借款 Principal *big.Int // 用户当前未还的总利息 Interest *big.Int // 用户负债时的正常利息 FormalInterest *big.Int OScoreLevel uint8 BorrowTime uint64 AccrueInterestDayNum uint64 }
func DeserializeAccountSnapshot ¶
func DeserializeAccountSnapshot(data []byte) (*AccountSnapshot, error)
type DayDebtInfo ¶
type DayDebtInfo struct { Data []*DebtInfo AccruedDayNumber uint64 // 上一次计息的日期 TotalInterest string }
func (*DayDebtInfo) Deserialize ¶
func (this *DayDebtInfo) Deserialize(source *common.ZeroCopySource) error
type DebtInfo ¶
type DebtInfo struct { OScoreLevel byte Debt string // 负债 Interest string // 这些负债产生的利息 BorrowIndex string }
func (*DebtInfo) Deserialize ¶
func (this *DebtInfo) Deserialize(source *common.ZeroCopySource) error
type IfBorrowPool ¶
type IfBorrowPool struct { Sdk *ontSDK.OntologySdk Signer *ontSDK.Account Addr common.Address GasPrice uint64 GasLimit uint64 }
func NewIfBorrowPool ¶
func (*IfBorrowPool) AcceptAdmin ¶
func (this *IfBorrowPool) AcceptAdmin() (string, error)
func (*IfBorrowPool) AccountSnapshot ¶
func (this *IfBorrowPool) AccountSnapshot(owner common.Address) (*AccountSnapshot, error)
func (*IfBorrowPool) AccrueAccountInterest ¶
func (this *IfBorrowPool) AccrueAccountInterest(addr common.Address) (string, error)
func (*IfBorrowPool) AccrueInterest ¶
func (this *IfBorrowPool) AccrueInterest() (string, error)
func (*IfBorrowPool) AccruedDayNumber ¶
func (this *IfBorrowPool) AccruedDayNumber() (uint64, error)
func (*IfBorrowPool) BalanceOfUnderlying ¶
func (*IfBorrowPool) BorrowBalanceStored ¶
func (*IfBorrowPool) BorrowRatePerBlock ¶
func (this *IfBorrowPool) BorrowRatePerBlock() (*big.Int, error)
func (*IfBorrowPool) Comptroller ¶
func (this *IfBorrowPool) Comptroller() (common.Address, error)
func (*IfBorrowPool) Decimals ¶
func (this *IfBorrowPool) Decimals() (string, error)
func (*IfBorrowPool) ExchangeRateStored ¶
func (this *IfBorrowPool) ExchangeRateStored() (*big.Int, error)
func (*IfBorrowPool) FormalBorrowDays ¶
func (this *IfBorrowPool) FormalBorrowDays() (uint64, error)
func (*IfBorrowPool) FormalInterest ¶
func (this *IfBorrowPool) FormalInterest() (common.I128, error)
func (*IfBorrowPool) FormalPrincipal ¶
func (this *IfBorrowPool) FormalPrincipal() (common.I128, error)
func (*IfBorrowPool) GetAddr ¶
func (this *IfBorrowPool) GetAddr() common.Address
func (*IfBorrowPool) GetDayDebtInfo ¶
func (this *IfBorrowPool) GetDayDebtInfo(dayNumber uint64) (*DayDebtInfo, error)
func (*IfBorrowPool) GetOscoreInfoByLevel ¶
func (this *IfBorrowPool) GetOscoreInfoByLevel(level byte) (*OscoreInfo, error)
pre execute
func (*IfBorrowPool) GlobalParam ¶
func (this *IfBorrowPool) GlobalParam() (common.Address, error)
func (*IfBorrowPool) IncreaseCollateral ¶
func (*IfBorrowPool) InsuranceInterestFactor ¶
func (this *IfBorrowPool) InsuranceInterestFactor() (*big.Int, error)
func (*IfBorrowPool) InterimBorrowDays ¶
func (this *IfBorrowPool) InterimBorrowDays() (uint64, error)
func (*IfBorrowPool) InterimInterestRate ¶
func (this *IfBorrowPool) InterimInterestRate() (bool, error)
func (*IfBorrowPool) IsBorrow ¶
func (this *IfBorrowPool) IsBorrow() (bool, error)
func (*IfBorrowPool) Liquidate ¶
func (this *IfBorrowPool) Liquidate(liquidator, borrower common.Address) (string, error)
func (*IfBorrowPool) MarketName ¶
func (this *IfBorrowPool) MarketName() (string, error)
func (*IfBorrowPool) NeoVMApprove ¶
func (*IfBorrowPool) NeoVMBalanceOf ¶
func (*IfBorrowPool) OScoreOracle ¶
func (this *IfBorrowPool) OScoreOracle() (common.Address, error)
func (*IfBorrowPool) PendingAdmin ¶
func (this *IfBorrowPool) PendingAdmin() (common.Address, error)
func (*IfBorrowPool) PunishInterestRate ¶
func (this *IfBorrowPool) PunishInterestRate() (bool, error)
func (*IfBorrowPool) RedeemUnderlying ¶
func (*IfBorrowPool) ReduceCollateral ¶
func (*IfBorrowPool) ReduceReserves ¶
func (this *IfBorrowPool) ReduceReserves(reduceAmount *big.Int) (string, error)
func (*IfBorrowPool) RepayBorrow ¶
func (*IfBorrowPool) RepayBorrowBehalf ¶
func (*IfBorrowPool) ReserveFactor ¶
func (this *IfBorrowPool) ReserveFactor() (*big.Int, error)
func (*IfBorrowPool) SetComptroller ¶
func (this *IfBorrowPool) SetComptroller(comptroller common.Address) (string, error)
func (*IfBorrowPool) SetFormalBorrowDays ¶
func (this *IfBorrowPool) SetFormalBorrowDays(days uint64) (string, error)
func (*IfBorrowPool) SetInsuranceAddr ¶
func (this *IfBorrowPool) SetInsuranceAddr(insurance common.Address) (string, error)
func (*IfBorrowPool) SetInsuranceFactor ¶
func (this *IfBorrowPool) SetInsuranceFactor(factor *big.Int) (string, error)
func (*IfBorrowPool) SetInsuranceInterestFactor ¶
func (this *IfBorrowPool) SetInsuranceInterestFactor(factor *big.Int) (string, error)
func (*IfBorrowPool) SetInterimBorrowDays ¶
func (this *IfBorrowPool) SetInterimBorrowDays(days uint64) (string, error)
func (*IfBorrowPool) SetInterimInterestRate ¶
func (this *IfBorrowPool) SetInterimInterestRate(factor *big.Int) (string, error)
func (*IfBorrowPool) SetMarketAddr ¶
func (this *IfBorrowPool) SetMarketAddr(market common.Address) (string, error)
func (*IfBorrowPool) SetMarketName ¶
func (this *IfBorrowPool) SetMarketName(marketName string) (string, error)
func (*IfBorrowPool) SetOracle ¶
func (this *IfBorrowPool) SetOracle(oracle common.Address) (string, error)
func (*IfBorrowPool) SetOscoreInfo ¶
func (this *IfBorrowPool) SetOscoreInfo(param []*OscoreInfo) (string, error)
level: u8, pub interest_rate: U128, pub collateral_factor: U128,
func (*IfBorrowPool) SetPendingAdmin ¶
func (this *IfBorrowPool) SetPendingAdmin(pendingAdmin common.Address) (string, error)
func (*IfBorrowPool) SetPriceOracle ¶
func (this *IfBorrowPool) SetPriceOracle(oracle common.Address) (string, error)
func (*IfBorrowPool) SetPunishInterestRate ¶
func (this *IfBorrowPool) SetPunishInterestRate(factor *big.Int) (string, error)
func (*IfBorrowPool) SetReserveFactor ¶
func (this *IfBorrowPool) SetReserveFactor(factor *big.Int) (string, error)
func (*IfBorrowPool) SupplyRatePerBlock ¶
func (this *IfBorrowPool) SupplyRatePerBlock() (*big.Int, error)
func (*IfBorrowPool) TotalInsuranceInterest ¶
func (this *IfBorrowPool) TotalInsuranceInterest() (common.I128, error)
func (*IfBorrowPool) TotalInterest ¶
func (this *IfBorrowPool) TotalInterest() (common.I128, error)
func (*IfBorrowPool) TotalReserves ¶
func (this *IfBorrowPool) TotalReserves() (*big.Int, error)
func (*IfBorrowPool) TransferFrom ¶
func (*IfBorrowPool) UpdateSigner ¶
func (this *IfBorrowPool) UpdateSigner(newSigner *ontSDK.Account)
type OscoreInfo ¶
func (*OscoreInfo) Deserialize ¶
func (this *OscoreInfo) Deserialize(source *common.ZeroCopySource) error
func (*OscoreInfo) Serialize ¶
func (this *OscoreInfo) Serialize(sink *common.ZeroCopySink)
type DebtInfo struct { OscoreLevl uint8 Debt uint64 // 负债 Interest uint64 // 这些负债产生的利息 BorrowIndex *big.Int // 当前的借贷指数 }
type DayDebtInfo struct { Data []*DebtInfo AccruedDayNumber uint64 // 上一次计息的日期 TotalInterest uint64 }
Click to show internal directories.
Click to hide internal directories.