-
Notifications
You must be signed in to change notification settings - Fork 199
/
economicsConfig.go
58 lines (51 loc) · 1.66 KB
/
economicsConfig.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
49
50
51
52
53
54
55
56
57
58
package config
// GlobalSettings will hold general economic values
type GlobalSettings struct {
GenesisTotalSupply string
MinimumInflation float64
YearSettings []*YearSetting
Denomination int
GenesisMintingSenderAddress string
}
// YearSetting will hold the maximum inflation rate for year
type YearSetting struct {
Year uint32
MaximumInflation float64
}
// RewardsSettings holds the economics rewards config changes by epoch
type RewardsSettings struct {
RewardsConfigByEpoch []EpochRewardSettings
}
// EpochRewardSettings holds the economics rewards settings for a specific epoch
type EpochRewardSettings struct {
LeaderPercentage float64
DeveloperPercentage float64
ProtocolSustainabilityPercentage float64
ProtocolSustainabilityAddress string
TopUpGradientPoint string
TopUpFactor float64
EpochEnable uint32
}
// GasLimitSetting will hold gas limit setting for a specific epoch
type GasLimitSetting struct {
EnableEpoch uint32
MaxGasLimitPerBlock string
MaxGasLimitPerMiniBlock string
MaxGasLimitPerMetaBlock string
MaxGasLimitPerMetaMiniBlock string
MaxGasLimitPerTx string
MinGasLimit string
}
// FeeSettings will hold economics fee settings
type FeeSettings struct {
GasLimitSettings []GasLimitSetting
GasPerDataByte string
MinGasPrice string
GasPriceModifier float64
}
// EconomicsConfig will hold economics config
type EconomicsConfig struct {
GlobalSettings GlobalSettings
RewardsSettings RewardsSettings
FeeSettings FeeSettings
}