Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
co-authored by
Julien Robert
parent
cea0fb50bb
commit
6838d1d111
+2
-2
@@ -31,9 +31,9 @@ clientCtx = clientCtx.
|
||||
+ WithValidatorPrefix("cosmosvaloper")
|
||||
```
|
||||
|
||||
**When using `depinject` / `app v2`, the client codecs can be provided directly from application config.**
|
||||
**When using `depinject` / `app_di`, the client codecs can be provided directly from application config.**
|
||||
|
||||
Refer to SimApp `root_v2.go` and `root.go` for an example with an app v2 and a legacy app.
|
||||
Refer to SimApp `root_v2.go` and `root.go` for an example with an app di and a legacy app.
|
||||
|
||||
Additionally, a simplification of the start command leads to the following change:
|
||||
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ Here are the steps to use AutoCLI:
|
||||
|
||||
1. Ensure your app's modules implements the `appmodule.AppModule` interface.
|
||||
2. (optional) Configure how to behave as `autocli` command generation, by implementing the `func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions` method on the module.
|
||||
3. Use the `autocli.AppOptions` struct to specify the modules you defined. If you are using `depinject` / app v2, it can automatically create an instance of `autocli.AppOptions` based on your app's configuration.
|
||||
3. Use the `autocli.AppOptions` struct to specify the modules you defined. If you are using `depinject`, it can automatically create an instance of `autocli.AppOptions` based on your app's configuration.
|
||||
4. Use the `EnhanceRootCommand()` method provided by `autocli` to add the CLI commands for the specified modules to your root command.
|
||||
|
||||
:::tip
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ be a matter of minutes and not even require them to be awake at that time.
|
||||
## Integrating With An App
|
||||
|
||||
:::tip
|
||||
The following is not required for users using `depinject` / app v2, this is abstracted for them.
|
||||
The following is not required for users using `depinject`, this is abstracted for them.
|
||||
:::
|
||||
|
||||
In addition to basic module wiring, setup the upgrade Keeper for the app and then define a `PreBlocker` that calls the upgrade
|
||||
|
||||
+1
-1
@@ -260,7 +260,7 @@ Here's an example of a concrete integration within an `simapp`:
|
||||
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/simapp/app.go#L411-L434
|
||||
```
|
||||
|
||||
This is the same example from `runtime` (the package that powers app v2):
|
||||
This is the same example from `runtime` (the package that powers app di):
|
||||
|
||||
```go reference
|
||||
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/runtime/module.go#L61
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ func TestSimAppExportAndBlockedAddrs(t *testing.T) {
|
||||
AppOpts: simtestutil.NewAppOptionsWithFlagHome(t.TempDir()),
|
||||
})
|
||||
|
||||
// BlockedAddresses returns a map of addresses in app v1 and a map of modules name in app v2.
|
||||
// BlockedAddresses returns a map of addresses in app v1 and a map of modules name in app di.
|
||||
for acc := range BlockedAddresses() {
|
||||
var addr sdk.AccAddress
|
||||
if modAddr, err := sdk.AccAddressFromBech32(acc); err == nil {
|
||||
|
||||
Reference in New Issue
Block a user