Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement cchecksum for ~2x faster checksumming #2404

Merged
merged 5 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 2 additions & 8 deletions src/ape/managers/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/ape_accounts/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/ape_ethereum/ecosystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -17,7 +18,6 @@
is_hex_address,
keccak,
to_bytes,
to_checksum_address,
to_hex,
)
from ethpm_types.abi import ABIType, ConstructorABI, EventABI, MethodABI
Expand Down
Loading