diff --git a/operator/registration.go b/operator/registration.go index a1ddcbb9..23f824fa 100644 --- a/operator/registration.go +++ b/operator/registration.go @@ -63,7 +63,7 @@ func (o *Operator) RegisterOperatorWithEigenlayer() error { } func (o *Operator) DepositIntoStrategy(strategyAddr common.Address, amount *big.Int) error { - _, tokenAddr, err := o.eigenlayerReader.GetStrategyAndUnderlyingToken(&bind.CallOpts{}, strategyAddr) + _, tokenAddr, err := o.eigenlayerReader.GetStrategyAndUnderlyingToken(nil, strategyAddr) if err != nil { o.logger.Error("Failed to fetch strategy contract", "err", err) return err @@ -74,6 +74,10 @@ func (o *Operator) DepositIntoStrategy(strategyAddr common.Address, amount *big. return err } txOpts, err := o.avsWriter.TxMgr.GetNoSendTxOpts() + if err != nil { + o.logger.Errorf("Error in GetNoSendTxOpts") + return err + } tx, err := contractErc20Mock.Mint(txOpts, o.operatorAddr, amount) if err != nil { o.logger.Errorf("Error assembling Mint tx") diff --git a/plugin/cmd/main.go b/plugin/cmd/main.go index f441ed7d..69f149be 100644 --- a/plugin/cmd/main.go +++ b/plugin/cmd/main.go @@ -17,10 +17,9 @@ import ( "github.com/Layr-Labs/eigensdk-go/logging" "github.com/Layr-Labs/eigensdk-go/signerv2" sdktypes "github.com/Layr-Labs/eigensdk-go/types" - "github.com/Layr-Labs/eigensdk-go/utils" + commonincredible "github.com/Layr-Labs/incredible-squaring-avs/common" "github.com/Layr-Labs/incredible-squaring-avs/core/chainio" "github.com/Layr-Labs/incredible-squaring-avs/types" - "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" "github.com/urfave/cli" @@ -86,7 +85,7 @@ func plugin(ctx *cli.Context) { configPath := ctx.GlobalString(ConfigFileFlag.Name) avsConfig := types.NodeConfig{} - err := utils.ReadYamlConfig(configPath, &avsConfig) + err := commonincredible.ReadYamlConfig(configPath, &avsConfig) if err != nil { fmt.Println(err) return @@ -134,6 +133,10 @@ func plugin(ctx *cli.Context) { return } clients, err := sdkclients.BuildAll(buildClientConfig, operatorEcdsaPrivateKey, logger) + if err != nil { + fmt.Println(err) + return + } avsReader, err := chainio.BuildAvsReader( common.HexToAddress(avsConfig.AVSRegistryCoordinatorAddress), common.HexToAddress(avsConfig.OperatorStateRetrieverAddress), @@ -201,7 +204,7 @@ func plugin(ctx *cli.Context) { return } strategyAddr := common.HexToAddress(ctx.GlobalString(StrategyAddrFlag.Name)) - _, tokenAddr, err := clients.ElChainReader.GetStrategyAndUnderlyingToken(&bind.CallOpts{}, strategyAddr) + _, tokenAddr, err := clients.ElChainReader.GetStrategyAndUnderlyingToken(nil, strategyAddr) if err != nil { logger.Error("Failed to fetch strategy contract", "err", err) return