Skip to content

Commit

Permalink
update with latest contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
shrimalmadhur committed Oct 4, 2024
1 parent ac1d82d commit 51715fd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pkg/operator/allocations/initializedelay.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func initializeDelayAction(cCtx *cli.Context, p utils.Prompter) error {
}

// Temp to test modify Allocations
config.delegationManagerAddress = gethcommon.HexToAddress("0xFF30144A9A749144e88bEb4FAbF020Cc7F71d2dC")
config.delegationManagerAddress = gethcommon.HexToAddress("0xa5960a80e91D200794ec699b6aBE920908C0e5C5")

if config.broadcast {
confirm, err := p.Confirm(
Expand Down
12 changes: 6 additions & 6 deletions pkg/operator/allocations/show.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func showAction(cCtx *cli.Context, p utils.Prompter) error {
}

// Temp to test modify allocations
config.delegationManagerAddress = gethcommon.HexToAddress("0xFF30144A9A749144e88bEb4FAbF020Cc7F71d2dC")
config.delegationManagerAddress = gethcommon.HexToAddress("0xa5960a80e91D200794ec699b6aBE920908C0e5C5")

elReader, err := elcontracts.NewReaderFromConfig(
elcontracts.Config{
Expand Down Expand Up @@ -110,7 +110,7 @@ func showAction(cCtx *cli.Context, p utils.Prompter) error {
/*
3. Get the operator set and slashable magnitude for all strategies
*/
opSets, slashableMagnitudes, err := elReader.GetCurrentSlashableMagnitudes(
opSets, slashableMagnitudes, err := elReader.GetSlashableMagnitudes(
&bind.CallOpts{Context: ctx},
config.operatorAddress,
config.strategyAddresses,
Expand Down Expand Up @@ -175,13 +175,13 @@ func showAction(cCtx *cli.Context, p utils.Prompter) error {
/*
6. Get the operator scaled shares for all strategies
*/
operatorScaledSharesMap := make(map[string]*big.Int)
operatorDelegatedSharesMap := make(map[string]*big.Int)
for _, strategyAddress := range config.strategyAddresses {
shares, err := elReader.GetOperatorScaledShares(&bind.CallOpts{}, config.operatorAddress, strategyAddress)
shares, err := elReader.GetOperatorDelegatedShares(&bind.CallOpts{}, config.operatorAddress, strategyAddress)
if err != nil {
return err
}
operatorScaledSharesMap[strategyAddress.String()] = shares
operatorDelegatedSharesMap[strategyAddress.String()] = shares
}

/*
Expand Down Expand Up @@ -217,7 +217,7 @@ func showAction(cCtx *cli.Context, p utils.Prompter) error {
currSlashableMag = currSlashableMag + newAllocationDiff
}

operatorScaledShares := operatorScaledSharesMap[strategyAddress.String()]
operatorScaledShares := operatorDelegatedSharesMap[strategyAddress.String()]

/*
3. Calculate the current shares and percentage shares for the operator
Expand Down
2 changes: 1 addition & 1 deletion pkg/operator/allocations/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func updateAllocations(cCtx *cli.Context, p utils.Prompter) error {
}

// Temp to test modify Allocations
config.delegationManagerAddress = gethcommon.HexToAddress("0xFF30144A9A749144e88bEb4FAbF020Cc7F71d2dC")
config.delegationManagerAddress = gethcommon.HexToAddress("0xa5960a80e91D200794ec699b6aBE920908C0e5C5")

elReader, err := elcontracts.NewReaderFromConfig(
elcontracts.Config{
Expand Down

0 comments on commit 51715fd

Please sign in to comment.