@@ -174,33 +174,8 @@ var (
174
174
// ModuleBasics defines the module BasicManager is in charge of setting up basic,
175
175
// non-dependant module elements, such as codec registration
176
176
// and genesis verification.
177
- ModuleBasics = module .NewBasicManager (
178
- auth.AppModuleBasic {},
179
- genutil.AppModuleBasic {},
180
- bank.AppModuleBasic {},
181
- capability.AppModuleBasic {},
182
- staking.AppModuleBasic {},
183
- mint.AppModuleBasic {},
184
- distr.AppModuleBasic {},
185
- gov .NewAppModuleBasic (getGovProposalHandlers ()),
186
- params.AppModuleBasic {},
187
- crisis.AppModuleBasic {},
188
- slashing.AppModuleBasic {},
189
- feegrantmodule.AppModuleBasic {},
190
- upgrade.AppModuleBasic {},
191
- evidence.AppModuleBasic {},
192
- authzmodule.AppModuleBasic {},
193
- ibc.AppModuleBasic {},
194
- transfer.AppModuleBasic {},
195
- vesting.AppModuleBasic {},
196
- ica.AppModuleBasic {},
197
- icactlmodule.AppModuleBasic {},
198
- evm.AppModuleBasic {},
199
- feemarket.AppModuleBasic {},
200
- gravity.AppModuleBasic {},
201
- // this line is used by starport scaffolding # stargate/app/moduleBasic
202
- cronos.AppModuleBasic {},
203
- )
177
+ // Contains experimental modules by default.
178
+ ModuleBasics = GenModuleBasics (true )
204
179
205
180
// module account permissions
206
181
maccPerms = map [string ][]string {
@@ -231,6 +206,40 @@ func init() {
231
206
DefaultNodeHome = filepath .Join (userHomeDir , "." + Name )
232
207
}
233
208
209
+ // GenModuleBasics generate basic module manager according to experimental flag
210
+ func GenModuleBasics (experimental bool ) module.BasicManager {
211
+ basicModules := []module.AppModuleBasic {
212
+ auth.AppModuleBasic {},
213
+ genutil.AppModuleBasic {},
214
+ bank.AppModuleBasic {},
215
+ capability.AppModuleBasic {},
216
+ staking.AppModuleBasic {},
217
+ mint.AppModuleBasic {},
218
+ distr.AppModuleBasic {},
219
+ gov .NewAppModuleBasic (getGovProposalHandlers ()),
220
+ params.AppModuleBasic {},
221
+ crisis.AppModuleBasic {},
222
+ slashing.AppModuleBasic {},
223
+ feegrantmodule.AppModuleBasic {},
224
+ upgrade.AppModuleBasic {},
225
+ evidence.AppModuleBasic {},
226
+ authzmodule.AppModuleBasic {},
227
+ ibc.AppModuleBasic {},
228
+ transfer.AppModuleBasic {},
229
+ vesting.AppModuleBasic {},
230
+ ica.AppModuleBasic {},
231
+ icactlmodule.AppModuleBasic {},
232
+ evm.AppModuleBasic {},
233
+ feemarket.AppModuleBasic {},
234
+ // this line is used by starport scaffolding # stargate/app/moduleBasic
235
+ cronos.AppModuleBasic {},
236
+ }
237
+ if experimental {
238
+ basicModules = append (basicModules , gravity.AppModuleBasic {})
239
+ }
240
+ return module .NewBasicManager (basicModules ... )
241
+ }
242
+
234
243
// App extends an ABCI application, but with most of its parameters exported.
235
244
// They are exported for convenience in creating helper functions, as object
236
245
// capabilities aren't needed for testing.
@@ -293,6 +302,9 @@ type App struct {
293
302
294
303
// module configurator
295
304
configurator module.Configurator
305
+
306
+ // if enable experimental gravity-bridge feature module
307
+ experimental bool
296
308
}
297
309
298
310
// New returns a reference to an initialized chain.
@@ -346,6 +358,7 @@ func New(
346
358
keys : keys ,
347
359
tkeys : tkeys ,
348
360
memKeys : memKeys ,
361
+ experimental : experimental ,
349
362
}
350
363
351
364
app .ParamsKeeper = initParamsKeeper (appCodec , cdc , keys [paramstypes .StoreKey ], tkeys [paramstypes .TStoreKey ], experimental )
0 commit comments