Documentation
¶
Index ¶
Constants ¶
View Source
const ( PayTime = 42336 ExpireTime = 181440 ExpirePayTime = 211680 )
每 42336 块一个支付点,支付本金和利息 过期是181,440块,但是需要等211,680块才会返回。
Variables ¶
View Source
var SERO = big.NewFloat(1e18)
Functions ¶
This section is empty.
Types ¶
type Report ¶ added in v0.1.0
type Report struct {
Summary ShareReport
}
func FormatReport ¶ added in v0.1.0
type Result ¶
type Result struct {
Id string
ShortId string
BuyBlock int
LastPayBlock int
ExpireBlock int
ExpirePayBlock int
TotalShare int
// Principle
TotalPrinciple float64 // 所有本金
MortgagePrinciple float64 // 抵押中本金
ReturnedPrinciple float64 // 已返还本金
// Interest
TotalInterest float64 // 所有本金
MortgageInterest float64 // 抵押中本金
ReturnedInterest float64 // 已返还本金
}
func Sum ¶
func Sum(sd StakeDetail) (r Result)
type ShareReport ¶ added in v0.1.0
type ShareReport struct {
// Share Number
// Principle
// Interest
}
func FormatShare ¶ added in v0.1.0
func FormatShare(r Result) (sr ShareReport)
type StakeDetail ¶
type StakeDetail struct {
Id string `json:"id"`
Company string `json:"company"`
Tx string `json:"tx"`
At int `json:"at"` // tx's blockNumber
Addr string `json:"addr"` // Owner
Pool string `json:"pool"`
VoteAddr string `json:"voteAddr"`
Fee int `json:"fee"`
Timestamp int `json:"timestamp"` // buy time
Price string `json:"price"`
Total int `json:"total"`
// remaining 和 expired 二选一只有一个
Remaining int `json:"remaining"`
Expired int `json:"expired"`
Missed int `json:"missed"`
Profit string `json:"profit"` //all profit
ReturnNum int `json:"returnNum"` // blockNumber
LastPayTime int `json:"lastPayTime"` // blockNumber
ReturnProfit string `json:"returnProfit"` // returned profit
Status int `json:"status"`
}
Click to show internal directories.
Click to hide internal directories.