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,
Is there anywhere to change the order of which module should be initialized before and after when use the depinject.
Please correct me if I'm wrong, as I understand we need this import type (usually in app_config.go or app_v2.go): _ "github.com/cosmos/cosmos-sdk/x/bank" to call the init() function of the bank module to init depinject for it at the start of the app.
I tried to change the order of import line but seem it is not impact to the actual start process. It still run into an error:
panic: can't resolve type github.com/CosmWasm/wasmd/x/wasm/types/types.DistributionKeeper for github.com/CosmWasm/wasmd/x/wasm.ProvideModule (~/workspace/wasmd/x/wasm/module.go:381):
while resolving:
types.DistributionKeeper for github.com/CosmWasm/wasmd/x/wasm.ProvideModule
After debug the cosmossdk.io/depinject in container.go I could see that at the time it run init() for wasm there no data of DistributionKeeper, but other module like Bank, Auth have data because it start before the wasm.
Thanks
The text was updated successfully, but these errors were encountered:
The import order doesn't really matter. Are you sure you have the distribution module correctly wired and that wasm/types/types.DistributionKeeper matches the distribution module interface?
Summary
Hi Team,
Is there anywhere to change the order of which module should be initialized before and after when use the depinject.
Please correct me if I'm wrong, as I understand we need this import type (usually in
app_config.go
orapp_v2.go
):_ "github.com/cosmos/cosmos-sdk/x/bank"
to call theinit()
function of thebank
module to init depinject for it at the start of the app.I tried to change the order of import line but seem it is not impact to the actual start process. It still run into an error:
After debug the
cosmossdk.io/depinject
incontainer.go
I could see that at the time it run init() forwasm
there no data of DistributionKeeper, but other module likeBank
,Auth
have data because it start before thewasm
.Thanks
The text was updated successfully, but these errors were encountered: