File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -121,11 +121,11 @@ function setify(items: Array<string>): ReadonlySet<string> {
121121    return  Object . freeze ( result ) ; 
122122} 
123123
124- const  _kwVisibDeploy  =  "external public payable" ; 
124+ const  _kwVisibDeploy  =  "external public payable override " ; 
125125const  KwVisibDeploy  =  setify ( _kwVisibDeploy . split ( " " ) ) ; 
126126
127127// Visibility Keywords 
128- const  _kwVisib  =  "constant external internal payable private public pure view" ; 
128+ const  _kwVisib  =  "constant external internal payable private public pure view override " ; 
129129const  KwVisib  =  setify ( _kwVisib . split ( " " ) ) ; 
130130
131131const  _kwTypes  =  "constructor error event fallback function receive struct" ; 
@@ -218,7 +218,10 @@ class TokenString {
218218
219219    // Pops and returns the value of the next token if it is `type`; throws if out of tokens 
220220    popType ( type : string ) : string  { 
221-         if  ( this . peek ( ) . type  !==  type )  {  throw  new  Error ( `expected ${  type  } ${  JSON . stringify ( this . peek ( ) )  }  ) ;  } 
221+         if  ( this . peek ( ) . type  !==  type )  { 
222+             const  top  =  this . peek ( ) ; 
223+             throw  new  Error ( `expected ${  type  } ${  top . type  } ${  JSON . stringify ( top . text )  }  ) ; 
224+         } 
222225        return  this . pop ( ) . text ; 
223226    } 
224227
@@ -471,7 +474,7 @@ function consumeGas(tokens: TokenString): null | bigint {
471474
472475function  consumeEoi ( tokens : TokenString ) : void { 
473476    if  ( tokens . length )  { 
474-         throw  new  Error ( `unexpected tokens: ${  tokens . toString ( )  }  ) ; 
477+         throw  new  Error ( `unexpected tokens at offset  ${   tokens . offset   } ${  tokens . toString ( )  }  ) ; 
475478    } 
476479} 
477480
Original file line number Diff line number Diff line change @@ -342,8 +342,8 @@ export class Interface {
342342        for  ( const  a  of  abi )  { 
343343            try  { 
344344                frags . push ( Fragment . from ( a ) ) ; 
345-             }  catch  ( error )  { 
346-                 console . log ( "EE" ,  error ) ; 
345+             }  catch  ( error :  any )  { 
346+                 console . log ( `[Warning] Invalid Fragment  ${   JSON . stringify ( a )   } :` ,  error . message ) ; 
347347            } 
348348        } 
349349
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments