diff --git a/setup.py b/setup.py index 503c6886fc..1022c5f157 100644 --- a/setup.py +++ b/setup.py @@ -99,6 +99,7 @@ "ipython>=8.18.1,<9", "lazyasd>=0.1.4", "asttokens>=2.4.1,<3", # Peer dependency; w/o pin container build fails. + "cchecksum>=0.0.3,<1", # Pandas peer-dep: Numpy 2.0 causes issues for some users. "numpy<2", "packaging>=23.0,<24", diff --git a/src/ape/managers/converters.py b/src/ape/managers/converters.py index 6fe23788b8..3bb2dbb377 100644 --- a/src/ape/managers/converters.py +++ b/src/ape/managers/converters.py @@ -5,17 +5,11 @@ from functools import cached_property from typing import TYPE_CHECKING, Any, Union +from cchecksum import to_checksum_address from dateutil.parser import parse from eth_pydantic_types import Address, HexBytes from eth_typing.evm import ChecksumAddress -from eth_utils import ( - is_0x_prefixed, - is_checksum_address, - is_hex, - is_hex_address, - to_checksum_address, - to_int, -) +from eth_utils import is_0x_prefixed, is_checksum_address, is_hex, is_hex_address, to_int from ape.api.address import BaseAddress from ape.api.convert import ConverterAPI diff --git a/src/ape_accounts/_cli.py b/src/ape_accounts/_cli.py index f6708a0417..a146d231a2 100644 --- a/src/ape_accounts/_cli.py +++ b/src/ape_accounts/_cli.py @@ -3,7 +3,8 @@ from typing import TYPE_CHECKING, Optional import click -from eth_utils import to_checksum_address, to_hex +from cchecksum import to_checksum_address +from eth_utils import to_hex from ape.cli.arguments import existing_alias_argument, non_existing_alias_argument from ape.cli.options import ape_cli_context diff --git a/src/ape_ethereum/ecosystem.py b/src/ape_ethereum/ecosystem.py index 86ea1b3d16..115f30e793 100644 --- a/src/ape_ethereum/ecosystem.py +++ b/src/ape_ethereum/ecosystem.py @@ -4,6 +4,7 @@ from functools import cached_property from typing import TYPE_CHECKING, Any, ClassVar, Optional, Union, cast +from cchecksum import to_checksum_address from eth_abi import decode, encode from eth_abi.exceptions import InsufficientDataBytes, NonEmptyPaddingBytes from eth_pydantic_types import HexBytes @@ -17,7 +18,6 @@ is_hex_address, keccak, to_bytes, - to_checksum_address, to_hex, ) from ethpm_types.abi import ABIType, ConstructorABI, EventABI, MethodABI