Skip to content

Commit

Permalink
change to GetWithdrawableShares
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrower95 committed Dec 17, 2024
1 parent 0f0c406 commit 05ab85a
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions cli/core/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"github.com/Layr-Labs/eigenlayer-contracts/pkg/bindings/DelegationManager"
"github.com/Layr-Labs/eigenlayer-contracts/pkg/bindings/EigenPod"
"github.com/Layr-Labs/eigenlayer-contracts/pkg/bindings/EigenPodManager"
"github.com/Layr-Labs/eigenpod-proofs-generation/cli/utils"
"github.com/attestantio/go-eth2-client/spec"
"github.com/attestantio/go-eth2-client/spec/phase0"
"github.com/ethereum/go-ethereum/common"
gethCommon "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/ethclient"
)
Expand Down Expand Up @@ -153,14 +153,11 @@ func GetStatus(ctx context.Context, eigenpodAddress string, eth *ethclient.Clien
delegationManager, err := DelegationManager.NewDelegationManager(delegationManagerAddress, eth)
PanicOnError("failed to reach delegationManager", err)

_, shares, err := delegationManager.GetDepositedShares(nil, eigenPodOwner)
shares, err := delegationManager.GetWithdrawableShares(nil, eigenPodOwner, []common.Address{})
PanicOnError("failed to load owner shares", err)

totalDepositedShares := utils.BigSum(shares)

// TODO: is this calculation correct?
currentOwnerSharesETH := IweiToEther(totalDepositedShares)
currentOwnerSharesWei := totalDepositedShares
currentOwnerSharesETH := IweiToEther(shares.WithdrawableShares[0])
currentOwnerSharesWei := shares.WithdrawableShares[0]

withdrawableRestakedExecutionLayerGwei, err := eigenPod.WithdrawableRestakedExecutionLayerGwei(nil)
PanicOnError("failed to fetch withdrawableRestakedExecutionLayerGwei", err)
Expand Down

0 comments on commit 05ab85a

Please sign in to comment.