@@ -62,7 +62,7 @@ func registerOperatorSetsAction(cCtx *cli.Context, p utils.Prompter) error {
62
62
}
63
63
logger .Info ("Signing and broadcasting registration transaction" )
64
64
eLWriter , err := common .GetELWriter (
65
- config .operatorAddress ,
65
+ config .callerAddress ,
66
66
config .signerConfig ,
67
67
ethClient ,
68
68
elcontracts.Config {
@@ -87,7 +87,7 @@ func registerOperatorSetsAction(cCtx *cli.Context, p utils.Prompter) error {
87
87
}
88
88
common .PrintTransactionInfo (receipt .TxHash .String (), config .chainID )
89
89
} else {
90
- noSendTxOpts := common .GetNoSendTxOpts (config .operatorAddress )
90
+ noSendTxOpts := common .GetNoSendTxOpts (config .callerAddress )
91
91
_ , _ , contractBindings , err := elcontracts .BuildClients (elcontracts.Config {
92
92
DelegationManagerAddress : config .delegationManagerAddress ,
93
93
}, ethClient , nil , logger , nil )
@@ -98,7 +98,7 @@ func registerOperatorSetsAction(cCtx *cli.Context, p utils.Prompter) error {
98
98
// since balance of contract can be 0, as it can be called by an EOA
99
99
// to claim. So we hardcode the gas limit to 150_000 so that we can
100
100
// create unsigned tx without gas limit estimation from contract bindings
101
- if common .IsSmartContractAddress (config .operatorAddress , ethClient ) {
101
+ if common .IsSmartContractAddress (config .callerAddress , ethClient ) {
102
102
// address is a smart contract
103
103
noSendTxOpts .GasLimit = 150_000
104
104
}
@@ -155,7 +155,12 @@ func readAndValidateRegisterOperatorSetsConfig(cCtx *cli.Context, logger logging
155
155
broadcast := cCtx .Bool (flags .BroadcastFlag .Name )
156
156
isSilent := cCtx .Bool (flags .SilentFlag .Name )
157
157
158
- operatorAddress := gethcommon .HexToAddress (cCtx .String (flags .OperatorAddressFlag .Name ))
158
+ operatorAddress := cCtx .String (flags .OperatorAddressFlag .Name )
159
+ callerAddress := cCtx .String (flags .CallerAddressFlag .Name )
160
+ if common .IsEmptyString (callerAddress ) {
161
+ logger .Infof ("Caller address not provided. Using operator address (%s) as caller address" , operatorAddress )
162
+ callerAddress = operatorAddress
163
+ }
159
164
avsAddress := gethcommon .HexToAddress (cCtx .String (flags .AVSAddressFlag .Name ))
160
165
161
166
// Get signerConfig
@@ -185,7 +190,8 @@ func readAndValidateRegisterOperatorSetsConfig(cCtx *cli.Context, logger logging
185
190
config := & RegisterConfig {
186
191
avsAddress : avsAddress ,
187
192
operatorSetIds : operatorSetIds ,
188
- operatorAddress : operatorAddress ,
193
+ operatorAddress : gethcommon .HexToAddress (operatorAddress ),
194
+ callerAddress : gethcommon .HexToAddress (callerAddress ),
189
195
network : network ,
190
196
environment : environment ,
191
197
broadcast : broadcast ,
@@ -215,6 +221,7 @@ func getRegistrationFlags() []cli.Flag {
215
221
& flags .OperatorSetIdsFlag ,
216
222
& flags .DelegationManagerAddressFlag ,
217
223
& flags .SilentFlag ,
224
+ & flags .CallerAddressFlag ,
218
225
}
219
226
220
227
allFlags := append (baseFlags , flags .GetSignerFlags ()... )
0 commit comments