From a0cf13a02ec6777ec40c237e8b2c48ee6b3ce78e Mon Sep 17 00:00:00 2001 From: Madhur Shrimal Date: Mon, 6 Jan 2025 13:40:28 -0800 Subject: [PATCH] fix: generate am from delegation manager (#425) --- chainio/clients/avsregistry/bindings.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/chainio/clients/avsregistry/bindings.go b/chainio/clients/avsregistry/bindings.go index af835650..60bce630 100644 --- a/chainio/clients/avsregistry/bindings.go +++ b/chainio/clients/avsregistry/bindings.go @@ -3,6 +3,7 @@ package avsregistry import ( "github.com/Layr-Labs/eigensdk-go/chainio/clients/eth" blsapkregistry "github.com/Layr-Labs/eigensdk-go/contracts/bindings/BLSApkRegistry" + contractDelegationManager "github.com/Layr-Labs/eigensdk-go/contracts/bindings/DelegationManager" indexregistry "github.com/Layr-Labs/eigensdk-go/contracts/bindings/IndexRegistry" opstateretriever "github.com/Layr-Labs/eigensdk-go/contracts/bindings/OperatorStateRetriever" regcoordinator "github.com/Layr-Labs/eigensdk-go/contracts/bindings/RegistryCoordinator" @@ -211,7 +212,14 @@ func NewBindingsFromConfig( if err != nil { return nil, utils.WrapError("Failed to get AvsDirectory address", err) } - allocationManagerAddr, err = contractServiceManager.AllocationManager(&bind.CallOpts{}) + + delegationManager, err := contractDelegationManager.NewContractDelegationManager( + delegationManagerAddr, + client) + if err != nil { + return nil, utils.WrapError("Failed to get DelegationManager contract", err) + } + allocationManagerAddr, err = delegationManager.AllocationManager(&bind.CallOpts{}) if err != nil { return nil, utils.WrapError("Failed to get AllocationManager address", err) }