File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import (
1515 "github.com/cosmos/cosmos-sdk/client/flags"
1616 "github.com/cosmos/cosmos-sdk/client/tx"
1717 codectypes "github.com/cosmos/cosmos-sdk/codec/types"
18+ sdk "github.com/cosmos/cosmos-sdk/types"
1819)
1920
2021func TxCmd (name string ) * cobra.Command {
@@ -41,9 +42,9 @@ func QueryCmd(name string) *cobra.Command {
4142
4243func GetTxInitCmd () * cobra.Command {
4344 cmd := & cobra.Command {
44- Use : "init <account-type> <json-message>" ,
45+ Use : "init <account-type> <json-message> <fund>[,<fund>...] " ,
4546 Short : "Initialize a new account" ,
46- Args : cobra .ExactArgs (2 ),
47+ Args : cobra .ExactArgs (3 ),
4748 RunE : func (cmd * cobra.Command , args []string ) error {
4849 clientCtx , err := client .GetClientTxContext (cmd )
4950 if err != nil {
@@ -69,10 +70,15 @@ func GetTxInitCmd() *cobra.Command {
6970 if err != nil {
7071 return err
7172 }
73+ funds , err := sdk .ParseCoinsNormalized (args [2 ])
74+ if err != nil {
75+ return err
76+ }
7277 msg := v1.MsgInit {
7378 Sender : sender ,
7479 AccountType : args [0 ],
7580 Message : msgBytes ,
81+ Funds : funds ,
7682 }
7783
7884 isGenesis , err := cmd .Flags ().GetBool ("genesis" )
You can’t perform that action at this time.
0 commit comments