diff --git a/packages/core/jpyc_core_sdk/__init__.py b/packages/core/jpyc_core_sdk/__init__.py index 0e637ed..8f5a987 100644 --- a/packages/core/jpyc_core_sdk/__init__.py +++ b/packages/core/jpyc_core_sdk/__init__.py @@ -5,7 +5,6 @@ __version__ = version("jpyc-core-sdk") __all__ = [ - # "__version__", # client "SdkClient", # jpyc diff --git a/packages/core/jpyc_core_sdk/client.py b/packages/core/jpyc_core_sdk/client.py index 01ee77b..d2bafea 100644 --- a/packages/core/jpyc_core_sdk/client.py +++ b/packages/core/jpyc_core_sdk/client.py @@ -1,6 +1,7 @@ from eth_account.signers.local import LocalAccount from pydantic import validate_call from web3 import Account, HTTPProvider, Web3 +from web3._utils.empty import empty from web3.middleware import ( ExtraDataToPOAMiddleware, SignAndSendRawMiddlewareBuilder, @@ -98,7 +99,7 @@ def __configure_w3( layer=0, ) else: - w3.eth.default_account = None # type: ignore[assignment] + w3.eth.default_account = empty return w3 diff --git a/packages/core/pyproject.toml b/packages/core/pyproject.toml index c006a48..8785e90 100644 --- a/packages/core/pyproject.toml +++ b/packages/core/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "jpyc-core-sdk" -version = "1.0.3" +version = "1.0.4" requires-python = ">=3.12" license = "MIT" description = "A Python SDK for interacting with JPYCv2 contracts" diff --git a/pyproject.toml b/pyproject.toml index 01b294c..35c5fdc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "jpyc-python-sdks" -version = "1.0.3" +version = "1.0.4" requires-python = ">=3.12" description = "Python SDKs for JPYC protocols" readme = "README.md" diff --git a/tests/core/test_client.py b/tests/core/test_client.py index b42b7dd..707043d 100644 --- a/tests/core/test_client.py +++ b/tests/core/test_client.py @@ -2,6 +2,7 @@ from pydantic import ValidationError import pytest from web3 import Web3 +from web3._utils.empty import empty from packages.core.jpyc_core_sdk.client import SdkClient from packages.core.jpyc_core_sdk.utils.chains import get_default_rpc_endpoint @@ -78,6 +79,7 @@ def test_constructor( ) if private_key is None: assert client.account is None + assert client.w3.eth.default_account == empty else: assert isinstance(client.account, LocalAccount) assert client.account.address == address @@ -242,7 +244,7 @@ def test_set_account( assert sdk_client.w3.eth.default_account == address else: assert account is None - assert sdk_client.w3.eth.default_account is None + assert sdk_client.w3.eth.default_account == empty def test_set_account_failures(sdk_client): diff --git a/uv.lock b/uv.lock index bd3f93f..11e2588 100644 --- a/uv.lock +++ b/uv.lock @@ -547,7 +547,7 @@ wheels = [ [[package]] name = "jpyc-core-sdk" -version = "1.0.3" +version = "1.0.4" source = { editable = "packages/core" } dependencies = [ { name = "eth-typing" }, @@ -582,7 +582,7 @@ dev = [ [[package]] name = "jpyc-python-sdks" -version = "1.0.3" +version = "1.0.4" source = { virtual = "." } [package.dev-dependencies]