Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &cobra.Command{
Use: "gas",
Short: "Gas utilities",
}
View Source
var PriceCommand = &cobra.Command{ Use: "price", Short: "Gets the current gas price in Gwei", PreRun: cli.Connect, Args: cobra.NoArgs, Run: func(cmd *cobra.Command, args []string) { price, err := cli.Conn.SuggestGasPrice(context.Background()) cli.CheckErr(cmd, err) gwei := units.ConvertInt(price, units.Wei, units.Gwei) cmd.Printf("%s gwei\n", gwei.Text('f', 2)) }, }
Functions ¶
func GetFlagValue ¶ added in v0.0.3
GetFlagValue returns the flag value converted from Gwei to Wei.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.