You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi team,
I am using this branch when integrate IBC with support of depinject feature to our code. While other modules of IBC like capability, ica, fee... work fine, but the core's sub-modules still not working and I am facing with this error:
panic: can't resolve type github.com/cosmos/ibc-go/v8/modules/core/02-client/types/types.ConsensusHost for github.com/cosmos/ibc-go/v8/modules/core.ProvideModule (~/workspace/ibc-support-depinjection/ibc-go/modules/core/depinject.go:55):
while resolving:
types.ConsensusHost for github.com/cosmos/ibc-go/v8/modules/core.ProvideModule (~/workspace/ibc-support-depinjection/ibc-go/modules/core/depinject.go:55)
After check the code I could see that only the core package have the deinject.go, meanwhile its submodules like 02-client, 03-connection, 04-port ... haven't have any implementation for deinject yet. I think it's because these submodule are not an AppModule.
The modules/core/02-client/types/types.ConsensusHost can be achieved by calling this function, it require the StakingKeeper refer to this line. So can this suggestion possible when modify the modules/core/depinject.go:
// ModuleInputs defines the core module inputs for depinject.
type ModuleInputs struct {
depinject.In
Config *modulev1.Module
Cdc codec.Codec
Key *storetypes.KVStoreKey
// ConsensusHost clienttypes.ConsensusHost // <== comment this one
StakingKeeper StakingKeeper // <== add this one
UpgradeKeeper clienttypes.UpgradeKeeper
ScopedKeeper capabilitykeeper.ScopedKeeper
// LegacySubspace is used solely for migration of x/params managed parameters
LegacySubspace paramtypes.Subspace `optional:"true"`
}
// ModuleOutputs defines the core module outputs for depinject.
type ModuleOutputs struct {
depinject.Out
IbcKeeper *ibckeeper.Keeper
Module appmodule.AppModule
}
func ProvideModule(in ModuleInputs) ModuleOutputs {
consensusHost := ibctm.NewConsensusHost(in.StakingKeeper) // <== add this line
// default to governance authority if not provided
authority := authtypes.NewModuleAddress(govtypes.ModuleName)
if in.Config.Authority != "" {
authority = authtypes.NewModuleAddressOrBech32Address(in.Config.Authority)
}
keeper := ibckeeper.NewKeeper(
in.Cdc,
in.Key,
in.LegacySubspace,
// in.ConsensusHost, // <== comment this line
consensusHost, // <== replace with this line
in.UpgradeKeeper,
in.ScopedKeeper,
authority.String(),
)
m := NewAppModule(keeper)
return ModuleOutputs{IbcKeeper: keeper, Module: m}
}
Thanks
The text was updated successfully, but these errors were encountered:
Hi team,
I am using this branch when integrate IBC with support of depinject feature to our code. While other modules of IBC like capability, ica, fee... work fine, but the core's sub-modules still not working and I am facing with this error:
After check the code I could see that only the
core
package have the deinject.go, meanwhile its submodules like 02-client, 03-connection, 04-port ... haven't have any implementation for deinject yet. I think it's because these submodule are not an AppModule.The
modules/core/02-client/types/types.ConsensusHost
can be achieved by calling this function, it require the StakingKeeper refer to this line. So can this suggestion possible when modify the modules/core/depinject.go:Thanks
The text was updated successfully, but these errors were encountered: