Skip to content
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: 0 additions & 1 deletion packages/core/jpyc_core_sdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

__version__ = version("jpyc-core-sdk")
__all__ = [
# "__version__",
# client
"SdkClient",
# jpyc
Expand Down
3 changes: 2 additions & 1 deletion packages/core/jpyc_core_sdk/client.py
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion packages/core/pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 3 additions & 1 deletion tests/core/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.