-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/notional-labs/composable-ce…
…ntauri into dung/keepers-refactor
- Loading branch information
Showing
12 changed files
with
314 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package app | ||
|
||
// AllCapabilities returns all capabilities available with the current wasmvm | ||
// See https://github.com/CosmWasm/cosmwasm/blob/main/docs/CAPABILITIES-BUILT-IN.md | ||
// This functionality is going to be moved upstream: https://github.com/CosmWasm/wasmvm/issues/425 | ||
func AllCapabilities() []string { | ||
return []string{ | ||
"iterator", | ||
"staking", | ||
"stargate", | ||
"cosmwasm_1_1", | ||
"cosmwasm_1_2", | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/cosmos/cosmos-sdk/types/bech32" | ||
|
||
"github.com/spf13/cobra" | ||
) | ||
|
||
var flagBech32Prefix = "prefix" | ||
|
||
// AddBech32ConvertCommand returns bech32-convert cobra Command. | ||
func AddBech32ConvertCommand() *cobra.Command { | ||
cmd := &cobra.Command{ | ||
Use: "bech32-convert [address]", | ||
Short: "Convert any bech32 string to the centauri prefix", | ||
Long: `Convert any bech32 string to the centauri prefix | ||
Example: | ||
centaurid debug bech32-convert akash1a6zlyvpnksx8wr6wz8wemur2xe8zyh0ytz6d88 | ||
centaurid debug bech32-convert stride1673f0t8p893rqyqe420mgwwz92ac4qv6synvx2 --prefix osmo | ||
`, | ||
Args: cobra.ExactArgs(1), | ||
RunE: func(cmd *cobra.Command, args []string) error { | ||
bech32prefix, err := cmd.Flags().GetString(flagBech32Prefix) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
_, bz, err := bech32.DecodeAndConvert(args[0]) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
bech32Addr, err := bech32.ConvertAndEncode(bech32prefix, bz) | ||
if err != nil { | ||
panic(err) | ||
} | ||
|
||
cmd.Println(bech32Addr) | ||
|
||
return nil | ||
}, | ||
} | ||
|
||
cmd.Flags().StringP(flagBech32Prefix, "p", "centauri", "Bech32 Prefix to encode to") | ||
|
||
return cmd | ||
} | ||
|
||
// addDebugCommands injects custom debug commands into another command as children. | ||
func addDebugCommands(cmd *cobra.Command) *cobra.Command { | ||
cmd.AddCommand(AddBech32ConvertCommand()) | ||
return cmd | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.