Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(accounts): re-introduce bundler #21562

Merged
merged 22 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,22 @@ Additionally, a simplification of the start command leads to the following chang

#### Server (`app.go`)

##### TX Decoder

In order to support x/accounts properly we need to init a `TxDecoder`:
testinginprod marked this conversation as resolved.
Show resolved Hide resolved

```diff
import (
+ txdecode "cosmossdk.io/x/tx/decode"
)
+ txDecoder, err := txdecode.NewDecoder(txdecode.Options{
+ SigningContext: signingCtx,
+ ProtoCodec: appCodec,
+ })
+ if err != nil {
+ panic(err)
+ }
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Critical: TX Decoder initialization and Module Manager changes

Several important changes have been made to the application structure:

  1. TX Decoder initialization:

    • A new TxDecoder must be initialized to support x/accounts properly.
    • Add the following code to your app.go:
      txDecoder, err := txdecode.NewDecoder(txdecode.Options{
          SigningContext: signingCtx,
          ProtoCodec:     appCodec,
      })
      if err != nil {
          panic(err)
      }
  2. Module Manager simplification:

    • The basic module manager has been removed.
    • For depinject users, it's no longer necessary to supply a map[string]module.AppModuleBasic.
    • Custom parameters can be supplied directly.
  3. Module registration changes:

    • Call RegisterLegacyAminoCodec and RegisterInterfaces on the module manager instead of the basic module manager.

Update your application's app.go to incorporate these changes:

  1. Initialize the new TX Decoder.
  2. Remove references to the basic module manager.
  3. Update module registration calls to use the module manager directly.

These changes are crucial for proper functioning of your application with the new SDK version.

🧰 Tools
🪛 LanguageTool

[style] ~89-~89: Consider a shorter alternative to avoid wordiness.
Context: ...## Server (app.go) ##### TX Decoder In order to support x/accounts properly we need to ...

(IN_ORDER_TO_PREMIUM)


[uncategorized] ~90-~90: Possible missing comma found.
Context: ...Decoder In order to support x/accounts properly we need to init a TxDecoder: ```diff...

(AI_HYDRA_LEO_MISSING_COMMA)


[grammar] ~90-~90: Normally, after “need to” a verb is expected.
Context: ... to support x/accounts properly we need to init a TxDecoder: ```diff import ( + txd...

(WANT_TO_NN)

🪛 Markdownlint

103-103: null
Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

##### Module Manager

The basic module manager has been deleted. It was not necessary anymore and was simplified to use the `module.Manager` directly.
Expand Down

Large diffs are not rendered by default.

Loading
Loading