Skip to content

Commit f79888f

Browse files
committed
update eigensdk
1 parent 3839e40 commit f79888f

File tree

6 files changed

+27
-27
lines changed

6 files changed

+27
-27
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require (
77
github.com/Layr-Labs/eigenlayer-contracts v0.3.2-mainnet-rewards
88
github.com/Layr-Labs/eigenlayer-rewards-proofs v0.2.12
99
github.com/Layr-Labs/eigenpod-proofs-generation v0.0.14-stable.0.20240730152248-5c11a259293e
10-
github.com/Layr-Labs/eigensdk-go v0.1.12-0.20241018155539-679b1c56366a
10+
github.com/Layr-Labs/eigensdk-go v0.1.13-0.20241023023134-a285de543731
1111
github.com/blang/semver/v4 v4.0.0
1212
github.com/consensys/gnark-crypto v0.12.1
1313
github.com/ethereum/go-ethereum v1.14.5

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ github.com/Layr-Labs/eigenlayer-rewards-proofs v0.2.12 h1:G5Q1SnLmFbEjhOkky3vIHk
1212
github.com/Layr-Labs/eigenlayer-rewards-proofs v0.2.12/go.mod h1:OlJd1QjqEW53wfWG/lJyPCGvrXwWVEjPQsP4TV+gttQ=
1313
github.com/Layr-Labs/eigenpod-proofs-generation v0.0.14-stable.0.20240730152248-5c11a259293e h1:DvW0/kWHV9mZsbH2KOjEHKTSIONNPUj6X05FJvUohy4=
1414
github.com/Layr-Labs/eigenpod-proofs-generation v0.0.14-stable.0.20240730152248-5c11a259293e/go.mod h1:T7tYN8bTdca2pkMnz9G2+ZwXYWw5gWqQUIu4KLgC/vM=
15-
github.com/Layr-Labs/eigensdk-go v0.1.12-0.20241018155539-679b1c56366a h1:/zU/lLtvpDHvhfDX2cEYYLern3UEoHX9KiBkrkunBG4=
16-
github.com/Layr-Labs/eigensdk-go v0.1.12-0.20241018155539-679b1c56366a/go.mod h1:39gZE9jybgmpncEruNnY2G8OCHT0/3bOegQWYTbszd0=
15+
github.com/Layr-Labs/eigensdk-go v0.1.13-0.20241023023134-a285de543731 h1:8F/wlaQoZG1+BcuP9cWhqKNbYgw4CphZFwp8SjMkW9A=
16+
github.com/Layr-Labs/eigensdk-go v0.1.13-0.20241023023134-a285de543731/go.mod h1:aYdNURUhaqeYOS+Cq12TfSdPbjFfiLaHkxPdR4Exq/s=
1717
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
1818
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
1919
github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8=
@@ -134,8 +134,8 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1
134134
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs=
135135
github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0=
136136
github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
137-
github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE=
138-
github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
137+
github.com/docker/docker v25.0.6+incompatible h1:5cPwbwriIcsua2REJe8HqQV+6WlWc1byg2QSXzBxBGg=
138+
github.com/docker/docker v25.0.6+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
139139
github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
140140
github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc=
141141
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=

pkg/operator/allocations/show.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/Layr-Labs/eigenlayer-cli/pkg/utils"
1212

1313
"github.com/Layr-Labs/eigensdk-go/chainio/clients/elcontracts"
14-
contractIAllocationManager "github.com/Layr-Labs/eigensdk-go/contracts/bindings/IAllocationManager"
14+
allocationmanager "github.com/Layr-Labs/eigensdk-go/contracts/bindings/AllocationManager"
1515
"github.com/Layr-Labs/eigensdk-go/logging"
1616
eigenSdkUtils "github.com/Layr-Labs/eigensdk-go/utils"
1717

@@ -272,7 +272,7 @@ func getSharesFromMagnitude(totalScaledShare *big.Int, magnitude uint64) (*big.I
272272
return shares, percentageSharesFloat
273273
}
274274

275-
func getUniqueKey(strategyAddress gethcommon.Address, opSet contractIAllocationManager.OperatorSet) string {
275+
func getUniqueKey(strategyAddress gethcommon.Address, opSet allocationmanager.OperatorSet) string {
276276
return fmt.Sprintf("%s-%s-%d", strategyAddress.String(), opSet.Avs.String(), opSet.OperatorSetId)
277277
}
278278

pkg/operator/allocations/types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ import (
1111

1212
"github.com/Layr-Labs/eigenlayer-cli/pkg/types"
1313

14-
contractIAllocationManager "github.com/Layr-Labs/eigensdk-go/contracts/bindings/IAllocationManager"
14+
allocationmanager "github.com/Layr-Labs/eigensdk-go/contracts/bindings/AllocationManager"
1515

1616
gethcommon "github.com/ethereum/go-ethereum/common"
1717
)
1818

1919
type BulkModifyAllocations struct {
20-
Allocations []contractIAllocationManager.IAllocationManagerTypesMagnitudeAllocation
20+
Allocations []allocationmanager.IAllocationManagerTypesMagnitudeAllocation
2121
AllocatableMagnitudes map[gethcommon.Address]uint64
2222
}
2323

pkg/operator/allocations/update.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"github.com/Layr-Labs/eigenlayer-cli/pkg/utils"
2020

2121
"github.com/Layr-Labs/eigensdk-go/chainio/clients/elcontracts"
22-
contractIAllocationManager "github.com/Layr-Labs/eigensdk-go/contracts/bindings/IAllocationManager"
22+
allocationmanager "github.com/Layr-Labs/eigensdk-go/contracts/bindings/AllocationManager"
2323
"github.com/Layr-Labs/eigensdk-go/logging"
2424
eigenSdkUtils "github.com/Layr-Labs/eigensdk-go/utils"
2525

@@ -200,7 +200,7 @@ func generateAllocationsParams(
200200
config *updateConfig,
201201
logger logging.Logger,
202202
) (*BulkModifyAllocations, error) {
203-
allocations := make([]contractIAllocationManager.IAllocationManagerTypesMagnitudeAllocation, 0)
203+
allocations := make([]allocationmanager.IAllocationManagerTypesMagnitudeAllocation, 0)
204204
var allocatableMagnitudes map[gethcommon.Address]uint64
205205

206206
var err error
@@ -226,10 +226,10 @@ func generateAllocationsParams(
226226
logger.Debugf("Bips to allocate: %d", config.bipsToAllocate)
227227
magnitudeToUpdate := calculateMagnitudeToUpdate(magnitude[0], config.bipsToAllocate)
228228
logger.Debugf("Magnitude to update: %d", magnitudeToUpdate)
229-
malloc := contractIAllocationManager.IAllocationManagerTypesMagnitudeAllocation{
229+
malloc := allocationmanager.IAllocationManagerTypesMagnitudeAllocation{
230230
Strategy: config.strategyAddress,
231231
ExpectedMaxMagnitude: magnitude[0],
232-
OperatorSets: []contractIAllocationManager.OperatorSet{
232+
OperatorSets: []allocationmanager.OperatorSet{
233233
{
234234
Avs: config.avsAddress,
235235
OperatorSetId: config.operatorSetId,
@@ -255,7 +255,7 @@ func computeAllocations(
255255
filePath string,
256256
operatorAddress gethcommon.Address,
257257
elReader elChainReader,
258-
) ([]contractIAllocationManager.IAllocationManagerTypesMagnitudeAllocation, map[gethcommon.Address]uint64, error) {
258+
) ([]allocationmanager.IAllocationManagerTypesMagnitudeAllocation, map[gethcommon.Address]uint64, error) {
259259
allocations, err := parseAllocationsCSV(filePath)
260260
if err != nil {
261261
return nil, nil, eigenSdkUtils.WrapError("failed to parse allocations csv", err)
@@ -385,19 +385,19 @@ func parseAllocationsCSV(filePath string) ([]allocation, error) {
385385
func convertAllocationsToMagnitudeAllocations(
386386
allocations []allocation,
387387
strategyTotalMagnitudes map[gethcommon.Address]uint64,
388-
) []contractIAllocationManager.IAllocationManagerTypesMagnitudeAllocation {
389-
magnitudeAllocations := make([]contractIAllocationManager.IAllocationManagerTypesMagnitudeAllocation, 0)
390-
operatorSetsPerStragyMap := make(map[gethcommon.Address][]contractIAllocationManager.OperatorSet)
388+
) []allocationmanager.IAllocationManagerTypesMagnitudeAllocation {
389+
magnitudeAllocations := make([]allocationmanager.IAllocationManagerTypesMagnitudeAllocation, 0)
390+
operatorSetsPerStragyMap := make(map[gethcommon.Address][]allocationmanager.OperatorSet)
391391
magnitudeAllocationsPerStrategyMap := make(map[gethcommon.Address][]uint64)
392392
for _, a := range allocations {
393393
totalMag := strategyTotalMagnitudes[a.StrategyAddress]
394394
magnitudeToUpdate := calculateMagnitudeToUpdate(totalMag, a.Bips)
395395

396396
operatorSets, ok := operatorSetsPerStragyMap[a.StrategyAddress]
397397
if !ok {
398-
operatorSets = make([]contractIAllocationManager.OperatorSet, 0)
398+
operatorSets = make([]allocationmanager.OperatorSet, 0)
399399
}
400-
operatorSets = append(operatorSets, contractIAllocationManager.OperatorSet{
400+
operatorSets = append(operatorSets, allocationmanager.OperatorSet{
401401
Avs: a.AvsAddress,
402402
OperatorSetId: a.OperatorSetId,
403403
})
@@ -411,7 +411,7 @@ func convertAllocationsToMagnitudeAllocations(
411411
for strategy, operatorSets := range operatorSetsPerStragyMap {
412412
magnitudeAllocations = append(
413413
magnitudeAllocations,
414-
contractIAllocationManager.IAllocationManagerTypesMagnitudeAllocation{
414+
allocationmanager.IAllocationManagerTypesMagnitudeAllocation{
415415
Strategy: strategy,
416416
ExpectedMaxMagnitude: strategyTotalMagnitudes[strategy],
417417
OperatorSets: operatorSets,

pkg/operator/allocations/update_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
"github.com/Layr-Labs/eigenlayer-cli/pkg/internal/testutils"
1111

12-
contractIAllocationManager "github.com/Layr-Labs/eigensdk-go/contracts/bindings/IAllocationManager"
12+
allocationmanager "github.com/Layr-Labs/eigensdk-go/contracts/bindings/AllocationManager"
1313
"github.com/Layr-Labs/eigensdk-go/logging"
1414

1515
"github.com/ethereum/go-ethereum/accounts/abi/bind"
@@ -98,11 +98,11 @@ func TestGenerateAllocationsParams(t *testing.T) {
9898
},
9999
expectError: false,
100100
expectedAllocations: &BulkModifyAllocations{
101-
Allocations: []contractIAllocationManager.IAllocationManagerTypesMagnitudeAllocation{
101+
Allocations: []allocationmanager.IAllocationManagerTypesMagnitudeAllocation{
102102
{
103103
Strategy: gethcommon.HexToAddress(strategyAddress),
104104
ExpectedMaxMagnitude: initialMagnitude,
105-
OperatorSets: []contractIAllocationManager.OperatorSet{
105+
OperatorSets: []allocationmanager.OperatorSet{
106106
{
107107
OperatorSetId: 1,
108108
Avs: gethcommon.HexToAddress(avsAddress),
@@ -121,11 +121,11 @@ func TestGenerateAllocationsParams(t *testing.T) {
121121
},
122122
expectError: false,
123123
expectedAllocations: &BulkModifyAllocations{
124-
Allocations: []contractIAllocationManager.IAllocationManagerTypesMagnitudeAllocation{
124+
Allocations: []allocationmanager.IAllocationManagerTypesMagnitudeAllocation{
125125
{
126126
Strategy: gethcommon.HexToAddress("0x49989b32351Eb9b8ab2d5623cF22E7F7C23e5630"),
127127
ExpectedMaxMagnitude: initialMagnitude,
128-
OperatorSets: []contractIAllocationManager.OperatorSet{
128+
OperatorSets: []allocationmanager.OperatorSet{
129129
{
130130
OperatorSetId: 1,
131131
Avs: gethcommon.HexToAddress("0x2222AAC0C980Cc029624b7ff55B88Bc6F63C538f"),
@@ -140,7 +140,7 @@ func TestGenerateAllocationsParams(t *testing.T) {
140140
{
141141
Strategy: gethcommon.HexToAddress("0x232326fE4F8C2f83E3eB2318F090557b7CD02222"),
142142
ExpectedMaxMagnitude: initialMagnitude,
143-
OperatorSets: []contractIAllocationManager.OperatorSet{
143+
OperatorSets: []allocationmanager.OperatorSet{
144144
{
145145
OperatorSetId: 4,
146146
Avs: gethcommon.HexToAddress("0x111116fE4F8C2f83E3eB2318F090557b7CD0BF76"),
@@ -151,7 +151,7 @@ func TestGenerateAllocationsParams(t *testing.T) {
151151
{
152152
Strategy: gethcommon.HexToAddress("0x545456fE4F8C2f83E3eB2318F090557b7CD04567"),
153153
ExpectedMaxMagnitude: initialMagnitude,
154-
OperatorSets: []contractIAllocationManager.OperatorSet{
154+
OperatorSets: []allocationmanager.OperatorSet{
155155
{
156156
OperatorSetId: 5,
157157
Avs: gethcommon.HexToAddress("0x111116fE4F8C2f83E3eB2318F090557b7CD0BF76"),

0 commit comments

Comments
 (0)