feat!: integrate autocli and reflection services with simapp legacy (#13746)

* feat!: integrate autocli and reflection services with simapp legacy

* rename alias

* update UPGRADING.md

Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
Aaron Craelius
2022-11-08 12:32:49 +00:00
committed by GitHub
co-authored by Julien Robert
parent a3e1b99f6a
commit 74e9d542d2
8 changed files with 30 additions and 13 deletions
+4 -6
View File
@@ -28,7 +28,7 @@ func (b BaseAppOption) IsManyPerContainerType() {}
func init() {
appmodule.Register(&runtimev1alpha1.Module{},
appmodule.Provide(
ProvideCodecs,
Provide,
ProvideKVStoreKey,
ProvideTransientStoreKey,
ProvideMemoryStoreKey,
@@ -38,7 +38,7 @@ func init() {
)
}
func ProvideCodecs(moduleBasics map[string]AppModuleBasicWrapper) (
func Provide(moduleBasics map[string]AppModuleBasicWrapper) (
codectypes.InterfaceRegistry,
codec.Codec,
*codec.LegacyAmino,
@@ -75,7 +75,7 @@ func ProvideCodecs(moduleBasics map[string]AppModuleBasicWrapper) (
return interfaceRegistry, cdc, amino, app, cdc, msgServiceRouter
}
type appInputs struct {
type AppInputs struct {
depinject.In
AppConfig *appv1alpha1.Config
@@ -83,10 +83,9 @@ type appInputs struct {
AppBuilder *AppBuilder
Modules map[string]AppModuleWrapper
BaseAppOptions []BaseAppOption
AppModules map[string]appmodule.AppModule
}
func SetupAppBuilder(inputs appInputs) {
func SetupAppBuilder(inputs AppInputs) {
mm := &module.Manager{Modules: map[string]module.AppModule{}}
for name, wrapper := range inputs.Modules {
mm.Modules[name] = wrapper.AppModule
@@ -96,7 +95,6 @@ func SetupAppBuilder(inputs appInputs) {
app.config = inputs.Config
app.ModuleManager = mm
app.appConfig = inputs.AppConfig
app.appModules = inputs.AppModules
}
func registerStoreKey(wrapper *AppBuilder, key storetypes.StoreKey) {