-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move abi formatters to _utils.method_formatters
- Loading branch information
Showing
4 changed files
with
30 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,11 @@ | ||
from web3._utils.normalizers import ( | ||
abi_address_to_hex, | ||
abi_bytes_to_hex, | ||
abi_int_to_hex, | ||
abi_string_to_hex, | ||
) | ||
from web3._utils.rpc_abi import ( | ||
RPC_ABIS, | ||
abi_request_formatters, | ||
from web3._utils.method_formatters import ( | ||
ABI_REQUEST_FORMATTERS, | ||
) | ||
|
||
from .formatting import ( | ||
construct_formatting_middleware, | ||
) | ||
|
||
STANDARD_NORMALIZERS = [ | ||
abi_bytes_to_hex, | ||
abi_int_to_hex, | ||
abi_string_to_hex, | ||
abi_address_to_hex, | ||
] | ||
|
||
|
||
abi_middleware = construct_formatting_middleware( | ||
request_formatters=abi_request_formatters(STANDARD_NORMALIZERS, RPC_ABIS) | ||
request_formatters=ABI_REQUEST_FORMATTERS | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters