29 lines
992 B
Go
29 lines
992 B
Go
|
package balance
|
||
|
|
||
|
import (
|
||
|
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/util"
|
||
|
"github.com/spf13/cobra"
|
||
|
"github.com/spf13/viper"
|
||
|
)
|
||
|
|
||
|
var DumpCmd = &cobra.Command{
|
||
|
Use: "dump-balances",
|
||
|
Short: "Dump GAS balances",
|
||
|
PreRun: func(cmd *cobra.Command, _ []string) {
|
||
|
_ = viper.BindPFlag(util.EndpointFlag, cmd.Flags().Lookup(util.EndpointFlag))
|
||
|
},
|
||
|
RunE: dumpBalances,
|
||
|
}
|
||
|
|
||
|
func initDumpBalancesCmd() {
|
||
|
DumpCmd.Flags().StringP(util.EndpointFlag, util.EndpointFlagShort, "", util.EndpointFlagDesc)
|
||
|
DumpCmd.Flags().BoolP(dumpBalancesStorageFlag, "s", false, "Dump balances of storage nodes from the current netmap")
|
||
|
DumpCmd.Flags().BoolP(dumpBalancesAlphabetFlag, "a", false, "Dump balances of alphabet contracts")
|
||
|
DumpCmd.Flags().BoolP(dumpBalancesProxyFlag, "p", false, "Dump balances of the proxy contract")
|
||
|
DumpCmd.Flags().Bool(dumpBalancesUseScriptHashFlag, false, "Use script-hash format for addresses")
|
||
|
}
|
||
|
|
||
|
func init() {
|
||
|
initDumpBalancesCmd()
|
||
|
}
|