From cf4c73f2bcc51e9e469ee4625c2110813cda55ad Mon Sep 17 00:00:00 2001 From: Daniel Schiavini Date: Fri, 24 May 2024 10:49:02 +0200 Subject: [PATCH] Update era node and eth_account --- .github/workflows/unit-tests.yaml | 2 +- tests/unitary/pool/token/conftest.py | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index 93e43f69..988c681f 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -34,7 +34,7 @@ jobs: --silent --output /usr/local/bin/zkvyper && \ chmod +x /usr/local/bin/zkvyper && \ zkvyper --version - curl --location https://github.com/matter-labs/era-test-node/releases/download/v0.1.0-alpha.21/era_test_node-v0.1.0-alpha.21-x86_64-unknown-linux-gnu.tar.gz \ + curl --location https://github.com/matter-labs/era-test-node/releases/download/v0.1.0-alpha.22/era_test_node-v0.1.0-alpha.22-x86_64-unknown-linux-gnu.tar.gz \ --silent --output era_test_node.tar.gz && \ tar --extract --file=era_test_node.tar.gz && \ mv era_test_node /usr/local/bin/era_test_node && \ diff --git a/tests/unitary/pool/token/conftest.py b/tests/unitary/pool/token/conftest.py index f4149cb2..d204b380 100644 --- a/tests/unitary/pool/token/conftest.py +++ b/tests/unitary/pool/token/conftest.py @@ -3,11 +3,7 @@ import boa import pytest from eth_account import Account as EthAccount -from eth_account._utils.structured_data.hashing import ( - hash_domain, - hash_message, -) -from eth_account.messages import SignableMessage +from eth_account.messages import encode_typed_data from hexbytes import HexBytes @@ -50,9 +46,7 @@ def _sign_permit(swap, owner, spender, value, deadline): nonce=swap.nonces(owner.address), deadline=deadline, ) - signable_message = SignableMessage( - b"\x01", hash_domain(struct), hash_message(struct) - ) + signable_message = encode_typed_data(full_message=struct) return EthAccount.sign_message(signable_message, owner._private_key) return _sign_permit