From 08cbd32f30ddd11e0586dbd35d3a5febe4d9458c Mon Sep 17 00:00:00 2001 From: Keri Date: Mon, 12 Oct 2020 10:50:03 -0600 Subject: [PATCH] Add comment on order of request formatters --- web3/_utils/method_formatters.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web3/_utils/method_formatters.py b/web3/_utils/method_formatters.py index 67d4560f40..092282a520 100644 --- a/web3/_utils/method_formatters.py +++ b/web3/_utils/method_formatters.py @@ -500,8 +500,12 @@ def get_request_formatters( ) -> Dict[str, Callable[..., Any]]: request_formatter_maps = ( ABI_REQUEST_FORMATTERS, - PYTHONIC_REQUEST_FORMATTERS, + # METHOD_NORMALIZERS needs to be after ABI_REQUEST_FORMATTERS + # so that eth_getLogs's apply_formatter_at_index formatter + # is applied to the whole address + # rather than on the first byte of the address METHOD_NORMALIZERS, + PYTHONIC_REQUEST_FORMATTERS, ) formatters = combine_formatters(request_formatter_maps, method_name) return compose(*formatters)