@@ -119,36 +119,31 @@ func promptOperatorInfo(config *types.OperatorConfig, p utils.Prompter) (types.O
119119 }
120120 config .Operator .Address = operatorAddress
121121
122- // TODO(madhur): Disabling this for now as the feature doesn't work but
123- // we need to keep the code around for future
124122 // Prompt to gate stakers approval
125- // gateApproval, err := p.Confirm("Do you want to gate stakers approval?")
126- // if err != nil {
127- // return types.OperatorConfig{}, err
128- // }
123+ gateApproval , err := p .Confirm ("Do you want to gate stakers approval?" )
124+ if err != nil {
125+ return types.OperatorConfig {}, err
126+ }
129127 // Prompt for address if operator wants to gate approvals
130- //if gateApproval {
131- // delegationApprover, err := p.InputString("Enter your staker approver address:", "", "",
132- // func(s string) error {
133- // isValidAddress := eigenSdkUtils.IsValidEthereumAddress(s)
134- //
135- // if !isValidAddress {
136- // return errors.New("address is invalid")
137- // }
138- //
139- // return nil
140- // },
141- // )
142- // if err != nil {
143- // return types.OperatorConfig{}, err
144- // }
145- // config.Operator.DelegationApproverAddress = delegationApprover
146- //} else {
147- // config.Operator.DelegationApproverAddress = eigensdkTypes.ZeroAddress
148- //}
149-
150- // TODO(madhur): Remove this once we have the feature working and want to prompt users for this address
151- config .Operator .DelegationApproverAddress = eigensdkTypes .ZeroAddress
128+ if gateApproval {
129+ delegationApprover , err := p .InputString ("Enter your staker approver address:" , "" , "" ,
130+ func (s string ) error {
131+ isValidAddress := eigenSdkUtils .IsValidEthereumAddress (s )
132+
133+ if ! isValidAddress {
134+ return errors .New ("address is invalid" )
135+ }
136+
137+ return nil
138+ },
139+ )
140+ if err != nil {
141+ return types.OperatorConfig {}, err
142+ }
143+ config .Operator .DelegationApproverAddress = delegationApprover
144+ } else {
145+ config .Operator .DelegationApproverAddress = eigensdkTypes .ZeroAddress
146+ }
152147
153148 // Prompt for eth node
154149 rpcUrl , err := p .InputString ("Enter your ETH rpc url:" , "http://localhost:8545" , "" ,
@@ -161,8 +156,8 @@ func promptOperatorInfo(config *types.OperatorConfig, p utils.Prompter) (types.O
161156
162157 // Prompt for allocation delay
163158 allocationDelay , err := p .InputInteger (
164- "Enter your allocation delay (in seconds , default is 17.5 days ):" ,
165- "1512000 " ,
159+ "Enter your allocation delay (in blocks , default is 1200 ):" ,
160+ "1200 " ,
166161 "" ,
167162 func (i int64 ) error {
168163 if i < 0 {
@@ -180,7 +175,7 @@ func promptOperatorInfo(config *types.OperatorConfig, p utils.Prompter) (types.O
180175 "Are you sure you want to set the allocation delay to " + strconv .FormatInt (
181176 allocationDelay ,
182177 10 ,
183- ) + " seconds? This cannot be changed once set. " ,
178+ ) + " blocks? " ,
184179 )
185180 if err != nil {
186181 return types.OperatorConfig {}, err
0 commit comments