Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "send [from address] [to address] [amount]", Short: "Send fil from one managed address to any other address", Long: `Send fil from one managed address to any other address`, Args: cobra.ExactArgs(3), PreRun: func(cmd *cobra.Command, args []string) { err := viper.BindPFlags(cmd.Flags()) c.CheckErr(err) }, Run: func(cmd *cobra.Command, args []string) { ctx, cancel := context.WithTimeout(context.Background(), c.CmdTimeout) defer cancel() from := args[0] to := args[1] amount, ok := new(big.Int).SetString(args[2], 10) if !ok { c.CheckErr(fmt.Errorf("parsing amount %v", args[2])) } _, err := c.PowClient.Wallet.SendFil(c.MustAuthCtx(ctx), from, to, amount) c.CheckErr(err) }, }
Cmd is the command.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.