Skip to content

Commit

Permalink
refactor: add SetBech32 account
Browse files Browse the repository at this point in the history
  • Loading branch information
hoank101 committed Jan 19, 2024
1 parent 7760e39 commit 8d05fb2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmd/migalood/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

import (
"errors"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"

Check failure on line 5 in cmd/migalood/cmd/root.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gofumpt`-ed (gofumpt)

Check failure on line 5 in cmd/migalood/cmd/root.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gofumpt`-ed (gofumpt)
"io"
"os"
"path/filepath"

Check failure on line 8 in cmd/migalood/cmd/root.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gofumpt`-ed (gofumpt)

Check failure on line 8 in cmd/migalood/cmd/root.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gofumpt`-ed (gofumpt)
Expand Down Expand Up @@ -54,6 +55,13 @@ import (
func NewRootCmd() (*cobra.Command, params.EncodingConfig) {
encodingConfig := app.MakeEncodingConfig()

cfg := sdk.GetConfig()
cfg.SetBech32PrefixForAccount(params.Bech32PrefixAccAddr, params.Bech32PrefixAccPub)
cfg.SetBech32PrefixForValidator(params.Bech32PrefixValAddr, params.Bech32PrefixValPub)
cfg.SetBech32PrefixForConsensusNode(params.Bech32PrefixConsAddr, params.Bech32PrefixConsPub)
cfg.SetAddressVerifier(wasmtypes.VerifyAddressLen())
cfg.Seal()

initClientCtx := client.Context{}.
WithCodec(encodingConfig.Codec).
WithInterfaceRegistry(encodingConfig.InterfaceRegistry).
Expand Down

0 comments on commit 8d05fb2

Please sign in to comment.