You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fmt.Println("Your fee distributor has not been initialized yet so you cannot create a new validator.\nPlease run `rocketpool node initialize-fee-distributor` to initialize it first.")
75
-
return nil
76
-
}
77
-
78
-
// Post a warning about fee distribution
79
-
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("%sNOTE: By creating a new validator, your node will automatically claim and distribute any balance you have in your fee distributor contract. If you don't want to claim your balance at this time, you should not create a new minipool.%s\nWould you like to continue?", colorYellow, colorReset))) {
if!(c.Bool("yes") ||prompt.Confirm(fmt.Sprintf("%sNOTE: You are about to create %d new megapool validators, each with a %.0f ETH deposit (total: %.0f ETH).%s\nWould you like to continue?", colorYellow, count, amount, amount*float64(count), colorReset))) {
123
-
fmt.Println("Cancelled.")
124
-
returnnil
125
-
}
126
-
} else {
127
-
if!(c.Bool("yes") ||prompt.Confirm(fmt.Sprintf("%sNOTE: You are about to create a new megapool validator with a %.0f ETH deposit.%s\nWould you like to continue?", colorYellow, amount, colorReset))) {
128
-
fmt.Println("Cancelled.")
129
-
returnnil
104
+
count:=c.Uint64("count")
105
+
106
+
// If the count was not provided, prompt the user for the number of deposits
107
+
forcount==0 {
108
+
countStr:=prompt.Prompt("How many validators would you like to create?", "^\\d+$", "Invalid number.")
109
+
count, err=strconv.ParseUint(countStr, 10, 64)
110
+
iferr!=nil {
111
+
fmt.Println("Invalid number. Please try again.")
112
+
continue
130
113
}
114
+
break
115
+
}
116
+
117
+
if!(c.Bool("yes") ||prompt.Confirm(fmt.Sprintf("%sNOTE: You are about to create %d new megapool validators, each with a %.0f ETH deposit (total: %.0f ETH).%s\nWould you like to continue?", colorYellow, count, amount, amount*float64(count), colorReset))) {
118
+
fmt.Println("Cancelled.")
119
+
returnnil
131
120
}
132
121
133
122
fmt.Printf("There are %d validator(s) on the express queue.\n", queueDetails.ExpressLength)
fmt.Printf("Cannot make %d node deposits:\n", count)
171
-
} else {
172
-
fmt.Println("Cannot make node deposit:")
173
-
}
158
+
fmt.Printf("Cannot make %d node deposits:\n", count)
159
+
174
160
ifcanDeposit.InsufficientBalanceWithoutCredit {
175
161
nodeBalance:=eth.WeiToEth(canDeposit.NodeBalance)
176
162
fmt.Printf("There is not enough ETH in the staking pool to use your credit balance (it needs at least 1 ETH but only has %.2f ETH) and you don't have enough ETH in your wallet (%.6f ETH) to cover the deposit amount yourself. If you want to continue creating a minipool, you will either need to wait for the staking pool to have more ETH deposited or add more ETH to your node wallet.", eth.WeiToEth(canDeposit.DepositBalance), nodeBalance)
"You are about to deposit %.6f ETH to create %d new megapool validators (%.6f ETH total).\n"+
252
-
"%sARE YOU SURE YOU WANT TO DO THIS? Exiting these validators and retrieving your capital cannot be done until each validator has been *active* on the Beacon Chain for 256 epochs (approx. 27 hours).%s\n",
"You are about to deposit %.6f ETH to create a new megapool validator.\n"+
264
-
"%sARE YOU SURE YOU WANT TO DO THIS? Exiting this validator and retrieving your capital cannot be done until the validator has been *active* on the Beacon Chain for 256 epochs (approx. 27 hours).%s\n",
265
-
math.RoundDown(eth.WeiToEth(amountWei), 6),
266
-
colorYellow,
267
-
colorReset))) {
268
-
fmt.Println("Cancelled.")
269
-
returnnil
270
-
}
235
+
236
+
if!(c.Bool("yes") ||prompt.Confirm(fmt.Sprintf(
237
+
"You are about to deposit %.6f ETH to create %d new megapool validators (%.6f ETH total).\n"+
238
+
"%sARE YOU SURE YOU WANT TO DO THIS? Exiting these validators and retrieving your capital cannot be done until each validator has been *active* on the Beacon Chain for 256 epochs (approx. 27 hours).%s\n",
0 commit comments