Skip to content

Commit 0d73191

Browse files
authored
Merge pull request #1034 from jshufro/jms/integrated-updates
Add a rocketpool update command
2 parents 929010f + b9502c8 commit 0d73191

68 files changed

Lines changed: 453 additions & 105 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ ${BIN_DIR}/rocketpool-cli-$1-$2: ${bin_deps}
2727
ifndef NO_DOCKER
2828
docker run --rm -v ./:/src --user $(shell id -u):$(shell id -g) -e CGO_ENABLED=0 \
2929
-e GOARCH=$2 -e GOOS=$1 --workdir /src -v ~/.cache:/.cache rocketpool/smartnode-builder:${VERSION} \
30-
go build -o $$@ rocketpool-cli/rocketpool-cli.go
30+
go build -o $$@ ./rocketpool-cli/
3131
else
32-
CGO_ENABLED=0 GOOS=$1 GOARCH=$2 go build -o $$@ ./rocketpool-cli/rocketpool-cli.go
32+
CGO_ENABLED=0 GOOS=$1 GOARCH=$2 go build -o $$@ ./rocketpool-cli/
3333
endif
3434
endef
3535

rocketpool-cli/auction/bid-lot.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func bidOnLot(c *cli.Context) error {
109109
maxAmount.Quo(&tmp, eth.EthToWei(1))
110110

111111
// Prompt for maximum amount
112-
if prompt.Confirm(fmt.Sprintf("Would you like to bid the maximum amount of ETH (%.6f ETH)?", math.RoundDown(eth.WeiToEth(&maxAmount), 6))) {
112+
if prompt.Confirm("Would you like to bid the maximum amount of ETH (%.6f ETH)?", math.RoundDown(eth.WeiToEth(&maxAmount), 6)) {
113113
amountWei = &maxAmount
114114
} else {
115115

@@ -145,7 +145,7 @@ func bidOnLot(c *cli.Context) error {
145145
}
146146

147147
// Prompt for confirmation
148-
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to bid %.6f ETH on lot %d? Bids are final and non-refundable.", math.RoundDown(eth.WeiToEth(amountWei), 6), selectedLot.Details.Index))) {
148+
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to bid %.6f ETH on lot %d? Bids are final and non-refundable.", math.RoundDown(eth.WeiToEth(amountWei), 6), selectedLot.Details.Index)) {
149149
fmt.Println("Cancelled.")
150150
return nil
151151
}

rocketpool-cli/auction/claim-lot.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func claimFromLot(c *cli.Context) error {
115115
}
116116

117117
// Prompt for confirmation
118-
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to claim %d lots?", len(selectedLots)))) {
118+
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to claim %d lots?", len(selectedLots))) {
119119
fmt.Println("Cancelled.")
120120
return nil
121121
}

rocketpool-cli/auction/recover-lot.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func recoverRplFromLot(c *cli.Context) error {
115115
}
116116

117117
// Prompt for confirmation
118-
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to recover %d lots?", len(selectedLots)))) {
118+
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to recover %d lots?", len(selectedLots))) {
119119
fmt.Println("Cancelled.")
120120
return nil
121121
}

rocketpool-cli/claims/claim-all.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ func claimAll(c *cli.Context, statusOnly bool) error {
882882
if autoConfirm {
883883
fmt.Printf(" %sContinuing with remaining %d claim(s)...%s\n", colorYellow, remaining, colorReset)
884884
} else {
885-
if !prompt.Confirm(fmt.Sprintf(" The above claim failed. Continue with the remaining %d claim(s)?", remaining)) {
885+
if !prompt.Confirm(" The above claim failed. Continue with the remaining %d claim(s)?", remaining) {
886886
skippedCount = remaining
887887
fmt.Println(" Aborting remaining claims.")
888888
break

rocketpool-cli/megapool/deposit.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func nodeMegapoolDeposit(c *cli.Context) error {
138138
fmt.Printf("The total bond requirement is %.2f ETH.\n", totalBondRequirementEth)
139139
fmt.Println()
140140

141-
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("%sNOTE: You are about to create %d new megapool validator(s), requiring a total of: %.2f ETH).%s\nWould you like to continue?", colorYellow, count, totalBondRequirementEth, colorReset))) {
141+
if !(c.Bool("yes") || prompt.Confirm("%sNOTE: You are about to create %d new megapool validator(s), requiring a total of: %.2f ETH).%s\nWould you like to continue?", colorYellow, count, totalBondRequirementEth, colorReset)) {
142142
fmt.Println("Cancelled.")
143143
return nil
144144
}
@@ -272,13 +272,13 @@ func nodeMegapoolDeposit(c *cli.Context) error {
272272

273273
// Prompt for confirmation
274274

275-
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf(
275+
if !(c.Bool("yes") || prompt.Confirm(
276276
"You are about to deposit %.6f ETH to create %d new megapool validator(s).\n"+
277277
"%sARE YOU SURE YOU WANT TO DO THIS? %s\n",
278278
math.RoundDown(eth.WeiToEth(totalBondRequirement), 6),
279279
count,
280280
colorYellow,
281-
colorReset))) {
281+
colorReset)) {
282282
fmt.Println("Cancelled.")
283283
return nil
284284
}

rocketpool-cli/megapool/dissolve-validator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func dissolveValidator(c *cli.Context) error {
7575
}
7676

7777
// Prompt for confirmation
78-
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to DISSOLVE megapool validator ID: %d?", validatorId))) {
78+
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to DISSOLVE megapool validator ID: %d?", validatorId)) {
7979
fmt.Println("Cancelled.")
8080
return nil
8181
}

rocketpool-cli/megapool/exit-queue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ func exitQueue(c *cli.Context) error {
169169
}
170170

171171
// Ask for confirmation
172-
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to exit %d validator(s) from the megapool queue?", len(canExitResponses)))) {
172+
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to exit %d validator(s) from the megapool queue?", len(canExitResponses))) {
173173
fmt.Println("Cancelled.")
174174
return nil
175175
}

rocketpool-cli/megapool/exit-validator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func exitValidator(c *cli.Context) error {
8383
fmt.Printf("Once your funds have been withdrawn, you can run `rocketpool megapool notify-validator-exit` to distribute them to your withdrawal address.\n\n%s", colorReset)
8484

8585
// Prompt for confirmation
86-
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to EXIT validator id %d?", validatorId))) {
86+
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to EXIT validator id %d?", validatorId)) {
8787
fmt.Println("Cancelled.")
8888
return nil
8989
}

rocketpool-cli/megapool/notify-final-balance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func notifyFinalBalance(c *cli.Context) error {
108108
}
109109

110110
// Prompt for confirmation
111-
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to notify the final balance for validator id %d exit?", validatorId))) {
111+
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to notify the final balance for validator id %d exit?", validatorId)) {
112112
fmt.Println("Cancelled.")
113113
return nil
114114
}

0 commit comments

Comments
 (0)