-
Notifications
You must be signed in to change notification settings - Fork 827
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add add-wasm-genesis-message to seid (#670)
- Loading branch information
1 parent
d78ce64
commit af312f6
Showing
2 changed files
with
28 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/cosmos/cosmos-sdk/client" | ||
"github.com/spf13/cobra" | ||
|
||
wasmcli "github.com/CosmWasm/wasmd/x/wasm/client/cli" | ||
) | ||
|
||
func AddGenesisWasmMsgCmd(defaultNodeHome string) *cobra.Command { | ||
txCmd := &cobra.Command{ | ||
Use: "add-wasm-genesis-message", | ||
Short: "Wasm genesis subcommands", | ||
DisableFlagParsing: true, | ||
SuggestionsMinimumDistance: 2, | ||
RunE: client.ValidateCmd, | ||
} | ||
genesisIO := wasmcli.NewDefaultGenesisIO() | ||
txCmd.AddCommand( | ||
wasmcli.GenesisStoreCodeCmd(defaultNodeHome, genesisIO), | ||
wasmcli.GenesisInstantiateContractCmd(defaultNodeHome, genesisIO), | ||
wasmcli.GenesisExecuteContractCmd(defaultNodeHome, genesisIO), | ||
wasmcli.GenesisListContractsCmd(defaultNodeHome, genesisIO), | ||
wasmcli.GenesisListCodesCmd(defaultNodeHome, genesisIO), | ||
) | ||
return txCmd | ||
} |
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