101
101
BlockIdentifier ,
102
102
Formatters ,
103
103
RPCEndpoint ,
104
+ RPCResponse ,
104
105
SimulateV1Payload ,
105
106
StateOverrideParams ,
106
107
TReturn ,
@@ -600,19 +601,15 @@ def storage_key_to_hexstr(value: Union[bytes, int, str]) -> HexStr:
600
601
)
601
602
602
603
block_result_formatters_copy = BLOCK_RESULT_FORMATTERS .copy ()
603
- block_result_formatters_copy .update (
604
- {
605
- "calls" : apply_list_to_array_formatter (
606
- type_aware_apply_formatters_to_dict (
607
- {
608
- "returnData" : HexBytes ,
609
- "logs" : apply_list_to_array_formatter (log_entry_formatter ),
610
- "gasUsed" : to_integer_if_hex ,
611
- "status" : to_integer_if_hex ,
612
- }
613
- )
614
- )
615
- }
604
+ block_result_formatters_copy ["calls" ] = apply_list_to_array_formatter (
605
+ type_aware_apply_formatters_to_dict (
606
+ {
607
+ "returnData" : HexBytes ,
608
+ "logs" : apply_list_to_array_formatter (log_entry_formatter ),
609
+ "gasUsed" : to_integer_if_hex ,
610
+ "status" : to_integer_if_hex ,
611
+ }
612
+ )
616
613
)
617
614
simulate_v1_result_formatter = apply_formatter_if (
618
615
is_not_null ,
@@ -1201,7 +1198,7 @@ def apply_module_to_formatters(
1201
1198
def get_result_formatters (
1202
1199
method_name : Union [RPCEndpoint , Callable [..., RPCEndpoint ]],
1203
1200
module : "Module" ,
1204
- ) -> Dict [ str , Callable [... , Any ] ]:
1201
+ ) -> Callable [[ RPCResponse ] , Any ]:
1205
1202
formatters = combine_formatters ((PYTHONIC_RESULT_FORMATTERS ,), method_name )
1206
1203
formatters_requiring_module = combine_formatters (
1207
1204
(FILTER_RESULT_FORMATTERS ,), method_name
@@ -1214,7 +1211,7 @@ def get_result_formatters(
1214
1211
1215
1212
def get_error_formatters (
1216
1213
method_name : Union [RPCEndpoint , Callable [..., RPCEndpoint ]]
1217
- ) -> Callable [... , Any ]:
1214
+ ) -> Callable [[ RPCResponse ] , Any ]:
1218
1215
# Note error formatters work on the full response dict
1219
1216
error_formatter_maps = (ERROR_FORMATTERS ,)
1220
1217
formatters = combine_formatters (error_formatter_maps , method_name )
@@ -1224,7 +1221,7 @@ def get_error_formatters(
1224
1221
1225
1222
def get_null_result_formatters (
1226
1223
method_name : Union [RPCEndpoint , Callable [..., RPCEndpoint ]]
1227
- ) -> Callable [... , Any ]:
1224
+ ) -> Callable [[ RPCResponse ] , Any ]:
1228
1225
formatters = combine_formatters ((NULL_RESULT_FORMATTERS ,), method_name )
1229
1226
1230
1227
return compose (* formatters )
0 commit comments