feat: List HRP prefixes in Bech32 addresses (#13064)
This commit is contained in:
parent
de436c231d
commit
8579bdd17e
@ -44,6 +44,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
||||
* (testutil) [#12973](https://github.com/cosmos/cosmos-sdk/pull/12973) Add generic `testutil.RandSliceElem` function which selects a random element from the list.
|
||||
* (client) [#12936](https://github.com/cosmos/cosmos-sdk/pull/12936) Add capability to preprocess transactions before broadcasting from a higher level chain.
|
||||
* (x/authz) [#13047](https://github.com/cosmos/cosmos-sdk/pull/13047) Add a GetAuthorization function to the keeper.
|
||||
* (cli) [#13064](https://github.com/cosmos/cosmos-sdk/pull/13064) Add `debug prefixes` to list supported HRP prefixes via .
|
||||
* (cli) [#12742](https://github.com/cosmos/cosmos-sdk/pull/12742) Add the `prune` CLI cmd to manually prune app store history versions based on the pruning options.
|
||||
|
||||
### Improvements
|
||||
|
||||
@ -37,6 +37,7 @@ func Cmd() *cobra.Command {
|
||||
cmd.AddCommand(PubkeyRawCmd())
|
||||
cmd.AddCommand(AddrCmd())
|
||||
cmd.AddCommand(RawBytesCmd())
|
||||
cmd.AddCommand(PrefixesCmd())
|
||||
|
||||
return cmd
|
||||
}
|
||||
@ -257,3 +258,18 @@ $ %s debug raw-bytes [72 101 108 108 111 44 32 112 108 97 121 103 114 111 117 11
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func PrefixesCmd() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "prefixes",
|
||||
Short: "List prefixes used for Human-Readable Part (HRP) in Bech32",
|
||||
Long: "List prefixes used in Bech32 addresses.",
|
||||
Example: fmt.Sprintf("$ %s debug prefixes", version.AppName),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
cmd.Printf("Bech32 Acc: %s\n", sdk.GetConfig().GetBech32AccountAddrPrefix())
|
||||
cmd.Printf("Bech32 Val: %s\n", sdk.GetConfig().GetBech32ValidatorAddrPrefix())
|
||||
cmd.Printf("Bech32 Con: %s\n", sdk.GetConfig().GetBech32ConsensusAddrPrefix())
|
||||
return nil
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user