Skip to content

Commit 08cbd32

Browse files
committed
Add comment on order of request formatters
1 parent f8f72fb commit 08cbd32

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
@@ -500,8 +500,12 @@ def get_request_formatters(
500500
) -> Dict[str, Callable[..., Any]]:
501501
request_formatter_maps = (
502502
ABI_REQUEST_FORMATTERS,
503-
PYTHONIC_REQUEST_FORMATTERS,
503+
# METHOD_NORMALIZERS needs to be after ABI_REQUEST_FORMATTERS
504+
# so that eth_getLogs's apply_formatter_at_index formatter
505+
# is applied to the whole address
506+
# rather than on the first byte of the address
504507
METHOD_NORMALIZERS,
508+
PYTHONIC_REQUEST_FORMATTERS,
505509
)
506510
formatters = combine_formatters(request_formatter_maps, method_name)
507511
return compose(*formatters)

0 commit comments

Comments
 (0)