fix: bump eth-account minimum version to >=0.13.5#158
Open
vinayyak wants to merge 1 commit intohyperliquid-dex:masterfrom
Open
fix: bump eth-account minimum version to >=0.13.5#158vinayyak wants to merge 1 commit intohyperliquid-dex:masterfrom
vinayyak wants to merge 1 commit intohyperliquid-dex:masterfrom
Conversation
Contributor
|
You need to also update poetry.lock when updating dependencies. See the errors in the failing CI run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_actionfail 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_datamethod. Hyperliquid’ssign_l1_actioncallswallet.sign_typed_data(...)under the hood, so we must require a release that implements EIP-712 “typed data” signing. Pinningeth-account >=0.13.5ensures compatibility without breaking other dependencies.Testing
Opened a Python REPL (using the locked environment):
sign_typed_datamethod, 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.