@@ -130,7 +130,7 @@ func GetFormattedStateNames(states []int) string {
130130 return statesAllowed
131131}
132132
133- func InitializeCommandDependencies (flagSet * pflag.FlagSet ) (types.Configurations , rpc.RPCParameters , types.Account , error ) {
133+ func InitializeCommandDependencies (flagSet * pflag.FlagSet ) (types.Configurations , rpc.RPCParameters , * block. BlockMonitor , types.Account , error ) {
134134 var (
135135 account types.Account
136136 client * ethclient.Client
@@ -141,15 +141,15 @@ func InitializeCommandDependencies(flagSet *pflag.FlagSet) (types.Configurations
141141 config , err := cmdUtils .GetConfigData ()
142142 if err != nil {
143143 log .Error ("Error in getting config: " , err )
144- return types.Configurations {}, rpc.RPCParameters {}, types.Account {}, err
144+ return types.Configurations {}, rpc.RPCParameters {}, nil , types.Account {}, err
145145 }
146146 log .Debugf ("Config: %+v" , config )
147147
148148 if razorUtils .IsFlagPassed ("address" ) {
149149 address , err := flagSetUtils .GetStringAddress (flagSet )
150150 if err != nil {
151151 log .Error ("Error in getting address: " , err )
152- return types.Configurations {}, rpc.RPCParameters {}, types.Account {}, err
152+ return types.Configurations {}, rpc.RPCParameters {}, nil , types.Account {}, err
153153 }
154154 log .Debugf ("Address: %v" , address )
155155
@@ -159,21 +159,21 @@ func InitializeCommandDependencies(flagSet *pflag.FlagSet) (types.Configurations
159159 accountManager , err := razorUtils .AccountManagerForKeystore ()
160160 if err != nil {
161161 log .Error ("Error in getting accounts manager for keystore: " , err )
162- return types.Configurations {}, rpc.RPCParameters {}, types.Account {}, err
162+ return types.Configurations {}, rpc.RPCParameters {}, nil , types.Account {}, err
163163 }
164164
165165 account = accounts .InitAccountStruct (address , password , accountManager )
166166 err = razorUtils .CheckPassword (account )
167167 if err != nil {
168168 log .Error ("Error in fetching private key from given password: " , err )
169- return types.Configurations {}, rpc.RPCParameters {}, types.Account {}, err
169+ return types.Configurations {}, rpc.RPCParameters {}, nil , types.Account {}, err
170170 }
171171 }
172172
173173 rpcManager , err := rpc .InitializeRPCManager (config .Provider )
174174 if err != nil {
175175 log .Error ("Error in initializing RPC Manager: " , err )
176- return types.Configurations {}, rpc.RPCParameters {}, types.Account {}, err
176+ return types.Configurations {}, rpc.RPCParameters {}, nil , types.Account {}, err
177177 }
178178
179179 rpcParameters = rpc.RPCParameters {
@@ -184,7 +184,7 @@ func InitializeCommandDependencies(flagSet *pflag.FlagSet) (types.Configurations
184184 client , err = rpcManager .GetBestRPCClient ()
185185 if err != nil {
186186 log .Error ("Error in getting best RPC client: " , err )
187- return types.Configurations {}, rpc.RPCParameters {}, types.Account {}, err
187+ return types.Configurations {}, rpc.RPCParameters {}, nil , types.Account {}, err
188188 }
189189
190190 // Initialize BlockMonitor with RPCManager
@@ -196,5 +196,5 @@ func InitializeCommandDependencies(flagSet *pflag.FlagSet) (types.Configurations
196196 // Update Logger Instance
197197 logger .UpdateLogger (account .Address , client , blockMonitor )
198198
199- return config , rpcParameters , account , nil
199+ return config , rpcParameters , blockMonitor , account , nil
200200}
0 commit comments