@@ -104,14 +104,14 @@ impl<'state> NativeSyscallHandler<'state> {
104104 syscall_usage. linear_factor += n;
105105 }
106106
107- /// Handles all gas-related logics, syscall usage counting and perform additional checks. In
108- /// native, we need to explicitly call this method at the beginning of each syscall.
107+ /// Handles all gas-related logics, syscall usage counting and perform additional checks. In native,
108+ /// we need to explicitly call this method at the beginning of each syscall.
109109 #[ allow( clippy:: result_large_err) ]
110110 fn pre_execute_syscall (
111111 & mut self ,
112112 remaining_gas : & mut u64 ,
113113 total_gas_cost : u64 ,
114- selector : SyscallSelector ,
114+ selector : SyscallSelector
115115 ) -> SyscallResult < ( ) > {
116116 if self . unrecoverable_error . is_some ( ) {
117117 // An unrecoverable error was found in a previous syscall, we return immediately to
@@ -292,7 +292,7 @@ impl StarknetSyscallHandler for &mut NativeSyscallHandler<'_> {
292292 self . pre_execute_syscall (
293293 remaining_gas,
294294 self . gas_costs ( ) . syscalls . get_block_hash . base_syscall_cost ( ) ,
295- SyscallSelector :: GetBlockHash ,
295+ SyscallSelector :: GetBlockHash
296296 ) ?;
297297 self . increment_syscall_count_by ( & SyscallSelector :: GetBlockHash , 1 ) ;
298298
@@ -307,7 +307,7 @@ impl StarknetSyscallHandler for &mut NativeSyscallHandler<'_> {
307307 self . pre_execute_syscall (
308308 remaining_gas,
309309 self . gas_costs ( ) . syscalls . get_execution_info . base_syscall_cost ( ) ,
310- SyscallSelector :: GetExecutionInfo ,
310+ SyscallSelector :: GetExecutionInfo
311311 ) ?;
312312 self . increment_syscall_count_by ( & SyscallSelector :: GetExecutionInfo , 1 ) ;
313313
@@ -329,7 +329,7 @@ impl StarknetSyscallHandler for &mut NativeSyscallHandler<'_> {
329329 self . pre_execute_syscall (
330330 remaining_gas,
331331 self . gas_costs ( ) . syscalls . get_class_hash_at . base_syscall_cost ( ) ,
332- SyscallSelector :: GetClassHashAt ,
332+ SyscallSelector :: GetClassHashAt
333333 ) ?;
334334
335335 let request = ContractAddress :: try_from ( contract_address)
@@ -347,7 +347,7 @@ impl StarknetSyscallHandler for &mut NativeSyscallHandler<'_> {
347347 self . pre_execute_syscall (
348348 remaining_gas,
349349 self . gas_costs ( ) . syscalls . get_execution_info . base_syscall_cost ( ) ,
350- SyscallSelector :: GetExecutionInfo ,
350+ SyscallSelector :: GetExecutionInfo
351351 ) ?;
352352 self . increment_syscall_count_by ( & SyscallSelector :: GetExecutionInfo , 1 ) ;
353353
@@ -398,7 +398,7 @@ impl StarknetSyscallHandler for &mut NativeSyscallHandler<'_> {
398398 self . pre_execute_syscall (
399399 remaining_gas,
400400 self . gas_costs ( ) . syscalls . replace_class . base_syscall_cost ( ) ,
401- SyscallSelector :: ReplaceClass ,
401+ SyscallSelector :: ReplaceClass
402402 ) ?;
403403 self . increment_syscall_count_by ( & SyscallSelector :: ReplaceClass , 1 ) ;
404404
@@ -454,7 +454,7 @@ impl StarknetSyscallHandler for &mut NativeSyscallHandler<'_> {
454454 self . pre_execute_syscall (
455455 remaining_gas,
456456 self . gas_costs ( ) . syscalls . library_call . base_syscall_cost ( ) ,
457- SyscallSelector :: LibraryCall ,
457+ SyscallSelector :: LibraryCall
458458 ) ?;
459459 self . increment_syscall_count_by ( & SyscallSelector :: LibraryCall , 1 ) ;
460460
@@ -501,7 +501,7 @@ impl StarknetSyscallHandler for &mut NativeSyscallHandler<'_> {
501501 self . pre_execute_syscall (
502502 remaining_gas,
503503 self . gas_costs ( ) . syscalls . call_contract . base_syscall_cost ( ) ,
504- SyscallSelector :: CallContract ,
504+ SyscallSelector :: CallContract
505505 ) ?;
506506 self . increment_syscall_count_by ( & SyscallSelector :: CallContract , 1 ) ;
507507
@@ -564,7 +564,7 @@ impl StarknetSyscallHandler for &mut NativeSyscallHandler<'_> {
564564 self . pre_execute_syscall (
565565 remaining_gas,
566566 self . gas_costs ( ) . syscalls . storage_read . base_syscall_cost ( ) ,
567- SyscallSelector :: StorageRead ,
567+ SyscallSelector :: StorageRead
568568 ) ?;
569569 self . increment_syscall_count_by ( & SyscallSelector :: StorageRead , 1 ) ;
570570
@@ -592,7 +592,7 @@ impl StarknetSyscallHandler for &mut NativeSyscallHandler<'_> {
592592 self . pre_execute_syscall (
593593 remaining_gas,
594594 self . gas_costs ( ) . syscalls . storage_write . base_syscall_cost ( ) ,
595- SyscallSelector :: StorageWrite ,
595+ SyscallSelector :: StorageWrite
596596 ) ?;
597597 self . increment_syscall_count_by ( & SyscallSelector :: StorageWrite , 1 ) ;
598598
@@ -619,7 +619,7 @@ impl StarknetSyscallHandler for &mut NativeSyscallHandler<'_> {
619619 self . pre_execute_syscall (
620620 remaining_gas,
621621 self . gas_costs ( ) . syscalls . emit_event . base_syscall_cost ( ) ,
622- SyscallSelector :: EmitEvent ,
622+ SyscallSelector :: EmitEvent
623623 ) ?;
624624 self . increment_syscall_count_by ( & SyscallSelector :: EmitEvent , 1 ) ;
625625
@@ -642,7 +642,7 @@ impl StarknetSyscallHandler for &mut NativeSyscallHandler<'_> {
642642 self . pre_execute_syscall (
643643 remaining_gas,
644644 self . gas_costs ( ) . syscalls . send_message_to_l1 . base_syscall_cost ( ) ,
645- SyscallSelector :: SendMessageToL1 ,
645+ SyscallSelector :: SendMessageToL1
646646 ) ?;
647647 self . increment_syscall_count_by ( & SyscallSelector :: SendMessageToL1 , 1 ) ;
648648
@@ -658,7 +658,7 @@ impl StarknetSyscallHandler for &mut NativeSyscallHandler<'_> {
658658 self . pre_execute_syscall (
659659 remaining_gas,
660660 self . gas_costs ( ) . syscalls . keccak . base_syscall_cost ( ) ,
661- SyscallSelector :: Keccak ,
661+ SyscallSelector :: Keccak
662662 ) ?;
663663
664664 match base_keccak (
@@ -688,7 +688,7 @@ impl StarknetSyscallHandler for &mut NativeSyscallHandler<'_> {
688688 self . pre_execute_syscall (
689689 remaining_gas,
690690 self . gas_costs ( ) . syscalls . secp256k1_new . base_syscall_cost ( ) ,
691- SyscallSelector :: Secp256k1New ,
691+ SyscallSelector :: Secp256k1New
692692 ) ?;
693693 self . increment_syscall_count_by ( & SyscallSelector :: Secp256k1New , 1 ) ;
694694
@@ -707,7 +707,7 @@ impl StarknetSyscallHandler for &mut NativeSyscallHandler<'_> {
707707 self . pre_execute_syscall (
708708 remaining_gas,
709709 self . gas_costs ( ) . syscalls . secp256k1_add . base_syscall_cost ( ) ,
710- SyscallSelector :: Secp256k1Add ,
710+ SyscallSelector :: Secp256k1Add
711711 ) ?;
712712 self . increment_syscall_count_by ( & SyscallSelector :: Secp256k1Add , 1 ) ;
713713
@@ -724,7 +724,7 @@ impl StarknetSyscallHandler for &mut NativeSyscallHandler<'_> {
724724 self . pre_execute_syscall (
725725 remaining_gas,
726726 self . gas_costs ( ) . syscalls . secp256k1_mul . base_syscall_cost ( ) ,
727- SyscallSelector :: Secp256k1Mul ,
727+ SyscallSelector :: Secp256k1Mul
728728 ) ?;
729729 self . increment_syscall_count_by ( & SyscallSelector :: Secp256k1Mul , 1 ) ;
730730
@@ -741,7 +741,7 @@ impl StarknetSyscallHandler for &mut NativeSyscallHandler<'_> {
741741 self . pre_execute_syscall (
742742 remaining_gas,
743743 self . gas_costs ( ) . syscalls . secp256k1_get_point_from_x . base_syscall_cost ( ) ,
744- SyscallSelector :: Secp256k1GetPointFromX ,
744+ SyscallSelector :: Secp256k1GetPointFromX
745745 ) ?;
746746 self . increment_syscall_count_by ( & SyscallSelector :: Secp256k1GetPointFromX , 1 ) ;
747747
@@ -759,7 +759,7 @@ impl StarknetSyscallHandler for &mut NativeSyscallHandler<'_> {
759759 self . pre_execute_syscall (
760760 remaining_gas,
761761 self . gas_costs ( ) . syscalls . secp256k1_get_xy . base_syscall_cost ( ) ,
762- SyscallSelector :: Secp256k1GetXy ,
762+ SyscallSelector :: Secp256k1GetXy
763763 ) ?;
764764 self . increment_syscall_count_by ( & SyscallSelector :: Secp256k1GetXy , 1 ) ;
765765
@@ -776,7 +776,7 @@ impl StarknetSyscallHandler for &mut NativeSyscallHandler<'_> {
776776 self . pre_execute_syscall (
777777 remaining_gas,
778778 self . gas_costs ( ) . syscalls . secp256r1_new . base_syscall_cost ( ) ,
779- SyscallSelector :: Secp256r1New ,
779+ SyscallSelector :: Secp256r1New
780780 ) ?;
781781 self . increment_syscall_count_by ( & SyscallSelector :: Secp256r1New , 1 ) ;
782782
@@ -795,7 +795,7 @@ impl StarknetSyscallHandler for &mut NativeSyscallHandler<'_> {
795795 self . pre_execute_syscall (
796796 remaining_gas,
797797 self . gas_costs ( ) . syscalls . secp256r1_add . base_syscall_cost ( ) ,
798- SyscallSelector :: Secp256r1Add ,
798+ SyscallSelector :: Secp256r1Add
799799 ) ?;
800800
801801 Ok ( Secp256Point :: add ( p0. into ( ) , p1. into ( ) ) . into ( ) )
@@ -811,7 +811,7 @@ impl StarknetSyscallHandler for &mut NativeSyscallHandler<'_> {
811811 self . pre_execute_syscall (
812812 remaining_gas,
813813 self . gas_costs ( ) . syscalls . secp256r1_mul . base_syscall_cost ( ) ,
814- SyscallSelector :: Secp256r1Mul ,
814+ SyscallSelector :: Secp256r1Mul
815815 ) ?;
816816 self . increment_syscall_count_by ( & SyscallSelector :: Secp256r1Mul , 1 ) ;
817817
@@ -828,7 +828,7 @@ impl StarknetSyscallHandler for &mut NativeSyscallHandler<'_> {
828828 self . pre_execute_syscall (
829829 remaining_gas,
830830 self . gas_costs ( ) . syscalls . secp256r1_get_point_from_x . base_syscall_cost ( ) ,
831- SyscallSelector :: Secp256r1GetPointFromX ,
831+ SyscallSelector :: Secp256r1GetPointFromX
832832 ) ?;
833833 self . increment_syscall_count_by ( & SyscallSelector :: Secp256r1GetPointFromX , 1 ) ;
834834
@@ -846,7 +846,7 @@ impl StarknetSyscallHandler for &mut NativeSyscallHandler<'_> {
846846 self . pre_execute_syscall (
847847 remaining_gas,
848848 self . gas_costs ( ) . syscalls . secp256r1_get_xy . base_syscall_cost ( ) ,
849- SyscallSelector :: Secp256r1GetXy ,
849+ SyscallSelector :: Secp256r1GetXy
850850 ) ?;
851851 self . increment_syscall_count_by ( & SyscallSelector :: Secp256r1GetXy , 1 ) ;
852852
@@ -863,7 +863,7 @@ impl StarknetSyscallHandler for &mut NativeSyscallHandler<'_> {
863863 self . pre_execute_syscall (
864864 remaining_gas,
865865 self . gas_costs ( ) . syscalls . sha256_process_block . base_syscall_cost ( ) ,
866- SyscallSelector :: Sha256ProcessBlock ,
866+ SyscallSelector :: Sha256ProcessBlock
867867 ) ?;
868868 self . increment_syscall_count_by ( & SyscallSelector :: Sha256ProcessBlock , 1 ) ;
869869
0 commit comments