@@ -265,7 +265,7 @@ mod tests {
265
265
fn test_halted_tx_call_bls12_381_g1_add_out_of_gas ( ) {
266
266
let ctx = Context :: op ( )
267
267
. modify_tx_chained ( |tx| {
268
- tx. base . kind = TxKind :: Call ( u64_to_address ( bls12_381_const:: G1_ADD_ADDRESS ) ) ;
268
+ tx. base . kind = TxKind :: Call ( bls12_381_const:: G1_ADD_ADDRESS ) ;
269
269
tx. base . gas_limit = 21_000 + bls12_381_const:: G1_ADD_BASE_GAS_FEE - 1 ;
270
270
} )
271
271
. modify_chain_chained ( |l1_block| {
@@ -293,7 +293,7 @@ mod tests {
293
293
fn test_halted_tx_call_bls12_381_g1_add_input_wrong_size ( ) {
294
294
let ctx = Context :: op ( )
295
295
. modify_tx_chained ( |tx| {
296
- tx. base . kind = TxKind :: Call ( u64_to_address ( bls12_381_const:: G1_ADD_ADDRESS ) ) ;
296
+ tx. base . kind = TxKind :: Call ( bls12_381_const:: G1_ADD_ADDRESS ) ;
297
297
tx. base . gas_limit = 21_000 + bls12_381_const:: G1_ADD_BASE_GAS_FEE ;
298
298
} )
299
299
. modify_chain_chained ( |l1_block| {
@@ -321,7 +321,7 @@ mod tests {
321
321
fn test_halted_tx_call_bls12_381_g1_msm_input_wrong_size ( ) {
322
322
let ctx = Context :: op ( )
323
323
. modify_tx_chained ( |tx| {
324
- tx. base . kind = TxKind :: Call ( u64_to_address ( bls12_381_const:: G1_MSM_ADDRESS ) ) ;
324
+ tx. base . kind = TxKind :: Call ( bls12_381_const:: G1_MSM_ADDRESS ) ;
325
325
tx. base . data = Bytes :: from ( [ 1 ; bls12_381_const:: G1_MSM_INPUT_LENGTH - 1 ] ) ;
326
326
} )
327
327
. modify_chain_chained ( |l1_block| {
@@ -355,7 +355,7 @@ mod tests {
355
355
356
356
let ctx = Context :: op ( )
357
357
. modify_tx_chained ( |tx| {
358
- tx. base . kind = TxKind :: Call ( u64_to_address ( bls12_381_const:: G1_MSM_ADDRESS ) ) ;
358
+ tx. base . kind = TxKind :: Call ( bls12_381_const:: G1_MSM_ADDRESS ) ;
359
359
tx. base . data = Bytes :: from ( [ 1 ; bls12_381_const:: G1_MSM_INPUT_LENGTH ] ) ;
360
360
tx. base . gas_limit = 23_560 //initial gas for input
361
361
+ gs1_msm_gas
@@ -392,7 +392,7 @@ mod tests {
392
392
393
393
let ctx = Context :: op ( )
394
394
. modify_tx_chained ( |tx| {
395
- tx. base . kind = TxKind :: Call ( u64_to_address ( bls12_381_const:: G1_MSM_ADDRESS ) ) ;
395
+ tx. base . kind = TxKind :: Call ( bls12_381_const:: G1_MSM_ADDRESS ) ;
396
396
tx. base . data = Bytes :: from ( [ 1 ; bls12_381_const:: G1_MSM_INPUT_LENGTH ] ) ;
397
397
tx. base . gas_limit = 23_560 //initial gas for input
398
398
+ gs1_msm_gas;
@@ -422,7 +422,7 @@ mod tests {
422
422
fn test_halted_tx_call_bls12_381_g2_msm_input_wrong_size ( ) {
423
423
let ctx = Context :: op ( )
424
424
. modify_tx_chained ( |tx| {
425
- tx. base . kind = TxKind :: Call ( u64_to_address ( bls12_381_const:: G2_MSM_ADDRESS ) ) ;
425
+ tx. base . kind = TxKind :: Call ( bls12_381_const:: G2_MSM_ADDRESS ) ;
426
426
tx. base . data = Bytes :: from ( [ 1 ; bls12_381_const:: G2_MSM_INPUT_LENGTH - 1 ] ) ;
427
427
} )
428
428
. modify_chain_chained ( |l1_block| {
@@ -456,7 +456,7 @@ mod tests {
456
456
457
457
let ctx = Context :: op ( )
458
458
. modify_tx_chained ( |tx| {
459
- tx. base . kind = TxKind :: Call ( u64_to_address ( bls12_381_const:: G2_MSM_ADDRESS ) ) ;
459
+ tx. base . kind = TxKind :: Call ( bls12_381_const:: G2_MSM_ADDRESS ) ;
460
460
tx. base . data = Bytes :: from ( [ 1 ; bls12_381_const:: G2_MSM_INPUT_LENGTH ] ) ;
461
461
tx. base . gas_limit = 25_608 //initial gas for input
462
462
+ gs2_msm_gas
@@ -493,7 +493,7 @@ mod tests {
493
493
494
494
let ctx = Context :: op ( )
495
495
. modify_tx_chained ( |tx| {
496
- tx. base . kind = TxKind :: Call ( u64_to_address ( bls12_381_const:: G2_MSM_ADDRESS ) ) ;
496
+ tx. base . kind = TxKind :: Call ( bls12_381_const:: G2_MSM_ADDRESS ) ;
497
497
tx. base . data = Bytes :: from ( [ 1 ; bls12_381_const:: G2_MSM_INPUT_LENGTH ] ) ;
498
498
tx. base . gas_limit = 25_608 //initial gas for input
499
499
+ gs2_msm_gas;
@@ -523,7 +523,7 @@ mod tests {
523
523
fn test_halted_tx_call_bls12_381_pairing_input_wrong_size ( ) {
524
524
let ctx = Context :: op ( )
525
525
. modify_tx_chained ( |tx| {
526
- tx. base . kind = TxKind :: Call ( u64_to_address ( bls12_381_const:: G2_MSM_ADDRESS ) ) ;
526
+ tx. base . kind = TxKind :: Call ( bls12_381_const:: G2_MSM_ADDRESS ) ;
527
527
tx. base . data = Bytes :: from ( [ 1 ; bls12_381_const:: G2_MSM_INPUT_LENGTH - 1 ] ) ;
528
528
} )
529
529
. modify_chain_chained ( |l1_block| {
@@ -554,7 +554,7 @@ mod tests {
554
554
555
555
let ctx = Context :: op ( )
556
556
. modify_tx_chained ( |tx| {
557
- tx. base . kind = TxKind :: Call ( u64_to_address ( bls12_381_const:: PAIRING_ADDRESS ) ) ;
557
+ tx. base . kind = TxKind :: Call ( bls12_381_const:: PAIRING_ADDRESS ) ;
558
558
tx. base . data = Bytes :: from ( [ 1 ; bls12_381_const:: PAIRING_INPUT_LENGTH ] ) ;
559
559
tx. base . gas_limit = 27_144 //initial gas for input
560
560
+ pairing_gas
@@ -588,7 +588,7 @@ mod tests {
588
588
589
589
let ctx = Context :: op ( )
590
590
. modify_tx_chained ( |tx| {
591
- tx. base . kind = TxKind :: Call ( u64_to_address ( bls12_381_const:: PAIRING_ADDRESS ) ) ;
591
+ tx. base . kind = TxKind :: Call ( bls12_381_const:: PAIRING_ADDRESS ) ;
592
592
tx. base . data = Bytes :: from ( [ 1 ; bls12_381_const:: PAIRING_INPUT_LENGTH ] ) ;
593
593
tx. base . gas_limit = 27_144 //initial gas for input
594
594
+ pairing_gas;
@@ -618,7 +618,7 @@ mod tests {
618
618
fn test_halted_tx_call_bls12_381_map_fp_to_g1_out_of_gas ( ) {
619
619
let ctx = Context :: op ( )
620
620
. modify_tx_chained ( |tx| {
621
- tx. base . kind = TxKind :: Call ( u64_to_address ( bls12_381_const:: MAP_FP_TO_G1_ADDRESS ) ) ;
621
+ tx. base . kind = TxKind :: Call ( bls12_381_const:: MAP_FP_TO_G1_ADDRESS ) ;
622
622
tx. base . gas_limit = 21_000 + bls12_381_const:: MAP_FP_TO_G1_BASE_GAS_FEE - 1 ;
623
623
} )
624
624
. modify_chain_chained ( |l1_block| {
@@ -646,7 +646,7 @@ mod tests {
646
646
fn test_halted_tx_call_bls12_381_map_fp_to_g1_input_wrong_size ( ) {
647
647
let ctx = Context :: op ( )
648
648
. modify_tx_chained ( |tx| {
649
- tx. base . kind = TxKind :: Call ( u64_to_address ( bls12_381_const:: MAP_FP_TO_G1_ADDRESS ) ) ;
649
+ tx. base . kind = TxKind :: Call ( bls12_381_const:: MAP_FP_TO_G1_ADDRESS ) ;
650
650
tx. base . gas_limit = 21_000 + bls12_381_const:: MAP_FP_TO_G1_BASE_GAS_FEE ;
651
651
} )
652
652
. modify_chain_chained ( |l1_block| {
@@ -674,7 +674,7 @@ mod tests {
674
674
fn test_halted_tx_call_bls12_381_map_fp2_to_g2_out_of_gas ( ) {
675
675
let ctx = Context :: op ( )
676
676
. modify_tx_chained ( |tx| {
677
- tx. base . kind = TxKind :: Call ( u64_to_address ( bls12_381_const:: MAP_FP2_TO_G2_ADDRESS ) ) ;
677
+ tx. base . kind = TxKind :: Call ( bls12_381_const:: MAP_FP2_TO_G2_ADDRESS ) ;
678
678
tx. base . gas_limit = 21_000 + bls12_381_const:: MAP_FP2_TO_G2_BASE_GAS_FEE - 1 ;
679
679
} )
680
680
. modify_chain_chained ( |l1_block| {
@@ -702,7 +702,7 @@ mod tests {
702
702
fn test_halted_tx_call_bls12_381_map_fp2_to_g2_input_wrong_size ( ) {
703
703
let ctx = Context :: op ( )
704
704
. modify_tx_chained ( |tx| {
705
- tx. base . kind = TxKind :: Call ( u64_to_address ( bls12_381_const:: MAP_FP2_TO_G2_ADDRESS ) ) ;
705
+ tx. base . kind = TxKind :: Call ( bls12_381_const:: MAP_FP2_TO_G2_ADDRESS ) ;
706
706
tx. base . gas_limit = 21_000 + bls12_381_const:: MAP_FP2_TO_G2_BASE_GAS_FEE ;
707
707
} )
708
708
. modify_chain_chained ( |l1_block| {
0 commit comments