11package auction
22
33import (
4- "github.com/urfave/cli"
4+ "context"
5+
6+ "github.com/urfave/cli/v3"
57
68 cliutils "github.com/rocket-pool/smartnode/shared/utils/cli"
79)
810
911// Register commands
10- func RegisterCommands (app * cli.App , name string , aliases []string ) {
11- app .Commands = append (app .Commands , cli.Command {
12+ func RegisterCommands (app * cli.Command , name string , aliases []string ) {
13+ app .Commands = append (app .Commands , & cli.Command {
1214 Name : name ,
1315 Aliases : aliases ,
1416 Usage : "Manage Rocket Pool RPL auctions" ,
15- Subcommands : []cli.Command {
17+ Commands : []* cli.Command {
1618
1719 {
1820 Name : "status" ,
1921 Aliases : []string {"s" },
2022 Usage : "Get RPL auction status" ,
2123 UsageText : "rocketpool auction status" ,
22- Action : func (c * cli.Context ) error {
24+ Action : func (ctx context. Context , c * cli.Command ) error {
2325
2426 // Validate args
2527 if err := cliutils .ValidateArgCount (c , 0 ); err != nil {
@@ -37,7 +39,7 @@ func RegisterCommands(app *cli.App, name string, aliases []string) {
3739 Aliases : []string {"l" },
3840 Usage : "Get RPL lots for auction" ,
3941 UsageText : "rocketpool auction lots" ,
40- Action : func (c * cli.Context ) error {
42+ Action : func (ctx context. Context , c * cli.Command ) error {
4143
4244 // Validate args
4345 if err := cliutils .ValidateArgCount (c , 0 ); err != nil {
@@ -55,7 +57,7 @@ func RegisterCommands(app *cli.App, name string, aliases []string) {
5557 Aliases : []string {"t" },
5658 Usage : "Create a new lot" ,
5759 UsageText : "rocketpool auction create-lot" ,
58- Action : func (c * cli.Context ) error {
60+ Action : func (ctx context. Context , c * cli.Command ) error {
5961
6062 // Validate args
6163 if err := cliutils .ValidateArgCount (c , 0 ); err != nil {
@@ -74,20 +76,23 @@ func RegisterCommands(app *cli.App, name string, aliases []string) {
7476 Usage : "Bid on a lot" ,
7577 UsageText : "rocketpool auction bid-lot [options]" ,
7678 Flags : []cli.Flag {
77- cli.StringFlag {
78- Name : "lot, l" ,
79- Usage : "The ID of the lot to bid on" ,
79+ & cli.StringFlag {
80+ Name : "lot" ,
81+ Aliases : []string {"l" },
82+ Usage : "The ID of the lot to bid on" ,
8083 },
81- cli.StringFlag {
82- Name : "amount, a" ,
83- Usage : "The amount of ETH to bid (or 'max')" ,
84+ & cli.StringFlag {
85+ Name : "amount" ,
86+ Aliases : []string {"a" },
87+ Usage : "The amount of ETH to bid (or 'max')" ,
8488 },
85- cli.BoolFlag {
86- Name : "yes, y" ,
87- Usage : "Automatically confirm bid" ,
89+ & cli.BoolFlag {
90+ Name : "yes" ,
91+ Aliases : []string {"y" },
92+ Usage : "Automatically confirm bid" ,
8893 },
8994 },
90- Action : func (c * cli.Context ) error {
95+ Action : func (ctx context. Context , c * cli.Command ) error {
9196
9297 // Validate args
9398 if err := cliutils .ValidateArgCount (c , 0 ); err != nil {
@@ -118,12 +123,13 @@ func RegisterCommands(app *cli.App, name string, aliases []string) {
118123 Usage : "Claim RPL from a lot" ,
119124 UsageText : "rocketpool auction claim-lot [options]" ,
120125 Flags : []cli.Flag {
121- cli.StringFlag {
122- Name : "lot, l" ,
123- Usage : "The lot to claim RPL from (lot ID or 'all')" ,
126+ & cli.StringFlag {
127+ Name : "lot" ,
128+ Aliases : []string {"l" },
129+ Usage : "The lot to claim RPL from (lot ID or 'all')" ,
124130 },
125131 },
126- Action : func (c * cli.Context ) error {
132+ Action : func (ctx context. Context , c * cli.Command ) error {
127133
128134 // Validate args
129135 if err := cliutils .ValidateArgCount (c , 0 ); err != nil {
@@ -149,12 +155,13 @@ func RegisterCommands(app *cli.App, name string, aliases []string) {
149155 Usage : "Recover unclaimed RPL from a lot (returning it to the auction contract)" ,
150156 UsageText : "rocketpool auction recover-lot [options]" ,
151157 Flags : []cli.Flag {
152- cli.StringFlag {
153- Name : "lot, l" ,
154- Usage : "The lot to recover unclaimed RPL from (lot ID or 'all')" ,
158+ & cli.StringFlag {
159+ Name : "lot" ,
160+ Aliases : []string {"l" },
161+ Usage : "The lot to recover unclaimed RPL from (lot ID or 'all')" ,
155162 },
156163 },
157- Action : func (c * cli.Context ) error {
164+ Action : func (ctx context. Context , c * cli.Command ) error {
158165
159166 // Validate args
160167 if err := cliutils .ValidateArgCount (c , 0 ); err != nil {
0 commit comments