@@ -50,7 +50,8 @@ func depositIntoStrategyMain(ctx *cli.Context) error {
5050 return nil
5151 }
5252
53- config := config .NewOperatorConfig (ctx .String (config .ConfigFileFlag .Name ))
53+ opConfig := config .NewOperatorConfig (ctx .String (config .ConfigFileFlag .Name ))
54+ ecdsaConfig := config .NewEcdsaConfig (ctx .String (config .ConfigFileFlag .Name ), opConfig .BaseConfig .ChainId )
5455 strategyAddressStr := ctx .String (StrategyAddressFlag .Name )
5556 if strategyAddressStr == "" {
5657 log .Println ("Strategy address is required" )
@@ -59,35 +60,35 @@ func depositIntoStrategyMain(ctx *cli.Context) error {
5960 log .Println ("Depositing into strategy" , strategyAddressStr )
6061 strategyAddr := common .HexToAddress (strategyAddressStr )
6162
62- delegationManagerAddr := config .BaseConfig .EigenLayerDeploymentConfig .DelegationManagerAddr
63- avsDirectoryAddr := config .BaseConfig .EigenLayerDeploymentConfig .AVSDirectoryAddr
63+ delegationManagerAddr := opConfig .BaseConfig .EigenLayerDeploymentConfig .DelegationManagerAddr
64+ avsDirectoryAddr := opConfig .BaseConfig .EigenLayerDeploymentConfig .AVSDirectoryAddr
6465
6566 signerConfig := signerv2.Config {
66- PrivateKey : config . EcdsaConfig .PrivateKey ,
67+ PrivateKey : ecdsaConfig .PrivateKey ,
6768 }
68- signerFn , _ , err := signerv2 .SignerFromConfig (signerConfig , config .BaseConfig .ChainId )
69+ signerFn , _ , err := signerv2 .SignerFromConfig (signerConfig , opConfig .BaseConfig .ChainId )
6970 if err != nil {
7071 return err
7172 }
72- w , err := wallet .NewPrivateKeyWallet (& config .BaseConfig .EthRpcClient , signerFn ,
73- config .Operator .Address , config .BaseConfig .Logger )
73+ w , err := wallet .NewPrivateKeyWallet (& opConfig .BaseConfig .EthRpcClient , signerFn ,
74+ opConfig .Operator .Address , opConfig .BaseConfig .Logger )
7475
7576 if err != nil {
7677 return err
7778 }
7879
79- txMgr := txmgr .NewSimpleTxManager (w , & config .BaseConfig .EthRpcClient , config .BaseConfig .Logger ,
80- config .Operator .Address )
80+ txMgr := txmgr .NewSimpleTxManager (w , & opConfig .BaseConfig .EthRpcClient , opConfig .BaseConfig .Logger ,
81+ opConfig .Operator .Address )
8182 eigenMetrics := metrics .NewNoopMetrics ()
8283 eigenLayerWriter , err := elcontracts .BuildELChainWriter (delegationManagerAddr , avsDirectoryAddr ,
83- & config .BaseConfig .EthRpcClient , config .BaseConfig .Logger , eigenMetrics , txMgr )
84+ & opConfig .BaseConfig .EthRpcClient , opConfig .BaseConfig .Logger , eigenMetrics , txMgr )
8485 if err != nil {
8586 return err
8687 }
8788
8889 _ , err = eigenLayerWriter .DepositERC20IntoStrategy (context .Background (), strategyAddr , amount , true )
8990 if err != nil {
90- config .BaseConfig .Logger .Errorf ("Error depositing into strategy" )
91+ opConfig .BaseConfig .Logger .Errorf ("Error depositing into strategy" )
9192 return err
9293 }
9394 return nil
0 commit comments