Documentation
¶
Index ¶
- func AddInsurance(cfg *config.Config, account *goSdk.Account, sdk *goSdk.OntologySdk, ...)
- func AddReserves(cfg *config.Config, account *goSdk.Account, sdk *goSdk.OntologySdk, ...)
- func ApproveAndMint(cfg *config.Config, account *goSdk.Account, sdk *goSdk.OntologySdk, ...)
- func ApproveAndMintWing(cfg *config.Config, account *goSdk.Account, sdk *goSdk.OntologySdk, ...)
- func Borrow(cfg *config.Config, account *goSdk.Account, sdk *goSdk.OntologySdk, ...)
- func BorrowBalanceCurrent(sdk *goSdk.OntologySdk, ftoken, account OntCommon.Address)
- func EnterMarkets(cfg *config.Config, account *goSdk.Account, sdk *goSdk.OntologySdk, ...)
- func ExchangeRateCurrent(sdk *goSdk.OntologySdk, ftoken OntCommon.Address)
- func ExitMarkets(cfg *config.Config, account *goSdk.Account, sdk *goSdk.OntologySdk, ...)
- func GetAllMarkets(genSdk *goSdk.OntologySdk, flashAddress string) ([]OntCommon.Address, error)
- func LiquidateBorrow(cfg *config.Config, account *goSdk.Account, sdk *goSdk.OntologySdk, ...)
- func Mint(cfg *config.Config, account *goSdk.Account, sdk *goSdk.OntologySdk, ...)
- func Mint2(cfg *config.Config, account *goSdk.Account, sdk *goSdk.OntologySdk, ...)
- func MintFtoken(cfg *config.Config, account *goSdk.Account, sdk *goSdk.OntologySdk, ...)
- func RedeemToken(cfg *config.Config, account *goSdk.Account, sdk *goSdk.OntologySdk, ...)
- func RedeemToken2(cfg *config.Config, account *goSdk.Account, sdk *goSdk.OntologySdk, ...)
- func RedeemUnderlying(cfg *config.Config, account *goSdk.Account, sdk *goSdk.OntologySdk, ...)
- func RepayBorrow(cfg *config.Config, account *goSdk.Account, sdk *goSdk.OntologySdk, ...)
- func RepayBorrowBehalf(cfg *config.Config, account *goSdk.Account, sdk *goSdk.OntologySdk, ...)
- func SerializeUserAllowance(sink *common.ZeroCopySink, allowance *UserAllowance) []byte
- func TotalBorrowCurrent(sdk *goSdk.OntologySdk, ftoken OntCommon.Address)
- type AccountLiquidity
- type Comptroller
- func (this *Comptroller) AcceptAdmin() (string, error)
- func (this *Comptroller) AccountAssets(account common.Address) ([]common.Address, error)
- func (this *Comptroller) AddWingMarkets(markets []common.Address, weights []uint64) (string, error)
- func (this *Comptroller) Admin() (common.Address, error)
- func (this *Comptroller) AllMarkets() ([]common.Address, error)
- func (this *Comptroller) AllRawMarkets() ([]common.Address, error)
- func (this *Comptroller) ApproveWing(allowance []*UserAllowance) (string, error)
- func (this *Comptroller) AssetsIn(account common.Address) ([]common.Address, error)
- func (this *Comptroller) BorrowAllowed(market, borrower common.Address, borrowAmount *big.Int) (bool, error)
- func (this *Comptroller) BorrowGuardianPaused(market common.Address) (bool, error)
- func (this *Comptroller) CheckMembership(account, market common.Address) (bool, error)
- func (this *Comptroller) ClaimAllWing(holder common.Address, markets []common.Address, ...) (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 []common.Address, preExecute bool) (hash string, distributed, remains *big.Int, err error)
- func (this *Comptroller) CloseFactorMantissa() (*big.Int, error)
- func (this *Comptroller) CouldRepayByInsurance(account common.Address) (bool, error)
- func (this *Comptroller) DropWingMarket(market common.Address) (string, error)
- func (this *Comptroller) EnterMarkets(from common.Address, markets []common.Address, preExecute bool) ([]string, string, error)
- func (this *Comptroller) ExitMarket(from, market common.Address) (string, error)
- func (this *Comptroller) GetAccountLiquidity(account common.Address) (*AccountLiquidity, error)
- func (this *Comptroller) GetAddr() common.Address
- func (this *Comptroller) GetHypotheticalAccountLiquidity(account, fTokenModify common.Address, redeemTokens, borrowAmount *big.Int) (*AccountLiquidity, error)
- func (this *Comptroller) GetNewMarketId(newMarket common.Address) (common.Address, error)
- func (this *Comptroller) GetOldMarketId(oldMarket common.Address) (common.Address, error)
- func (this *Comptroller) GetWingIndexFactorInfo(market common.Address) (*WingIndexFactorInfo, error)
- func (this *Comptroller) GlobalParam() (common.Address, error)
- func (this *Comptroller) Init(admin, globalParam common.Address) (string, error)
- func (this *Comptroller) InsuranceRepayFactorMantissa() (*big.Int, error)
- func (this *Comptroller) IsMarketExisted(market common.Address) (bool, error)
- func (this *Comptroller) LiquidateBorrowAllowed(borrowedMarket, collateralMarket, liquidator, borrower common.Address, ...) (bool, error)
- func (this *Comptroller) LiquidateCalculateSeizeTokens(account common.Address) (string, *big.Int, error)
- func (this *Comptroller) LiquidationIncentiveMantissa() (*big.Int, error)
- func (this *Comptroller) MarketMeta(market common.Address) (*MarketMeta, error)
- func (this *Comptroller) MarketUtilities() ([]*MarketUtility, error)
- func (this *Comptroller) MaxAssets() (*big.Int, error)
- func (this *Comptroller) MintAllowed(market, minter common.Address) (bool, error)
- func (this *Comptroller) MintGuardianPaused(market common.Address) (bool, error)
- func (this *Comptroller) Oracle() (common.Address, error)
- func (this *Comptroller) PauseGuardian() (common.Address, error)
- func (this *Comptroller) PendingAdmin() (common.Address, error)
- func (this *Comptroller) RedeemAllowed(market, redeemer common.Address, redeemTokens *big.Int) (bool, error)
- func (this *Comptroller) RefreshWingRate() (string, error)
- func (this *Comptroller) RepayBorrowAllowed(market, payer, borrower common.Address, repayAmount *big.Int) (bool, error)
- func (this *Comptroller) RepayByInsurance(borrower common.Address) (string, error)
- func (this *Comptroller) SeizeAllowed(collateralMarket, borrowedMarket, liquidator, borrower common.Address, ...) (bool, error)
- func (this *Comptroller) SeizeGuardianPaused() (bool, error)
- func (this *Comptroller) SetBorrowPaused(market common.Address, state bool) (string, error)
- func (this *Comptroller) SetCloseFactor(factor *big.Int) (string, error)
- func (this *Comptroller) SetCollateralFactor(market common.Address, factor *big.Int) (string, error)
- func (this *Comptroller) SetDistributeWingSwitch(state bool) (string, error)
- func (this *Comptroller) SetGlobalParam(globalParam common.Address) (string, error)
- func (this *Comptroller) SetInsuranceRepayFactor(factor *big.Int) (string, error)
- func (this *Comptroller) SetLiquidationIncentive(incentive *big.Int) (string, error)
- func (this *Comptroller) SetMaxAssets(max *big.Int) (string, error)
- func (this *Comptroller) SetMintPaused(market common.Address, state bool) (string, error)
- func (this *Comptroller) SetNewMarketId(newMarket, oldMarket common.Address) (string, error)
- func (this *Comptroller) SetOldMarketId(oldMarket, newMarket 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) SetWingIndexFactor(market common.Address, factor *big.Int) (string, error)
- func (this *Comptroller) SetWingRate(rate *big.Int) (string, error)
- func (this *Comptroller) SetWingSBIPortion(market common.Address, supplyPortion, borrowPortion, insurancePortion *big.Int) (string, error)
- func (this *Comptroller) SupportMarket(fToken, insurance common.Address, underlyingDecimals uint64) (string, error)
- func (this *Comptroller) TransferAllowed(collateralMarket, borrowedMarket, liquidator, borrower common.Address, ...) (bool, error)
- func (this *Comptroller) TransferGuardianPaused() (bool, error)
- func (this *Comptroller) UpdateMarketUnderlyingDecimals(fToken common.Address, underlyingDecimals uint64) (string, error)
- func (this *Comptroller) UpdateMarketWingWeight(market common.Address, weight *big.Int) (string, error)
- func (this *Comptroller) UpdateSigner(newSigner *ontSDK.Account)
- func (this *Comptroller) WingAccrued(account common.Address) (*big.Int, error)
- func (this *Comptroller) WingAddr() (common.Address, error)
- func (this *Comptroller) WingBorrowState(market common.Address) (*WingMarketState, error)
- func (this *Comptroller) WingBorrowerIndex(market, account common.Address) (*big.Int, error)
- func (this *Comptroller) WingDistributedNum(market common.Address) (*big.Int, error)
- func (this *Comptroller) WingInsuranceIndex(market, account common.Address) (*big.Int, error)
- func (this *Comptroller) WingInsuranceState(market common.Address) (*WingMarketState, error)
- func (this *Comptroller) WingRate() (*big.Int, error)
- func (this *Comptroller) WingSBIPortion(market common.Address) (*WingSBI, error)
- func (this *Comptroller) WingSpeeds(market common.Address) (*big.Int, error)
- func (this *Comptroller) WingSupplierIndex(market, account common.Address) (*big.Int, error)
- func (this *Comptroller) WingSupplyState(market common.Address) (*WingMarketState, error)
- type MarketMeta
- type MarketUtility
- type UserAllowance
- type WingIndexFactorInfo
- type WingMarketState
- type WingSBI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddInsurance ¶
func AddReserves ¶
func ApproveAndMint ¶
func ApproveAndMint(cfg *config.Config, account *goSdk.Account, sdk *goSdk.OntologySdk, ftoken OntCommon.Address, otoken OntCommon.Address, from OntCommon.Address, amount *big.Int)
Mint ftoken (supply)
func ApproveAndMintWing ¶
func ApproveAndMintWing(cfg *config.Config, account *goSdk.Account, sdk *goSdk.OntologySdk, ftoken OntCommon.Address, otoken OntCommon.Address, from OntCommon.Address, amount *big.Int)
Mint ftoken (supply)
func BorrowBalanceCurrent ¶
func BorrowBalanceCurrent(sdk *goSdk.OntologySdk, ftoken, account OntCommon.Address)
func EnterMarkets ¶
func EnterMarkets(cfg *config.Config, account *goSdk.Account, sdk *goSdk.OntologySdk, comptroller OntCommon.Address, from OntCommon.Address, markets []interface{})
EnterMarkets ftoken address
func ExchangeRateCurrent ¶
func ExchangeRateCurrent(sdk *goSdk.OntologySdk, ftoken OntCommon.Address)
func ExitMarkets ¶
func ExitMarkets(cfg *config.Config, account *goSdk.Account, sdk *goSdk.OntologySdk, comptroller OntCommon.Address, from OntCommon.Address, market OntCommon.Address)
ExitMarkets ftoken address
func GetAllMarkets ¶
func LiquidateBorrow ¶
func Mint ¶
func Mint(cfg *config.Config, account *goSdk.Account, sdk *goSdk.OntologySdk, ftoken OntCommon.Address, from OntCommon.Address, amount uint64)
Mint ftoken (supply)
func Mint2 ¶
func Mint2(cfg *config.Config, account *goSdk.Account, sdk *goSdk.OntologySdk, ftoken, from OntCommon.Address, amount string)
Mint ftoken (supply)
func MintFtoken ¶
func MintFtoken(cfg *config.Config, account *goSdk.Account, sdk *goSdk.OntologySdk, ftoken OntCommon.Address, from OntCommon.Address, amount uint64)
Mint ftoken MintFtoken
func RedeemToken ¶
func RedeemToken(cfg *config.Config, account *goSdk.Account, sdk *goSdk.OntologySdk, ftoken OntCommon.Address, from OntCommon.Address, amount *big.Int)
RedeemToken ftoken
func RedeemToken2 ¶
func RedeemToken2(cfg *config.Config, account *goSdk.Account, sdk *goSdk.OntologySdk, ftoken OntCommon.Address, from OntCommon.Address, amount uint64)
RedeemToken ftoken
func RedeemUnderlying ¶
func RepayBorrow ¶
func RepayBorrowBehalf ¶
func SerializeUserAllowance ¶
func SerializeUserAllowance(sink *common.ZeroCopySink, allowance *UserAllowance) []byte
func TotalBorrowCurrent ¶
func TotalBorrowCurrent(sdk *goSdk.OntologySdk, ftoken OntCommon.Address)
Types ¶
type AccountLiquidity ¶
func DeserializeAccountLiquidity ¶
func DeserializeAccountLiquidity(data []byte) (*AccountLiquidity, error)
type Comptroller ¶
type Comptroller struct {
// contains filtered or unexported fields
}
func NewComptroller ¶
func NewComptroller(sdk *ontSDK.OntologySdk, contractAddr string, signer *ontSDK.Account, gasPrice, gasLimit uint64) (*Comptroller, error)
func (*Comptroller) AcceptAdmin ¶
func (this *Comptroller) AcceptAdmin() (string, error)
func (*Comptroller) AccountAssets ¶
func (*Comptroller) AddWingMarkets ¶
func (*Comptroller) AllMarkets ¶
func (this *Comptroller) AllMarkets() ([]common.Address, error)
func (*Comptroller) AllRawMarkets ¶
func (this *Comptroller) AllRawMarkets() ([]common.Address, error)
func (*Comptroller) ApproveWing ¶
func (this *Comptroller) ApproveWing(allowance []*UserAllowance) (string, error)
func (*Comptroller) BorrowAllowed ¶
func (*Comptroller) BorrowGuardianPaused ¶
func (this *Comptroller) BorrowGuardianPaused(market common.Address) (bool, error)
func (*Comptroller) CheckMembership ¶
func (this *Comptroller) CheckMembership(account, market common.Address) (bool, error)
func (*Comptroller) ClaimAllWing ¶
func (*Comptroller) ClaimWingAtMarkets ¶
func (*Comptroller) CloseFactorMantissa ¶
func (this *Comptroller) CloseFactorMantissa() (*big.Int, error)
func (*Comptroller) CouldRepayByInsurance ¶
func (this *Comptroller) CouldRepayByInsurance(account common.Address) (bool, error)
func (*Comptroller) DropWingMarket ¶
func (this *Comptroller) DropWingMarket(market common.Address) (string, error)
func (*Comptroller) EnterMarkets ¶
func (*Comptroller) ExitMarket ¶
func (this *Comptroller) ExitMarket(from, market common.Address) (string, error)
func (*Comptroller) GetAccountLiquidity ¶
func (this *Comptroller) GetAccountLiquidity(account common.Address) (*AccountLiquidity, error)
func (*Comptroller) GetAddr ¶
func (this *Comptroller) GetAddr() common.Address
func (*Comptroller) GetHypotheticalAccountLiquidity ¶
func (this *Comptroller) GetHypotheticalAccountLiquidity(account, fTokenModify common.Address, redeemTokens, borrowAmount *big.Int) (*AccountLiquidity, error)
func (*Comptroller) GetNewMarketId ¶
func (*Comptroller) GetOldMarketId ¶
func (*Comptroller) GetWingIndexFactorInfo ¶
func (this *Comptroller) GetWingIndexFactorInfo(market common.Address) (*WingIndexFactorInfo, error)
func (*Comptroller) GlobalParam ¶
func (this *Comptroller) GlobalParam() (common.Address, error)
func (*Comptroller) Init ¶
func (this *Comptroller) Init(admin, globalParam common.Address) (string, error)
func (*Comptroller) InsuranceRepayFactorMantissa ¶
func (this *Comptroller) InsuranceRepayFactorMantissa() (*big.Int, error)
func (*Comptroller) IsMarketExisted ¶
func (this *Comptroller) IsMarketExisted(market common.Address) (bool, error)
func (*Comptroller) LiquidateBorrowAllowed ¶
func (*Comptroller) LiquidateCalculateSeizeTokens ¶
func (*Comptroller) LiquidationIncentiveMantissa ¶
func (this *Comptroller) LiquidationIncentiveMantissa() (*big.Int, error)
func (*Comptroller) MarketMeta ¶
func (this *Comptroller) MarketMeta(market common.Address) (*MarketMeta, error)
func (*Comptroller) MarketUtilities ¶
func (this *Comptroller) MarketUtilities() ([]*MarketUtility, error)
func (*Comptroller) MintAllowed ¶
func (this *Comptroller) MintAllowed(market, minter common.Address) (bool, error)
func (*Comptroller) MintGuardianPaused ¶
func (this *Comptroller) MintGuardianPaused(market common.Address) (bool, error)
func (*Comptroller) PauseGuardian ¶
func (this *Comptroller) PauseGuardian() (common.Address, error)
func (*Comptroller) PendingAdmin ¶
func (this *Comptroller) PendingAdmin() (common.Address, error)
func (*Comptroller) RedeemAllowed ¶
func (*Comptroller) RefreshWingRate ¶
func (this *Comptroller) RefreshWingRate() (string, error)
func (*Comptroller) RepayBorrowAllowed ¶
func (*Comptroller) RepayByInsurance ¶
func (this *Comptroller) RepayByInsurance(borrower common.Address) (string, error)
func (*Comptroller) SeizeAllowed ¶
func (*Comptroller) SeizeGuardianPaused ¶
func (this *Comptroller) SeizeGuardianPaused() (bool, error)
func (*Comptroller) SetBorrowPaused ¶
func (*Comptroller) SetCloseFactor ¶
func (this *Comptroller) SetCloseFactor(factor *big.Int) (string, error)
func (*Comptroller) SetCollateralFactor ¶
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) SetMaxAssets ¶
func (this *Comptroller) SetMaxAssets(max *big.Int) (string, error)
func (*Comptroller) SetMintPaused ¶
func (*Comptroller) SetNewMarketId ¶
func (this *Comptroller) SetNewMarketId(newMarket, oldMarket common.Address) (string, error)
func (*Comptroller) SetOldMarketId ¶
func (this *Comptroller) SetOldMarketId(oldMarket, newMarket 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) SetWingIndexFactor ¶
func (*Comptroller) SetWingRate ¶
func (this *Comptroller) SetWingRate(rate *big.Int) (string, error)
func (*Comptroller) SetWingSBIPortion ¶
func (*Comptroller) SupportMarket ¶
func (*Comptroller) TransferAllowed ¶
func (*Comptroller) TransferGuardianPaused ¶
func (this *Comptroller) TransferGuardianPaused() (bool, error)
func (*Comptroller) UpdateMarketUnderlyingDecimals ¶
func (*Comptroller) UpdateMarketWingWeight ¶
func (*Comptroller) UpdateSigner ¶
func (this *Comptroller) UpdateSigner(newSigner *ontSDK.Account)
func (*Comptroller) WingAccrued ¶
func (*Comptroller) WingBorrowState ¶
func (this *Comptroller) WingBorrowState(market common.Address) (*WingMarketState, error)
func (*Comptroller) WingBorrowerIndex ¶
func (*Comptroller) WingDistributedNum ¶
func (*Comptroller) WingInsuranceIndex ¶
func (*Comptroller) WingInsuranceState ¶
func (this *Comptroller) WingInsuranceState(market common.Address) (*WingMarketState, error)
func (*Comptroller) WingSBIPortion ¶
func (this *Comptroller) WingSBIPortion(market common.Address) (*WingSBI, error)
func (*Comptroller) WingSpeeds ¶
func (*Comptroller) WingSupplierIndex ¶
func (*Comptroller) WingSupplyState ¶
func (this *Comptroller) WingSupplyState(market common.Address) (*WingMarketState, error)
type MarketMeta ¶
type MarketMeta struct { Addr common.Address InsuranceAddr common.Address IsListed bool ReceiveWing bool WingWeight *big.Int CollateralFactorMantissa *big.Int UnderlyingDecimals uint32 }
func DeserializeMarketMeta ¶
func DeserializeMarketMeta(data []byte) (*MarketMeta, error)
type MarketUtility ¶
func (*MarketUtility) Deserialize ¶
func (this *MarketUtility) Deserialize(source *common.ZeroCopySource) error
type UserAllowance ¶
func UnmarshalWholeUserAllowance ¶
func UnmarshalWholeUserAllowance(filePath string) ([]*UserAllowance, error)
type WingIndexFactorInfo ¶
func DeserializeWingIndexFactorInfo ¶
func DeserializeWingIndexFactorInfo(data []byte) (*WingIndexFactorInfo, error)
type WingMarketState ¶
func DeserializeWingMarketState ¶
func DeserializeWingMarketState(data []byte) (*WingMarketState, error)
Click to show internal directories.
Click to hide internal directories.