Skip to content

Commit 91c8c51

Browse files
committed
Add comment on order of request formatters
1 parent 871c1fb commit 91c8c51

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

web3/_utils/method_formatters.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,12 @@ def get_request_formatters(
499499
) -> Dict[str, Callable[..., Any]]:
500500
request_formatter_maps = (
501501
ABI_REQUEST_FORMATTERS,
502-
PYTHONIC_REQUEST_FORMATTERS,
502+
# METHOD_NORMALIZERS needs to be after ABI_REQUEST_FORMATTERS
503+
# so that eth_getLogs's apply_formatter_at_index formatter
504+
# is applied to the whole address
505+
# rather than on the first byte of the address
503506
METHOD_NORMALIZERS,
507+
PYTHONIC_REQUEST_FORMATTERS,
504508
)
505509
formatters = combine_formatters(request_formatter_maps, method_name)
506510
return compose(*formatters)

0 commit comments

Comments
 (0)