CosmWasm / wasmd

Basic cosmos-sdk app with web assembly smart contracts
Other
364 stars 395 forks source link

Support dependency injection feature from cosmos sdk #1929

Closed QuocThi closed 1 month ago

QuocThi commented 1 month ago

Hi team, I checked and see that currently wasmd's module still not apply depinject, and also see this issue opened on IBC's repository that you also stucked with the depinject for a long time ago. From the above issue you were expected to support depinject from 0.41 release, but seem not yet. For now, IBC already applied depinject for there modules on this branch: https://github.com/cosmos/ibc-go/tree/feat/depinject. We use both IBC and wasmd module, when I import ibc's modules from above branch that supported depinject, and init new wasmd keeper using old way (wasmkeeper.NewKeeper()), my binary build failed due to incompatible version of wasmd with ibc with this error, I think there is no work around for this error to continue build and test my binary locally:

../../../../go/pkg/mod/github.com/!cosm!wasm/wasmd@v0.51.0/x/wasm/keeper/test_common.go:371:3: cannot use stakingKeeper (variable of type *"github.com/cosmos/cosmos-sdk/x/staking/keeper".Keeper) as "github.com/cosmos/ibc-go/v8/modules/core/02-client/types".ConsensusHost value in argument to ibckeeper.NewKeeper: *"github.com/cosmos/cosmos-sdk/x/staking/keeper".Keeper does not implement "github.com/cosmos/ibc-go/v8/modules/core/02-client/types".ConsensusHost (missing method GetSelfConsensusState)

So could you please check and share with me the plan to apply this new cosmos feature?

Thanks.

trevormil commented 1 month ago

Not sure if it is related, but I also cannot get x/wasm to be compatible with depinject on the latest version of Ignite CLI.

pinosu commented 1 month ago

Thanks for opening this issue! We will add this to the backlog and it will probably be part of one of the next releases. This is a duplicate of #1286 that was blocked for some time and now is unblocked. I will close this issue because it is a duplicate, but you can follow the conversation in #1286