forked from archway-network/cosmologger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.go
48 lines (38 loc) · 953 Bytes
/
types.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package block
import "time"
type BlockSignersRecord struct {
BlockHeight uint64
ValConsAddr string
Time time.Time
Signature string
}
type BlockRecord struct {
BlockHash string
Height uint64
NumOfTxs uint64
Time time.Time
LastBlockSigners []BlockSignersRecord
}
type ContractRecord struct {
ContractAddress string
RewardAddress string
DeveloperAddress string
BlockHeight uint64
GasConsumed uint64
ContractRewards GasTrackerReward // For sake of simplicity, we consider only one denom per record
InflationRewards GasTrackerReward
LeftoverRewards GasTrackerReward
CollectPremium bool
GasRebateToUser bool
PremiumPercentageCharged uint64
MetadataJson string
}
type GasTrackerReward struct {
Denom string `json:"denom"`
Amount float64 `json:"amount"`
}
type DataCollectionMode int
const (
PullMode DataCollectionMode = iota + 1
EventMode
)