fix: bump eth-account minimum version to >=0.13.5 #158
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
The Hyperliquid client expects
LocalAccount.sign_typed_data
(EIP-712) to exist, but older eth-account releases (e.g. 0.10.x) do not expose that method. As a result, calls tosign_l1_action
fail with:AttributeError: 'LocalAccount' object has no attribute 'sign_typed_data'
Where the error occured:
Bump the minimum eth-account version so that EIP-712 signing is guaranteed to work.
Changes
In
pyproject.toml
, replaced:Rationale
Versions of eth-account prior to 0.13.5 lack the
LocalAccount.sign_typed_data
method. Hyperliquid’ssign_l1_action
callswallet.sign_typed_data(...)
under the hood, so we must require a release that implements EIP-712 “typed data” signing. Pinningeth-account >=0.13.5
ensures compatibility without breaking other dependencies.Testing
Opened a Python REPL (using the locked environment):
sign_typed_data
method, which is did not:Checked against the Latest Client Version after updating
Re-tried and confirmed that it now contained the method:
Please let me know if any modifications are needed.