Skip to content

Commit 24f33ea

Browse files
authored
Loosen eth deps requirement (#85)
* Loosen eth-utils requirement * Use encode_typed_data instead of encode_structured_data
1 parent 124098d commit 24f33ea

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

hyperliquid/utils/signing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from decimal import Decimal
33

44
import msgpack
5-
from eth_account.messages import encode_structured_data
5+
from eth_account.messages import encode_typed_data
66
from eth_utils import keccak, to_hex
77

88
from hyperliquid.utils.types import Cloid, Literal, NotRequired, Optional, TypedDict, Union
@@ -358,7 +358,7 @@ def sign_approve_builder_fee(wallet, action, is_mainnet):
358358

359359

360360
def sign_inner(wallet, data):
361-
structured_data = encode_structured_data(data)
361+
structured_data = encode_typed_data(full_message=data)
362362
signed = wallet.sign_message(structured_data)
363363
return {"r": to_hex(signed["r"]), "s": to_hex(signed["s"]), "v": signed["v"]}
364364

poetry.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ classifiers = [ #! Update me
4040

4141
[tool.poetry.dependencies]
4242
python = "^3.8"
43-
eth-utils = "^2.1.0"
44-
eth-abi = "^4.1.0"
45-
eth-account = "^0.10.0"
43+
eth-utils = ">=2.1.0,<6.0.0"
44+
eth-account = ">=0.10.0,<0.14.0"
4645
websocket-client = "^1.5.1"
4746
requests = "^2.31.0"
4847
msgpack = "^1.0.5"

0 commit comments

Comments
 (0)