Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrower95 committed Dec 17, 2024
1 parent c6eb857 commit dd1f146
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 20 deletions.
20 changes: 20 additions & 0 deletions cli/commands/completeAllWithdrawals.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package commands

import "github.com/pkg/errors"

type TCompleteWithdrawalArgs struct {
EthNode string
BeaconNode string
EigenPod string
}

func CompleteAllWithdrawalsCommand(args TCompleteWithdrawalArgs) error {
/*
TODO: IDelegationManager.completeQueuedWithdrawals(
IERC20[][] calldata tokens,
bool[] calldata receiveAsTokens,
uint256 numToComplete
)
*/
return errors.New("unimplemented.")
}
14 changes: 0 additions & 14 deletions cli/commands/executeWithdrawal.go

This file was deleted.

8 changes: 7 additions & 1 deletion cli/commands/queueWithdrawal.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ package commands

import "github.com/pkg/errors"

func QueueWithdrawalCommand(args TComputeCheckpointableValueCommandArgs) error {
type TQueueWithdrawallArgs struct {
EthNode string
BeaconNode string
EigenPod string
}

func QueueWithdrawalCommand(args TQueueWithdrawallArgs) error {
// TODO: IDelegationManager.queueWithdrawals
/*
struct QueuedWithdrawalParams {
Expand Down
8 changes: 7 additions & 1 deletion cli/commands/showWithdrawals.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ package commands

import "github.com/pkg/errors"

func ShowWithdrawalsCommand(args TComputeCheckpointableValueCommandArgs) error {
type TShowWithdrawalArgs struct {
EthNode string
BeaconNode string
EigenPod string
}

func ShowWithdrawalsCommand(args TShowWithdrawalArgs) error {
// IDelegationManager.getQueuedWithdrawals
return errors.New("unimplemented.")
}
42 changes: 38 additions & 4 deletions cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,20 +196,54 @@ func main() {
})
},
},
{
Name: "complete-all-withdrawals",
Args: true,
Usage: "Completes all withdrawals",
Flags: []cli.Flag{
ExecNodeFlag,
BeaconNodeFlag,
PodAddressFlag,
},
Action: func(_ *cli.Context) error {
return commands.CompleteAllWithdrawalsCommand(commands.TCompleteWithdrawalArgs{
EthNode: node,
BeaconNode: beacon,
EigenPod: eigenpodAddress,
})
},
},
{
Name: "queue-withdrawal",
Args: true,
Usage: "Queues a withdrawal ",
Usage: "Queues a withdrawal",
Flags: []cli.Flag{
ExecNodeFlag,
BeaconNodeFlag,
PodAddressFlag,
},
Action: func(_ *cli.Context) error {
return commands.QueueWithdrawalCommand(commands.TComputeCheckpointableValueCommandArgs{
Node: node,
return commands.QueueWithdrawalCommand(commands.TQueueWithdrawallArgs{
EthNode: node,
BeaconNode: beacon,
EigenPod: eigenpodAddress,
})
},
},
{
Name: "show-withdrawals",
Args: true,
Usage: "Shows all pending withdrawals",
Flags: []cli.Flag{
ExecNodeFlag,
BeaconNodeFlag,
PodAddressFlag,
},
Action: func(_ *cli.Context) error {
return commands.ShowWithdrawalsCommand(commands.TShowWithdrawalArgs{
EthNode: node,
BeaconNode: beacon,
PodAddress: eigenpodAddress,
EigenPod: eigenpodAddress,
})
},
},
Expand Down

0 comments on commit dd1f146

Please sign in to comment.