2024-02-01 13:58:48 +00:00
|
|
|
package notary
|
|
|
|
|
|
|
|
import (
|
2024-02-02 12:04:48 +00:00
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/commonflags"
|
2024-02-01 13:58:48 +00:00
|
|
|
"github.com/spf13/cobra"
|
|
|
|
"github.com/spf13/viper"
|
|
|
|
)
|
|
|
|
|
|
|
|
var DepositCmd = &cobra.Command{
|
|
|
|
Use: "deposit-notary",
|
|
|
|
Short: "Deposit GAS for notary service",
|
|
|
|
PreRun: func(cmd *cobra.Command, _ []string) {
|
2024-02-02 12:04:48 +00:00
|
|
|
_ = viper.BindPFlag(commonflags.EndpointFlag, cmd.Flags().Lookup(commonflags.EndpointFlag))
|
2024-02-01 13:58:48 +00:00
|
|
|
},
|
|
|
|
RunE: depositNotary,
|
|
|
|
}
|
|
|
|
|
|
|
|
func initDepositoryNotaryCmd() {
|
2024-02-02 12:04:48 +00:00
|
|
|
DepositCmd.Flags().StringP(commonflags.EndpointFlag, commonflags.EndpointFlagShort, "", commonflags.EndpointFlagDesc)
|
|
|
|
DepositCmd.Flags().String(commonflags.StorageWalletFlag, "", "Path to storage node wallet")
|
2024-02-01 13:58:48 +00:00
|
|
|
DepositCmd.Flags().String(walletAccountFlag, "", "Wallet account address")
|
2024-02-02 12:04:48 +00:00
|
|
|
DepositCmd.Flags().String(commonflags.RefillGasAmountFlag, "", "Amount of GAS to deposit")
|
2024-02-01 13:58:48 +00:00
|
|
|
DepositCmd.Flags().String(notaryDepositTillFlag, "", "Notary deposit duration in blocks")
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
initDepositoryNotaryCmd()
|
|
|
|
}
|