@@ -75,27 +75,27 @@ var CreateContextCommand = &cli.Command{
7575 Action : contextCreateAction ,
7676}
7777
78- func contextCreateAction (c * cli.Context ) error {
79- logger := common .LoggerFromContext (c . Context )
78+ func contextCreateAction (cCtx * cli.Context ) error {
79+ logger := common .LoggerFromContext (cCtx )
8080
8181 // Use flag provided name
82- name := c .String ("context" )
82+ name := cCtx .String ("context" )
8383
8484 // Get context name from arg
8585 if name == "" {
86- name = c .Args ().Get (0 )
86+ name = cCtx .Args ().Get (0 )
8787 }
8888
8989 // If no context is provided show help
9090 if name == "" {
91- return cli .ShowSubcommandHelp (c )
91+ return cli .ShowSubcommandHelp (cCtx )
9292 }
9393
9494 // Locate the context directory
9595 cntxDir := filepath .Join ("config" , "contexts" )
9696
9797 // Guard existence early
98- if err := ensureContextCreatable (cntxDir , name , c .Bool ("overwrite" )); err != nil {
98+ if err := ensureContextCreatable (cntxDir , name , cCtx .Bool ("overwrite" )); err != nil {
9999 return err
100100 }
101101
@@ -117,7 +117,7 @@ func contextCreateAction(c *cli.Context) error {
117117 }
118118
119119 // Set the current context in config
120- if c .Bool ("use" ) {
120+ if cCtx .Bool ("use" ) {
121121 err := setCurrentContext (name )
122122 if err != nil {
123123 return fmt .Errorf ("failed to set current context %s: %w" , entryName , err )
@@ -135,13 +135,13 @@ func contextCreateAction(c *cli.Context) error {
135135 }
136136
137137 // Log creation
138- logContextCreated (logger , cntxDir , name , & ctxDoc , c .Bool ("use" ))
138+ logContextCreated (logger , cntxDir , name , & ctxDoc , cCtx .Bool ("use" ))
139139
140140 return nil
141141 }
142142
143143 // L1
144- l1RPCURL , err := getL1RPCURL (c )
144+ l1RPCURL , err := getL1RPCURL (cCtx )
145145 if err != nil {
146146 return err
147147 }
@@ -151,7 +151,7 @@ func contextCreateAction(c *cli.Context) error {
151151 }
152152
153153 // L2
154- l2RPCURL , err := getL2RPCURL (c )
154+ l2RPCURL , err := getL2RPCURL (cCtx )
155155 if err != nil {
156156 return err
157157 }
@@ -161,15 +161,15 @@ func contextCreateAction(c *cli.Context) error {
161161 }
162162
163163 // Keys and AVS basics
164- deployerKey , err := getDeployerKey (c )
164+ deployerKey , err := getDeployerKey (cCtx )
165165 if err != nil {
166166 return err
167167 }
168- appKey , err := getAppKey (c )
168+ appKey , err := getAppKey (cCtx )
169169 if err != nil {
170170 return err
171171 }
172- avsCfg , err := getAVSSetup (c )
172+ avsCfg , err := getAVSSetup (cCtx )
173173 if err != nil {
174174 return err
175175 }
@@ -183,7 +183,7 @@ func contextCreateAction(c *cli.Context) error {
183183 )
184184
185185 // Persist and optionally make current
186- if err := saveContext (cntxDir , name , ctxDoc , c .Bool ("use" ), logger ); err != nil {
186+ if err := saveContext (cntxDir , name , ctxDoc , cCtx .Bool ("use" ), logger ); err != nil {
187187 return err
188188 }
189189
@@ -192,7 +192,7 @@ func contextCreateAction(c *cli.Context) error {
192192 if err != nil {
193193 logger .Title ("Could not load context YAML for Zeus update: %v" , err )
194194 } else {
195- if err := common .UpdateContextWithZeusAddresses (c .Context , logger , contextNode , contextName ); err != nil {
195+ if err := common .UpdateContextWithZeusAddresses (cCtx .Context , logger , contextNode , contextName ); err != nil {
196196 logger .Info ("Failed to fetch addresses from Zeus: %v" , err )
197197 logger .Info ("Continuing with addresses from config..." )
198198 } else {
@@ -203,7 +203,7 @@ func contextCreateAction(c *cli.Context) error {
203203 }
204204 }
205205
206- logContextCreated (logger , cntxDir , name , ctxDoc , c .Bool ("use" ))
206+ logContextCreated (logger , cntxDir , name , ctxDoc , cCtx .Bool ("use" ))
207207 return nil
208208}
209209
@@ -218,8 +218,8 @@ func ensureContextCreatable(cntxDir, ctxName string, overwrite bool) error {
218218 return nil
219219}
220220
221- func getL1RPCURL (c * cli.Context ) (string , error ) {
222- l1RPCURL := c .String ("l1-rpc-url" )
221+ func getL1RPCURL (cCtx * cli.Context ) (string , error ) {
222+ l1RPCURL := cCtx .String ("l1-rpc-url" )
223223 if l1RPCURL == "" {
224224 url , err := output .InputString (
225225 "Enter L1 RPC URL" ,
@@ -255,8 +255,8 @@ func getChainIDFromRPC(rpcURL string, logger iface.Logger) (*big.Int, error) {
255255 return chainID , nil
256256}
257257
258- func getL2RPCURL (c * cli.Context ) (string , error ) {
259- l2RPCURL := c .String ("l2-rpc-url" )
258+ func getL2RPCURL (cCtx * cli.Context ) (string , error ) {
259+ l2RPCURL := cCtx .String ("l2-rpc-url" )
260260 if l2RPCURL == "" {
261261 url , err := output .InputString (
262262 "Enter L2 RPC URL" ,
@@ -275,8 +275,8 @@ func getL2RPCURL(c *cli.Context) (string, error) {
275275 return l2RPCURL , nil
276276}
277277
278- func getDeployerKey (c * cli.Context ) (string , error ) {
279- deployerPrivateKey := c .String ("deployer-private-key" )
278+ func getDeployerKey (cCtx * cli.Context ) (string , error ) {
279+ deployerPrivateKey := cCtx .String ("deployer-private-key" )
280280 if deployerPrivateKey == "" {
281281 val , err := output .InputString (
282282 "Enter a funded Deployer Private Key" ,
@@ -295,8 +295,8 @@ func getDeployerKey(c *cli.Context) (string, error) {
295295 return "0x" + strip0x (deployerPrivateKey ), nil
296296}
297297
298- func getAppKey (c * cli.Context ) (string , error ) {
299- appPrivateKey := c .String ("app-private-key" )
298+ func getAppKey (cCtx * cli.Context ) (string , error ) {
299+ appPrivateKey := cCtx .String ("app-private-key" )
300300 if appPrivateKey == "" {
301301 val , err := output .InputString (
302302 "Enter a funded App private key" ,
@@ -315,20 +315,20 @@ func getAppKey(c *cli.Context) (string, error) {
315315 return "0x" + strip0x (appPrivateKey ), nil
316316}
317317
318- func getAVSSetup (c * cli.Context ) (* common.AvsConfig , error ) {
319- privateKey , err := getAVSPrivateKey (c )
318+ func getAVSSetup (cCtx * cli.Context ) (* common.AvsConfig , error ) {
319+ privateKey , err := getAVSPrivateKey (cCtx )
320320 if err != nil {
321321 return nil , err
322322 }
323323 address , err := derivePublicKey (privateKey )
324324 if err != nil {
325325 return nil , err
326326 }
327- metadataURL , err := getAVSMetadataURL (c )
327+ metadataURL , err := getAVSMetadataURL (cCtx )
328328 if err != nil {
329329 return nil , err
330330 }
331- registrar , err := getRegistrarAddress (c )
331+ registrar , err := getRegistrarAddress (cCtx )
332332 if err != nil {
333333 return nil , err
334334 }
@@ -343,8 +343,8 @@ func getAVSSetup(c *cli.Context) (*common.AvsConfig, error) {
343343 return cfg , nil
344344}
345345
346- func getAVSPrivateKey (c * cli.Context ) (string , error ) {
347- pk := c .String ("avs-private-key" )
346+ func getAVSPrivateKey (cCtx * cli.Context ) (string , error ) {
347+ pk := cCtx .String ("avs-private-key" )
348348 if pk == "" {
349349 val , err := output .InputString (
350350 "Enter a funded AVS private key" ,
@@ -374,8 +374,8 @@ func derivePublicKey(pkHex string) (string, error) {
374374 return strings .ToLower (addr .Hex ()), nil
375375}
376376
377- func getAVSMetadataURL (c * cli.Context ) (string , error ) {
378- u := c .String ("avs-metadata-url" )
377+ func getAVSMetadataURL (cCtx * cli.Context ) (string , error ) {
378+ u := cCtx .String ("avs-metadata-url" )
379379 if u == "" {
380380 val , err := output .InputString (
381381 "Enter AVS metadata URL" ,
@@ -394,8 +394,8 @@ func getAVSMetadataURL(c *cli.Context) (string, error) {
394394 return u , nil
395395}
396396
397- func getRegistrarAddress (c * cli.Context ) (string , error ) {
398- addr := c .String ("registrar-address" )
397+ func getRegistrarAddress (cCtx * cli.Context ) (string , error ) {
398+ addr := cCtx .String ("registrar-address" )
399399 if addr == "" {
400400 val , err := output .InputString (
401401 "Enter Registrar contract address" ,
0 commit comments