refactor(core)!: cleanup dependency graph (#18866)
Co-authored-by: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com>
This commit is contained in:
co-authored by
Likhita Polavarapu
parent
f431a5039c
commit
bde7eb1a4d
+19
-9
@@ -104,18 +104,28 @@ All methods, structs and their fields must be public for `depinject`.
|
||||
|
||||
5. Create a function named `ProvideModule` (as called in 1.) and use the inputs for instantiating the module outputs.
|
||||
|
||||
```go reference
|
||||
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/group/module/module.go#L220-L235
|
||||
```
|
||||
```go reference
|
||||
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/group/module/module.go#L220-L235
|
||||
```
|
||||
|
||||
The `ProvideModule` function should return an instance of `cosmossdk.io/core/appmodule.AppModule` which implements
|
||||
one or more app module extension interfaces for initializing the module.
|
||||
|
||||
Following is the complete app wiring configuration for `group`:
|
||||
|
||||
```go reference
|
||||
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/group/module/module.go#L194-L235
|
||||
```
|
||||
|
||||
6. All modules must implement `depinject.OnePerModuleType` interface. This is used in order to tell the dependency injection framework that the module can only be instantiated once.
|
||||
|
||||
```go reference
|
||||
https://github.com/cosmos/cosmos-sdk/blob/f4bdec3433373cc4950f4680743e969495763fbb/x/group/module/module.go#L64-L65
|
||||
```
|
||||
|
||||
|
||||
The `ProvideModule` function should return an instance of `cosmossdk.io/core/appmodule.AppModule` which implements
|
||||
one or more app module extension interfaces for initializing the module.
|
||||
|
||||
Following is the complete app wiring configuration for `group`:
|
||||
|
||||
```go reference
|
||||
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/group/module/module.go#L194-L235
|
||||
```
|
||||
|
||||
The module is now ready to be used with `depinject` by a chain developer.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user