@@ -130,7 +130,7 @@ func GetFormattedStateNames(states []int) string {
130
130
return statesAllowed
131
131
}
132
132
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 ) {
134
134
var (
135
135
account types.Account
136
136
client * ethclient.Client
@@ -141,15 +141,15 @@ func InitializeCommandDependencies(flagSet *pflag.FlagSet) (types.Configurations
141
141
config , err := cmdUtils .GetConfigData ()
142
142
if err != nil {
143
143
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
145
145
}
146
146
log .Debugf ("Config: %+v" , config )
147
147
148
148
if razorUtils .IsFlagPassed ("address" ) {
149
149
address , err := flagSetUtils .GetStringAddress (flagSet )
150
150
if err != nil {
151
151
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
153
153
}
154
154
log .Debugf ("Address: %v" , address )
155
155
@@ -159,21 +159,21 @@ func InitializeCommandDependencies(flagSet *pflag.FlagSet) (types.Configurations
159
159
accountManager , err := razorUtils .AccountManagerForKeystore ()
160
160
if err != nil {
161
161
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
163
163
}
164
164
165
165
account = accounts .InitAccountStruct (address , password , accountManager )
166
166
err = razorUtils .CheckPassword (account )
167
167
if err != nil {
168
168
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
170
170
}
171
171
}
172
172
173
173
rpcManager , err := rpc .InitializeRPCManager (config .Provider )
174
174
if err != nil {
175
175
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
177
177
}
178
178
179
179
rpcParameters = rpc.RPCParameters {
@@ -184,7 +184,7 @@ func InitializeCommandDependencies(flagSet *pflag.FlagSet) (types.Configurations
184
184
client , err = rpcManager .GetBestRPCClient ()
185
185
if err != nil {
186
186
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
188
188
}
189
189
190
190
// Initialize BlockMonitor with RPCManager
@@ -196,5 +196,5 @@ func InitializeCommandDependencies(flagSet *pflag.FlagSet) (types.Configurations
196
196
// Update Logger Instance
197
197
logger .UpdateLogger (account .Address , client , blockMonitor )
198
198
199
- return config , rpcParameters , account , nil
199
+ return config , rpcParameters , blockMonitor , account , nil
200
200
}
0 commit comments