Skip to content
Open
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
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,13 @@
include_package_data=True,
install_requires=[
"apepay>=0.3.5,<1",
"cchecksum>=0.0.3", # lower pin only, `eth-ape` governs upper pin
"click", # Use same version as eth-ape
"eth-ape>=0.8.31,<1",
"ethpm-types>=0.6.10", # lower pin only, `eth-ape` governs upper pin
"eth-pydantic-types", # Use same version as eth-ape
"exceptiongroup; python_version < '3.11'", # Used with TaskGroup
"faster-eth-utils>=2.1.0", # lower pin only, `eth-ape` governs upper pin
"httpx>=0.28,<1", # Use for Cluster client, auth
"jwcrypto>=1.4,<2", # Use for auth
"packaging", # Use same version as eth-ape
Expand Down
2 changes: 1 addition & 1 deletion silverback/cluster/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from ape.types import AddressType, HexBytes
from cryptography.exceptions import InvalidSignature
from cryptography.hazmat.primitives.hmac import HMAC, hashes
from eth_utils import to_bytes, to_int
from faster_eth_utils import to_bytes, to_int
from pydantic import BaseModel, Field, computed_field, field_validator
from typing_extensions import Self

Expand Down
2 changes: 1 addition & 1 deletion silverback/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
from ape.types import AddressType, ContractLog
from ape.utils import ManagerAccessMixin
from eth_typing import HexStr
from eth_utils import keccak, to_hex
from ethpm_types.abi import encode_topic_value
from faster_eth_utils import keccak, to_hex
from packaging.version import Version
from pydantic import BaseModel
from taskiq import AsyncTaskiqDecoratedTask, TaskiqEvents
Expand Down
2 changes: 1 addition & 1 deletion silverback/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from ape import chain
from ape.logging import logger
from ape.utils import ManagerAccessMixin
from eth_utils import to_checksum_address
from cchecksum import to_checksum_address
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't it make sense to re-export this via your package? (to maintain compatibility)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's a good idea but it isn't currently implemented and I have a bit of a pile in front of me to work thru first. Up to you how to handle it here for the time being. The faster implementation is still faster, just less magnitude of difference.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The most recent faster-eth-utils now uses the implementation from cchecksum

So it depends on how tight you'd like the pin to be

from ethpm_types import EventABI
from packaging.specifiers import SpecifierSet
from packaging.version import Version
Expand Down
4 changes: 2 additions & 2 deletions silverback/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from ape.types import HexBytes
from eth_typing import HexStr
from eth_utils import to_hex
from faster_eth_utils import to_hex

Topic = list[HexStr] | HexStr | None

Expand Down Expand Up @@ -34,7 +34,7 @@ def decode_topics_from_string(encoded_topics: str) -> list[Topic]:
# NOTE: Should reverse the above
return _clean_trailing_nones(
[
_simplify_topic([to_hex(hexstr=t) for t in et.split(",")]) if et else None
_simplify_topic([to_hex(hexstr=t) for t in et.split(",")]) if et else None # type: ignore [arg-type] noqa: E501
for et in encoded_topics.split(";")
]
)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cluster.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from eth_utils import to_checksum_address
from cchecksum import to_checksum_address
from hypothesis import given
from hypothesis import strategies as st
from hypothesis_jsonschema import from_schema
Expand Down
Loading