Skip to content

Commit

Permalink
updated merkle leaf value
Browse files Browse the repository at this point in the history
  • Loading branch information
0xrajath authored and seanmcgary committed Dec 2, 2024
1 parent d65ccde commit 90ff9a7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pkg/eigenState/operatorAVSSplits/operatorAVSSplits.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package operatorAVSSplits

import (
"encoding/json"
"fmt"
"slices"
"sort"
"strings"
Expand Down Expand Up @@ -258,7 +259,7 @@ func (oas *OperatorAVSSplitModel) sortValuesForMerkleTree(splits []*OperatorAVSS
inputs := make([]*base.MerkleTreeInput, 0)
for _, split := range splits {
slotID := base.NewSlotID(split.TransactionHash, split.LogIndex)
value := "added"
value := fmt.Sprintf("%s_%s_%d_%d_%d", split.Operator, split.Avs, split.ActivatedAt.Unix(), split.OldOperatorAVSSplitBips, split.NewOperatorAVSSplitBips)
inputs = append(inputs, &base.MerkleTreeInput{
SlotID: slotID,
Value: []byte(value),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ func (odrs *OperatorDirectedRewardSubmissionsModel) sortValuesForMerkleTree(subm
inputs := make([]*base.MerkleTreeInput, 0)
for _, submission := range submissions {
slotID := NewSlotID(submission.TransactionHash, submission.LogIndex, submission.RewardHash, submission.StrategyIndex, submission.OperatorIndex)
value := "added"
value := fmt.Sprintf("%s_%s_%s_%s_%s", submission.RewardHash, submission.Strategy, submission.Multiplier, submission.Operator, submission.Amount)
inputs = append(inputs, &base.MerkleTreeInput{
SlotID: slotID,
Value: []byte(value),
Expand Down
3 changes: 2 additions & 1 deletion pkg/eigenState/operatorPISplits/operatorPISplits.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package operatorPISplits

import (
"encoding/json"
"fmt"
"slices"
"sort"
"strings"
Expand Down Expand Up @@ -256,7 +257,7 @@ func (ops *OperatorPISplitModel) sortValuesForMerkleTree(splits []*OperatorPISpl
inputs := make([]*base.MerkleTreeInput, 0)
for _, split := range splits {
slotID := base.NewSlotID(split.TransactionHash, split.LogIndex)
value := "added"
value := fmt.Sprintf("%s_%d_%d_%d", split.Operator, split.ActivatedAt.Unix(), split.OldOperatorAVSSplitBips, split.NewOperatorAVSSplitBips)
inputs = append(inputs, &base.MerkleTreeInput{
SlotID: slotID,
Value: []byte(value),
Expand Down

0 comments on commit 90ff9a7

Please sign in to comment.