105
105
BlockIdentifier ,
106
106
Formatters ,
107
107
RPCEndpoint ,
108
+ RPCResponse ,
108
109
SimulateV1Payload ,
109
110
StateOverrideParams ,
110
111
TReturn ,
@@ -650,19 +651,15 @@ def storage_key_to_hexstr(value: Union[bytes, int, str]) -> HexStr:
650
651
)
651
652
652
653
block_result_formatters_copy = BLOCK_RESULT_FORMATTERS .copy ()
653
- block_result_formatters_copy .update (
654
- {
655
- "calls" : apply_list_to_array_formatter (
656
- type_aware_apply_formatters_to_dict (
657
- {
658
- "returnData" : HexBytes ,
659
- "logs" : apply_list_to_array_formatter (log_entry_formatter ),
660
- "gasUsed" : to_integer_if_hex ,
661
- "status" : to_integer_if_hex ,
662
- }
663
- )
664
- )
665
- }
654
+ block_result_formatters_copy ["calls" ] = apply_list_to_array_formatter (
655
+ type_aware_apply_formatters_to_dict (
656
+ {
657
+ "returnData" : HexBytes ,
658
+ "logs" : apply_list_to_array_formatter (log_entry_formatter ),
659
+ "gasUsed" : to_integer_if_hex ,
660
+ "status" : to_integer_if_hex ,
661
+ }
662
+ )
666
663
)
667
664
simulate_v1_result_formatter = apply_formatter_if (
668
665
is_not_null ,
@@ -1252,7 +1249,7 @@ def apply_module_to_formatters(
1252
1249
def get_result_formatters (
1253
1250
method_name : Union [RPCEndpoint , Callable [..., RPCEndpoint ]],
1254
1251
module : "Module" ,
1255
- ) -> Dict [ str , Callable [... , Any ] ]:
1252
+ ) -> Callable [[ RPCResponse ] , Any ]:
1256
1253
formatters = combine_formatters ((PYTHONIC_RESULT_FORMATTERS ,), method_name )
1257
1254
formatters_requiring_module = combine_formatters (
1258
1255
(FILTER_RESULT_FORMATTERS ,), method_name
@@ -1265,7 +1262,7 @@ def get_result_formatters(
1265
1262
1266
1263
def get_error_formatters (
1267
1264
method_name : Union [RPCEndpoint , Callable [..., RPCEndpoint ]],
1268
- ) -> Callable [... , Any ]:
1265
+ ) -> Callable [[ RPCResponse ] , Any ]:
1269
1266
# Note error formatters work on the full response dict
1270
1267
error_formatter_maps = (ERROR_FORMATTERS ,)
1271
1268
formatters = combine_formatters (error_formatter_maps , method_name )
@@ -1275,7 +1272,7 @@ def get_error_formatters(
1275
1272
1276
1273
def get_null_result_formatters (
1277
1274
method_name : Union [RPCEndpoint , Callable [..., RPCEndpoint ]],
1278
- ) -> Callable [... , Any ]:
1275
+ ) -> Callable [[ RPCResponse ] , Any ]:
1279
1276
formatters = combine_formatters ((NULL_RESULT_FORMATTERS ,), method_name )
1280
1277
1281
1278
return compose (* formatters )
0 commit comments