@@ -93,15 +93,15 @@ var initGenesisOrder = []string{
93
93
94
94
// Config should never need to be instantiated manually and is solely used for ModuleOption.
95
95
type Config struct {
96
- moduleConfigs map [string ]* appv1alpha1.ModuleConfig
96
+ ModuleConfigs map [string ]* appv1alpha1.ModuleConfig
97
97
setInitGenesis bool
98
98
}
99
99
100
100
type ModuleOption func (config * Config )
101
101
102
102
func BankModule () ModuleOption {
103
103
return func (config * Config ) {
104
- config .moduleConfigs ["bank" ] = & appv1alpha1.ModuleConfig {
104
+ config .ModuleConfigs ["bank" ] = & appv1alpha1.ModuleConfig {
105
105
Name : "bank" ,
106
106
Config : appconfig .WrapAny (& bankmodulev1.Module {}),
107
107
}
@@ -110,7 +110,7 @@ func BankModule() ModuleOption {
110
110
111
111
func AuthModule () ModuleOption {
112
112
return func (config * Config ) {
113
- config .moduleConfigs ["auth" ] = & appv1alpha1.ModuleConfig {
113
+ config .ModuleConfigs ["auth" ] = & appv1alpha1.ModuleConfig {
114
114
Name : "auth" ,
115
115
Config : appconfig .WrapAny (& authmodulev1.Module {
116
116
Bech32Prefix : "cosmos" ,
@@ -130,7 +130,7 @@ func AuthModule() ModuleOption {
130
130
131
131
func ParamsModule () ModuleOption {
132
132
return func (config * Config ) {
133
- config .moduleConfigs ["params" ] = & appv1alpha1.ModuleConfig {
133
+ config .ModuleConfigs ["params" ] = & appv1alpha1.ModuleConfig {
134
134
Name : "params" ,
135
135
Config : appconfig .WrapAny (& paramsmodulev1.Module {}),
136
136
}
@@ -139,7 +139,7 @@ func ParamsModule() ModuleOption {
139
139
140
140
func TxModule () ModuleOption {
141
141
return func (config * Config ) {
142
- config .moduleConfigs ["tx" ] = & appv1alpha1.ModuleConfig {
142
+ config .ModuleConfigs ["tx" ] = & appv1alpha1.ModuleConfig {
143
143
Name : "tx" ,
144
144
Config : appconfig .WrapAny (& txconfigv1.Config {}),
145
145
}
@@ -148,7 +148,7 @@ func TxModule() ModuleOption {
148
148
149
149
func StakingModule () ModuleOption {
150
150
return func (config * Config ) {
151
- config .moduleConfigs ["staking" ] = & appv1alpha1.ModuleConfig {
151
+ config .ModuleConfigs ["staking" ] = & appv1alpha1.ModuleConfig {
152
152
Name : "staking" ,
153
153
Config : appconfig .WrapAny (& stakingmodulev1.Module {}),
154
154
}
@@ -157,7 +157,7 @@ func StakingModule() ModuleOption {
157
157
158
158
func SlashingModule () ModuleOption {
159
159
return func (config * Config ) {
160
- config .moduleConfigs ["slashing" ] = & appv1alpha1.ModuleConfig {
160
+ config .ModuleConfigs ["slashing" ] = & appv1alpha1.ModuleConfig {
161
161
Name : "slashing" ,
162
162
Config : appconfig .WrapAny (& slashingmodulev1.Module {}),
163
163
}
@@ -166,7 +166,7 @@ func SlashingModule() ModuleOption {
166
166
167
167
func GenutilModule () ModuleOption {
168
168
return func (config * Config ) {
169
- config .moduleConfigs ["genutil" ] = & appv1alpha1.ModuleConfig {
169
+ config .ModuleConfigs ["genutil" ] = & appv1alpha1.ModuleConfig {
170
170
Name : "genutil" ,
171
171
Config : appconfig .WrapAny (& genutilmodulev1.Module {}),
172
172
}
@@ -175,7 +175,7 @@ func GenutilModule() ModuleOption {
175
175
176
176
func DistributionModule () ModuleOption {
177
177
return func (config * Config ) {
178
- config .moduleConfigs ["distribution" ] = & appv1alpha1.ModuleConfig {
178
+ config .ModuleConfigs ["distribution" ] = & appv1alpha1.ModuleConfig {
179
179
Name : "distribution" ,
180
180
Config : appconfig .WrapAny (& distrmodulev1.Module {}),
181
181
}
@@ -184,7 +184,7 @@ func DistributionModule() ModuleOption {
184
184
185
185
func FeegrantModule () ModuleOption {
186
186
return func (config * Config ) {
187
- config .moduleConfigs ["feegrant" ] = & appv1alpha1.ModuleConfig {
187
+ config .ModuleConfigs ["feegrant" ] = & appv1alpha1.ModuleConfig {
188
188
Name : "feegrant" ,
189
189
Config : appconfig .WrapAny (& feegrantmodulev1.Module {}),
190
190
}
@@ -193,7 +193,7 @@ func FeegrantModule() ModuleOption {
193
193
194
194
func VestingModule () ModuleOption {
195
195
return func (config * Config ) {
196
- config .moduleConfigs ["vesting" ] = & appv1alpha1.ModuleConfig {
196
+ config .ModuleConfigs ["vesting" ] = & appv1alpha1.ModuleConfig {
197
197
Name : "vesting" ,
198
198
Config : appconfig .WrapAny (& vestingmodulev1.Module {}),
199
199
}
@@ -202,7 +202,7 @@ func VestingModule() ModuleOption {
202
202
203
203
func GovModule () ModuleOption {
204
204
return func (config * Config ) {
205
- config .moduleConfigs ["gov" ] = & appv1alpha1.ModuleConfig {
205
+ config .ModuleConfigs ["gov" ] = & appv1alpha1.ModuleConfig {
206
206
Name : "gov" ,
207
207
Config : appconfig .WrapAny (& govmodulev1.Module {}),
208
208
}
@@ -211,7 +211,7 @@ func GovModule() ModuleOption {
211
211
212
212
func ConsensusModule () ModuleOption {
213
213
return func (config * Config ) {
214
- config .moduleConfigs ["consensus" ] = & appv1alpha1.ModuleConfig {
214
+ config .ModuleConfigs ["consensus" ] = & appv1alpha1.ModuleConfig {
215
215
Name : "consensus" ,
216
216
Config : appconfig .WrapAny (& consensusmodulev1.Module {}),
217
217
}
@@ -220,7 +220,7 @@ func ConsensusModule() ModuleOption {
220
220
221
221
func MintModule () ModuleOption {
222
222
return func (config * Config ) {
223
- config .moduleConfigs ["mint" ] = & appv1alpha1.ModuleConfig {
223
+ config .ModuleConfigs ["mint" ] = & appv1alpha1.ModuleConfig {
224
224
Name : "mint" ,
225
225
Config : appconfig .WrapAny (& mintmodulev1.Module {}),
226
226
GolangBindings : []* appv1alpha1.GolangBinding {
@@ -235,7 +235,7 @@ func MintModule() ModuleOption {
235
235
236
236
func EvidenceModule () ModuleOption {
237
237
return func (config * Config ) {
238
- config .moduleConfigs ["evidence" ] = & appv1alpha1.ModuleConfig {
238
+ config .ModuleConfigs ["evidence" ] = & appv1alpha1.ModuleConfig {
239
239
Name : "evidence" ,
240
240
Config : appconfig .WrapAny (& evidencemodulev1.Module {}),
241
241
}
@@ -244,7 +244,7 @@ func EvidenceModule() ModuleOption {
244
244
245
245
func AuthzModule () ModuleOption {
246
246
return func (config * Config ) {
247
- config .moduleConfigs ["authz" ] = & appv1alpha1.ModuleConfig {
247
+ config .ModuleConfigs ["authz" ] = & appv1alpha1.ModuleConfig {
248
248
Name : "authz" ,
249
249
Config : appconfig .WrapAny (& authzmodulev1.Module {}),
250
250
}
@@ -253,7 +253,7 @@ func AuthzModule() ModuleOption {
253
253
254
254
func GroupModule () ModuleOption {
255
255
return func (config * Config ) {
256
- config .moduleConfigs ["group" ] = & appv1alpha1.ModuleConfig {
256
+ config .ModuleConfigs ["group" ] = & appv1alpha1.ModuleConfig {
257
257
Name : "group" ,
258
258
Config : appconfig .WrapAny (& groupmodulev1.Module {}),
259
259
}
@@ -262,7 +262,7 @@ func GroupModule() ModuleOption {
262
262
263
263
func NFTModule () ModuleOption {
264
264
return func (config * Config ) {
265
- config .moduleConfigs ["nft" ] = & appv1alpha1.ModuleConfig {
265
+ config .ModuleConfigs ["nft" ] = & appv1alpha1.ModuleConfig {
266
266
Name : "nft" ,
267
267
Config : appconfig .WrapAny (& nftmodulev1.Module {}),
268
268
}
@@ -271,7 +271,7 @@ func NFTModule() ModuleOption {
271
271
272
272
func CircuitModule () ModuleOption {
273
273
return func (config * Config ) {
274
- config .moduleConfigs ["circuit" ] = & appv1alpha1.ModuleConfig {
274
+ config .ModuleConfigs ["circuit" ] = & appv1alpha1.ModuleConfig {
275
275
Name : "circuit" ,
276
276
Config : appconfig .WrapAny (& circuitmodulev1.Module {}),
277
277
}
@@ -286,7 +286,7 @@ func OmitInitGenesis() ModuleOption {
286
286
287
287
func NewAppConfig (opts ... ModuleOption ) depinject.Config {
288
288
cfg := & Config {
289
- moduleConfigs : make (map [string ]* appv1alpha1.ModuleConfig ),
289
+ ModuleConfigs : make (map [string ]* appv1alpha1.ModuleConfig ),
290
290
setInitGenesis : true ,
291
291
}
292
292
for _ , opt := range opts {
@@ -299,24 +299,24 @@ func NewAppConfig(opts ...ModuleOption) depinject.Config {
299
299
overrides := make ([]* runtimev1alpha1.StoreKeyConfig , 0 )
300
300
301
301
for _ , s := range beginBlockOrder {
302
- if _ , ok := cfg .moduleConfigs [s ]; ok {
302
+ if _ , ok := cfg .ModuleConfigs [s ]; ok {
303
303
beginBlockers = append (beginBlockers , s )
304
304
}
305
305
}
306
306
307
307
for _ , s := range endBlockersOrder {
308
- if _ , ok := cfg .moduleConfigs [s ]; ok {
308
+ if _ , ok := cfg .ModuleConfigs [s ]; ok {
309
309
endBlockers = append (endBlockers , s )
310
310
}
311
311
}
312
312
313
313
for _ , s := range initGenesisOrder {
314
- if _ , ok := cfg .moduleConfigs [s ]; ok {
314
+ if _ , ok := cfg .ModuleConfigs [s ]; ok {
315
315
initGenesis = append (initGenesis , s )
316
316
}
317
317
}
318
318
319
- if _ , ok := cfg .moduleConfigs ["auth" ]; ok {
319
+ if _ , ok := cfg .ModuleConfigs ["auth" ]; ok {
320
320
overrides = append (overrides , & runtimev1alpha1.StoreKeyConfig {ModuleName : "auth" , KvStoreKey : "acc" })
321
321
}
322
322
@@ -335,7 +335,7 @@ func NewAppConfig(opts ...ModuleOption) depinject.Config {
335
335
Config : appconfig .WrapAny (runtimeConfig ),
336
336
}}
337
337
338
- for _ , m := range cfg .moduleConfigs {
338
+ for _ , m := range cfg .ModuleConfigs {
339
339
modules = append (modules , m )
340
340
}
341
341
0 commit comments