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> {
121
121
return Object . freeze ( result ) ;
122
122
}
123
123
124
- const _kwVisibDeploy = "external public payable" ;
124
+ const _kwVisibDeploy = "external public payable override " ;
125
125
const KwVisibDeploy = setify ( _kwVisibDeploy . split ( " " ) ) ;
126
126
127
127
// 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 " ;
129
129
const KwVisib = setify ( _kwVisib . split ( " " ) ) ;
130
130
131
131
const _kwTypes = "constructor error event fallback function receive struct" ;
@@ -218,7 +218,10 @@ class TokenString {
218
218
219
219
// Pops and returns the value of the next token if it is `type`; throws if out of tokens
220
220
popType ( type : string ) : string {
221
- if ( this . peek ( ) . type !== type ) { throw new Error ( `expected ${ type } ; got ${ JSON . stringify ( this . peek ( ) ) } ` ) ; }
221
+ if ( this . peek ( ) . type !== type ) {
222
+ const top = this . peek ( ) ;
223
+ throw new Error ( `expected ${ type } ; got ${ top . type } ${ JSON . stringify ( top . text ) } ` ) ;
224
+ }
222
225
return this . pop ( ) . text ;
223
226
}
224
227
@@ -471,7 +474,7 @@ function consumeGas(tokens: TokenString): null | bigint {
471
474
472
475
function consumeEoi ( tokens : TokenString ) : void {
473
476
if ( tokens . length ) {
474
- throw new Error ( `unexpected tokens: ${ tokens . toString ( ) } ` ) ;
477
+ throw new Error ( `unexpected tokens at offset ${ tokens . offset } : ${ tokens . toString ( ) } ` ) ;
475
478
}
476
479
}
477
480
Original file line number Diff line number Diff line change @@ -342,8 +342,8 @@ export class Interface {
342
342
for ( const a of abi ) {
343
343
try {
344
344
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 ) ;
347
347
}
348
348
}
349
349
You can’t perform that action at this time.
0 commit comments