diff --git a/dank_mids/controller.py b/dank_mids/controller.py index 9632075b..b93dba1e 100644 --- a/dank_mids/controller.py +++ b/dank_mids/controller.py @@ -6,7 +6,7 @@ import eth_retry from cchecksum import to_checksum_address from eth_typing import BlockNumber, ChecksumAddress -from evmspec._ids import ChainId +from evmspec.data import ChainId from msgspec import Struct from multicall.constants import MULTICALL2_ADDRESSES, MULTICALL_ADDRESSES from multicall.multicall import NotSoBrightBatcher diff --git a/dank_mids/eth.py b/dank_mids/eth.py index 63f80e8b..6decec57 100644 --- a/dank_mids/eth.py +++ b/dank_mids/eth.py @@ -16,10 +16,11 @@ from async_property import async_cached_property from eth_typing import BlockNumber from evmspec import AnyTransaction, FilterTrace, Transaction, TransactionRLP, TransactionReceipt -from evmspec.block import TinyBlock -from evmspec.data import TransactionHash, UnixTimestamp, _DecodeHook, _decode_hook -from evmspec.log import Log -from evmspec.receipt import Status +from evmspec.data import TransactionHash, UnixTimestamp, _decode_hook +from evmspec.data._main import DecodeHook +from evmspec.structs.block import TinyBlock +from evmspec.structs.log import Log +from evmspec.structs.receipt import Status from msgspec import Raw, Struct, ValidationError, json from web3._utils.blocks import select_method_for_block_identifier from web3._utils.rpc_abi import RPC @@ -137,7 +138,7 @@ async def get_transaction_receipt( self, *args, decode_to: Type[T] = TransactionReceipt, - decode_hook: _DecodeHook[T] = _decode_hook, + decode_hook: DecodeHook[T] = _decode_hook, **kwargs, ) -> T: """ @@ -173,7 +174,7 @@ async def trace_filter( self, filter_params: TraceFilterParams, decode_to: Type[T] = List[FilterTrace], - decode_hook: _DecodeHook[T] = _decode_hook, + decode_hook: DecodeHook[T] = _decode_hook, ) -> T: """ Returns all traces matching a filter. If the decoding to the specified @@ -249,7 +250,7 @@ async def get_logs( self, *args, decode_to: Type[T] = Tuple[Log, ...], # type: ignore [assignment] - decode_hook: _DecodeHook[T] = _decode_hook, + decode_hook: DecodeHook[T] = _decode_hook, **kwargs, ) -> T: """ diff --git a/dank_mids/types.py b/dank_mids/types.py index 611b9742..15f3b7a4 100644 --- a/dank_mids/types.py +++ b/dank_mids/types.py @@ -28,10 +28,9 @@ import evmspec from dictstruct import DictStruct from eth_typing import ChecksumAddress, HexStr -from evmspec._ids import ChainId -from evmspec.block import BaseBlock, Block, MinedBlock, ShanghaiCapellaBlock -from evmspec.data import Address, BlockNumber, Wei, uint, _decode_hook -from evmspec.log import Log +from evmspec.data import Address, BlockNumber, ChainId, Wei, uint, _decode_hook +from evmspec.structs.block import BaseBlock, Block, MinedBlock, ShanghaiCapellaBlock +from evmspec.structs.log import Log from hexbytes import HexBytes from msgspec import UNSET, Raw, ValidationError, json from web3.datastructures import AttributeDict diff --git a/poetry.lock b/poetry.lock index 399e96b1..c8e1375f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1986,13 +1986,13 @@ test = ["hypothesis (>=4.43.0)", "mypy (==0.971)", "pytest (>=7.0.0)", "pytest-x [[package]] name = "evmspec" -version = "0.0.7" +version = "0.1.0" description = "A collection of msgspec.Struct definitions for use with the Ethereum Virtual Machine" optional = false python-versions = "<3.13,>=3.8" files = [ - {file = "evmspec-0.0.7-py3-none-any.whl", hash = "sha256:922e4d276aa46c412afd84eff730a1cb9aaefa0d2d87586027d0a52eaf49d494"}, - {file = "evmspec-0.0.7.tar.gz", hash = "sha256:41f6be3c7a1dd30dc377117723c37c7efe071ec8cffd9cab2fe530a252ce3b43"}, + {file = "evmspec-0.1.0-py3-none-any.whl", hash = "sha256:b9f55620d7292d7e42d126826f17bede49f7256914491186e4da5fb13b21a64d"}, + {file = "evmspec-0.1.0.tar.gz", hash = "sha256:f923543084675305d7a8d78cf4250872af4cc493c02d45f3b031d6dfd6ef9b96"}, ] [package.dependencies] @@ -5097,4 +5097,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = ">=3.8,<3.13" -content-hash = "be6d86894a3b70b8d848e7076165028f616958598811f9c5793335041609a781" +content-hash = "af5564192b9030c4a896eed70563dc95f3fc109a018c96b0e7c25d71595c81fa" diff --git a/pyproject.toml b/pyproject.toml index 73733988..308f65e9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ python = ">=3.8,<3.13" aiofiles = "*" cchecksum = ">=0.0.3,<1" eth-retry = ">=0.1.15,<0.2" -evmspec = ">=0.0.1,<0.1" +evmspec = ">=0.1.0,<0.2" ez-a-sync = ">=0.24.13,<1" multicall = ">=0.6.2,<1" typed-envs = ">=0.0.5,<0.1"