@@ -669,21 +669,24 @@ async function processInitForm(
669669 ) ;
670670 initDebugger . extend ( 'processInitForm' ) ( "proxyImplementation: '%s'" , impl ) ;
671671 if ( impl ) {
672- const useImplementation = await prompt . confirm (
673- `Proxy contract detected. Use current implementation contract ABI at ${ impl } ?` ,
674- true ,
675- ) ;
676-
677- if ( useImplementation ) {
678- implAddress = impl ;
679- abiFromApi = await retryWithPrompt ( ( ) =>
680- withSpinner (
681- 'Fetching implementation contract ABI...' ,
682- 'Failed to fetch implementation ABI' ,
683- 'Warning fetching implementation ABI' ,
684- ( ) => contractService . getABI ( protocolInstance . getABI ( ) , network . id , implAddress ! ) ,
685- ) ,
672+ try {
673+ const useImplementation = await prompt . confirm (
674+ `Proxy contract detected. Use implementation contract ABI at ${ impl } ?` ,
675+ true ,
686676 ) ;
677+ if ( useImplementation ) {
678+ implAddress = impl ;
679+ abiFromApi = await retryWithPrompt ( ( ) =>
680+ withSpinner (
681+ 'Fetching implementation contract ABI...' ,
682+ 'Failed to fetch implementation ABI' ,
683+ 'Warning fetching implementation ABI' ,
684+ ( ) => contractService . getABI ( protocolInstance . getABI ( ) , network . id , implAddress ! ) ,
685+ ) ,
686+ ) ;
687+ }
688+ } catch ( error ) {
689+ this . error ( `Error confirming proxy implementation: ${ error . message } ` , { exit : 1 } ) ;
687690 }
688691 }
689692 }
0 commit comments