-
Notifications
You must be signed in to change notification settings - Fork 6
/
modules_params.go
130 lines (125 loc) · 3.51 KB
/
modules_params.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
package helpers
import (
"cosmossdk.io/math"
testenv "github.com/chain4energy/c4e-chain/testutil/env"
cfedistributortypes "github.com/chain4energy/c4e-chain/x/cfedistributor/types"
cfemintertypes "github.com/chain4energy/c4e-chain/x/cfeminter/types"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"time"
)
func GetModuleAccountAddress(moduleName string) string {
return authtypes.NewModuleAddress(moduleName).String()
}
var oneYearDuration = time.Hour * 365
var MainnetSubdistributors = []cfedistributortypes.SubDistributor{
{
Name: "tx_fee_distributor",
Sources: []*cfedistributortypes.Account{
{
Id: "fee_collector",
Type: cfedistributortypes.ModuleAccount,
},
},
Destinations: cfedistributortypes.Destinations{
PrimaryShare: cfedistributortypes.Account{
Id: "c4e_distributor",
Type: cfedistributortypes.Main,
},
BurnShare: sdk.ZeroDec(),
Shares: []*cfedistributortypes.DestinationShare{},
},
},
{
Name: "inflation_and_fee_distributor",
Sources: []*cfedistributortypes.Account{
{
Id: "c4e_distributor",
Type: cfedistributortypes.Main,
},
},
Destinations: cfedistributortypes.Destinations{
PrimaryShare: cfedistributortypes.Account{
Id: cfedistributortypes.ValidatorsRewardsCollector,
Type: cfedistributortypes.ModuleAccount,
},
BurnShare: sdk.ZeroDec(),
Shares: []*cfedistributortypes.DestinationShare{
{
Name: "usage_incentives",
Share: sdk.MustNewDecFromStr("0.3"),
Destination: cfedistributortypes.Account{
Id: "usage_incentives_collector",
Type: cfedistributortypes.InternalAccount,
},
},
},
},
},
{
Name: "usage_incentives_distributor",
Sources: []*cfedistributortypes.Account{
{
Id: "usage_incentives_collector",
Type: cfedistributortypes.InternalAccount,
},
},
Destinations: cfedistributortypes.Destinations{
PrimaryShare: cfedistributortypes.Account{
Id: "green_energy_booster_collector",
Type: cfedistributortypes.ModuleAccount,
},
BurnShare: sdk.ZeroDec(),
Shares: []*cfedistributortypes.DestinationShare{
{
Name: "governance_booster",
Share: sdk.MustNewDecFromStr("0.33"),
Destination: cfedistributortypes.Account{
Id: "governance_booster_collector",
Type: cfedistributortypes.ModuleAccount,
},
},
},
},
},
}
var minterConfigLongEndTime = time.Now().Add(16 * oneYearDuration).UTC()
var MainnetMinterConfigLong = cfemintertypes.Params{
MintDenom: testenv.DefaultTestDenom,
StartTime: time.Now().UTC(),
Minters: []*cfemintertypes.Minter{
{
SequenceId: 1,
Config: exponentialStepMintingConfig,
EndTime: &minterConfigLongEndTime,
},
},
}
var exponentialStepMintingConfig, _ = codectypes.NewAnyWithValue(
&cfemintertypes.ExponentialStepMinting{
Amount: math.NewInt(160000000000000),
AmountMultiplier: sdk.MustNewDecFromStr("0.5"),
StepDuration: time.Second * 12,
},
)
var noMintingConfig, _ = codectypes.NewAnyWithValue(
&cfemintertypes.NoMinting{},
)
var timeNow = time.Now()
var minterConfigShortEndTime = timeNow.Add(time.Second * 48).UTC()
var MainnetMinterConfigShort = cfemintertypes.Params{
MintDenom: testenv.DefaultTestDenom,
StartTime: time.Now().UTC(),
Minters: []*cfemintertypes.Minter{
{
SequenceId: 1,
Config: exponentialStepMintingConfig,
EndTime: &minterConfigShortEndTime,
},
{
SequenceId: 2,
Config: noMintingConfig,
},
},
}