-
Notifications
You must be signed in to change notification settings - Fork 18
/
wmprice.go
34 lines (29 loc) · 993 Bytes
/
wmprice.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package model
import (
linotypes "github.com/lino-network/lino/types"
)
// FedPrice is record of price fed by validators.
type FedPrice struct {
Validator linotypes.AccountKey `json:"validator"`
Price linotypes.MiniDollar `json:"price"`
UpdateAt int64 `json:"update_at"`
}
// TimePrice is time + price
type TimePrice struct {
Price linotypes.MiniDollar `json:"price"`
UpdateAt int64 `json:"update_at"`
}
// FedRecord - power and price.
type FedRecord struct {
Validator linotypes.AccountKey `json:"validator"`
Price linotypes.MiniDollar `json:"price"`
Power linotypes.Coin `json:"power"`
UpdateAt int64 `json:"update_at"`
}
// FeedHistory the history of price feed of one price update.
// Used by querier for now and governance in future.
type FeedHistory struct {
Price linotypes.MiniDollar `json:"price"`
Feeded []FedRecord `json:"feeded"`
UpdateAt int64 `json:"update_at"`
}