@@ -292,9 +292,7 @@ describe("Return value decoding", function () {
292
292
) ;
293
293
} ) ;
294
294
295
- // TODO: un-skip once the following issue have been resolved:
296
- // https://github.com/web3/web3.js/issues/6320
297
- it . skip ( "Decodes messageless revert" , async function ( ) {
295
+ it ( "Decodes messageless revert" , async function ( ) {
298
296
this . timeout ( 9000 ) ;
299
297
300
298
//HACK: because this transaction makes web3 throw, we have to extract the hash from
@@ -303,9 +301,11 @@ describe("Return value decoding", function () {
303
301
let instance = await abstractions . ReturnValues . deployed ( ) ;
304
302
let txHash ;
305
303
try {
306
- // TODO: investigate why `gas` needed to be replaced with `gasLimit`:
307
- // https://github.com/web3/web3.js/issues/6317
308
- await instance . fail ( { gasLimit : testDefaultTxGasLimit } ) ; //web3 throws on failure
304
+ // this will throw because of the revert inside the contract method
305
+ await instance . fail (
306
+ { gas : testDefaultTxGasLimit } ,
307
+ { checkRevertBeforeSending : false }
308
+ ) ;
309
309
} catch ( error ) {
310
310
txHash = error . receipt . transactionHash ;
311
311
}
@@ -321,9 +321,7 @@ describe("Return value decoding", function () {
321
321
assert . strictEqual ( decoding . kind , "failure" ) ;
322
322
} ) ;
323
323
324
- // TODO: un-skip once the following issue have been resolved:
325
- // https://github.com/web3/web3.js/issues/6320
326
- it . skip ( "Decodes revert string" , async function ( ) {
324
+ it ( "Decodes revert string" , async function ( ) {
327
325
this . timeout ( 9000 ) ;
328
326
329
327
//HACK: because this transaction makes web3 throw, we have to extract the hash from
@@ -332,9 +330,11 @@ describe("Return value decoding", function () {
332
330
let instance = await abstractions . ReturnValues . deployed ( ) ;
333
331
let txHash ;
334
332
try {
335
- // TODO: investigate why `gas` needed to be replaced with `gasLimit`:
336
- // https://github.com/web3/web3.js/issues/6317
337
- await instance . failNoisy ( { gasLimit : testDefaultTxGasLimit } ) ; //web3 throws on failure
333
+ // this will throw because of the revert inside the contract method
334
+ await instance . failNoisy (
335
+ { gas : testDefaultTxGasLimit } ,
336
+ { checkRevertBeforeSending : false }
337
+ ) ;
338
338
} catch ( error ) {
339
339
txHash = error . receipt . transactionHash ;
340
340
}
@@ -357,9 +357,7 @@ describe("Return value decoding", function () {
357
357
assert . strictEqual ( message , "Noise!" ) ;
358
358
} ) ;
359
359
360
- // TODO: un-skip once the following issue have been resolved:
361
- // https://github.com/web3/web3.js/issues/6320
362
- it . skip ( "Decodes panic code" , async function ( ) {
360
+ it ( "Decodes panic code" , async function ( ) {
363
361
this . timeout ( 9000 ) ;
364
362
365
363
//HACK: because this transaction makes web3 throw, we have to extract the hash from
@@ -368,9 +366,11 @@ describe("Return value decoding", function () {
368
366
let instance = await abstractions . ReturnValues . deployed ( ) ;
369
367
let txHash ;
370
368
try {
371
- // TODO: investigate why `gas` needed to be replaced with `gasLimit`:
372
- // https://github.com/web3/web3.js/issues/6317
373
- await instance . panic ( { gasLimit : testDefaultTxGasLimit } ) ; //web3 throws on failure
369
+ // this will throw because of the revert inside the contract method
370
+ await instance . panic (
371
+ { gas : testDefaultTxGasLimit } ,
372
+ { checkRevertBeforeSending : false }
373
+ ) ;
374
374
} catch ( error ) {
375
375
txHash = error . receipt . transactionHash ;
376
376
}
@@ -395,9 +395,7 @@ describe("Return value decoding", function () {
395
395
assert . strictEqual ( panicCode , 1 ) ;
396
396
} ) ;
397
397
398
- // TODO: un-skip once the following issue have been resolved:
399
- // https://github.com/web3/web3.js/issues/6320
400
- describe . skip ( "Custom errors" , function ( ) {
398
+ describe ( "Custom errors" , function ( ) {
401
399
it ( "Decodes custom errors" , async function ( ) {
402
400
this . timeout ( 9000 ) ;
403
401
@@ -407,9 +405,11 @@ describe("Return value decoding", function () {
407
405
let instance = await abstractions . ErrorTest . deployed ( ) ;
408
406
let txHash ;
409
407
try {
410
- // TODO: investigate why `gas` needed to be replaced with `gasLimit`:
411
- // https://github.com/web3/web3.js/issues/6317
412
- await instance . local ( { gasLimit : testDefaultTxGasLimit } ) ; //web3 throws on failure
408
+ // this will throw because of the revert inside the contract method
409
+ await instance . local (
410
+ { gas : testDefaultTxGasLimit } ,
411
+ { checkRevertBeforeSending : false }
412
+ ) ;
413
413
} catch ( error ) {
414
414
txHash = error . receipt . transactionHash ;
415
415
}
@@ -449,9 +449,11 @@ describe("Return value decoding", function () {
449
449
let instance = await abstractions . ErrorTest . deployed ( ) ;
450
450
let txHash ;
451
451
try {
452
- // TODO: investigate why `gas` needed to be replaced with `gasLimit`:
453
- // https://github.com/web3/web3.js/issues/6317
454
- await instance . global ( { gasLimit : testDefaultTxGasLimit } ) ; //web3 throws on failure
452
+ // this will throw because of the revert inside the contract method
453
+ await instance . global (
454
+ { gas : testDefaultTxGasLimit } ,
455
+ { checkRevertBeforeSending : false }
456
+ ) ;
455
457
} catch ( error ) {
456
458
txHash = error . receipt . transactionHash ;
457
459
}
@@ -481,9 +483,11 @@ describe("Return value decoding", function () {
481
483
let instance = await abstractions . ErrorTest . deployed ( ) ;
482
484
let txHash ;
483
485
try {
484
- // TODO: investigate why `gas` needed to be replaced with `gasLimit`:
485
- // https://github.com/web3/web3.js/issues/6317
486
- await instance . foreign ( { gasLimit : testDefaultTxGasLimit } ) ; //web3 throws on failure
486
+ // this will throw because of the revert inside the contract method
487
+ await instance . foreign (
488
+ { gas : testDefaultTxGasLimit } ,
489
+ { checkRevertBeforeSending : false }
490
+ ) ;
487
491
} catch ( error ) {
488
492
txHash = error . receipt . transactionHash ;
489
493
}
@@ -513,9 +517,11 @@ describe("Return value decoding", function () {
513
517
let instance = await abstractions . ErrorTest . deployed ( ) ;
514
518
let txHash ;
515
519
try {
516
- // TODO: investigate why `gas` needed to be replaced with `gasLimit`:
517
- // https://github.com/web3/web3.js/issues/6317
518
- await instance . inlined ( { gasLimit : testDefaultTxGasLimit } ) ; //web3 throws on failure
520
+ // this will throw because of the revert inside the contract method
521
+ await instance . inlined (
522
+ { gas : testDefaultTxGasLimit } ,
523
+ { checkRevertBeforeSending : false }
524
+ ) ;
519
525
} catch ( error ) {
520
526
txHash = error . receipt . transactionHash ;
521
527
}
@@ -545,9 +551,11 @@ describe("Return value decoding", function () {
545
551
let instance = await abstractions . ErrorTest . deployed ( ) ;
546
552
let txHash ;
547
553
try {
548
- // TODO: investigate why `gas` needed to be replaced with `gasLimit`:
549
- // https://github.com/web3/web3.js/issues/6317
550
- await instance . makeCall ( { gasLimit : testDefaultTxGasLimit } ) ; //web3 throws on failure
554
+ // this will throw because of the revert inside the contract method
555
+ await instance . makeCall (
556
+ { gas : testDefaultTxGasLimit } ,
557
+ { checkRevertBeforeSending : false }
558
+ ) ;
551
559
} catch ( error ) {
552
560
txHash = error . receipt . transactionHash ;
553
561
}
@@ -577,9 +585,11 @@ describe("Return value decoding", function () {
577
585
let instance = await abstractions . ErrorTest . deployed ( ) ;
578
586
let txHash ;
579
587
try {
580
- // TODO: investigate why `gas` needed to be replaced with `gasLimit`:
581
- // https://github.com/web3/web3.js/issues/6317
582
- await instance . ambiguous ( { gasLimit : testDefaultTxGasLimit } ) ; //web3 throws on failure
588
+ // this will throw because of the revert inside the contract method
589
+ await instance . ambiguous (
590
+ { gas : testDefaultTxGasLimit } ,
591
+ { checkRevertBeforeSending : false }
592
+ ) ;
583
593
} catch ( error ) {
584
594
txHash = error . receipt . transactionHash ;
585
595
}
@@ -614,9 +624,11 @@ describe("Return value decoding", function () {
614
624
let instance = await abstractions . ErrorTest . deployed ( ) ;
615
625
let txHash ;
616
626
try {
617
- // TODO: investigate why `gas` needed to be replaced with `gasLimit`:
618
- // https://github.com/web3/web3.js/issues/6317
619
- await instance . ambiguousCall ( { gasLimit : testDefaultTxGasLimit } ) ; //web3 throws on failure
627
+ // this will throw because of the revert inside the contract method
628
+ await instance . ambiguousCall (
629
+ { gas : testDefaultTxGasLimit } ,
630
+ { checkRevertBeforeSending : false }
631
+ ) ;
620
632
} catch ( error ) {
621
633
txHash = error . receipt . transactionHash ;
622
634
}
0 commit comments