diff --git a/py_clob_client/signing/eip712.py b/py_clob_client/signing/eip712.py index abd7758..26ea5b3 100644 --- a/py_clob_client/signing/eip712.py +++ b/py_clob_client/signing/eip712.py @@ -1,7 +1,8 @@ -from eip712_structs import make_domain +from poly_eip712_structs import make_domain +from eth_utils import keccak + from .model import ClobAuth from ..signer import Signer -from web3 import Web3 CLOB_DOMAIN_NAME = "ClobAuthDomain" CLOB_VERSION = "1" @@ -20,7 +21,7 @@ def sign_clob_auth_message(signer: Signer, timestamp: int, nonce: int) -> str: message=MSG_TO_SIGN, ) chain_id = signer.get_chain_id() - auth_struct_hash = Web3.keccak( + auth_struct_hash = "0x" + keccak( clob_auth_msg.signable_bytes(get_clob_auth_domain(chain_id)) - ) - return signer.sign(auth_struct_hash) + ).hex() + return "0x" + signer.sign(auth_struct_hash) diff --git a/py_clob_client/signing/model.py b/py_clob_client/signing/model.py index f9cfa20..ce9a14a 100644 --- a/py_clob_client/signing/model.py +++ b/py_clob_client/signing/model.py @@ -1,4 +1,4 @@ -from eip712_structs import EIP712Struct, Address, String, Uint +from poly_eip712_structs import EIP712Struct, Address, String, Uint class ClobAuth(EIP712Struct): diff --git a/requirements.txt b/requirements.txt index a9787f3..e95e67d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,51 +1,9 @@ -aiohttp==3.8.1 -aiosignal==1.2.0 -async-timeout==4.0.2 -attrs==21.4.0 -base58==2.1.1 -bitarray==1.2.2 -certifi==2021.10.8 -charset-normalizer==2.0.11 -cytoolz==0.11.2 -eip712-structs==1.1.0 -eth-abi==2.1.1 -eth-account==0.5.7 -eth-hash==0.3.2 -eth-keyfile==0.5.1 -eth-keys==0.3.4 -eth-rlp==0.2.1 -eth-typing==2.3.0 -eth-utils==1.10.0 -frozenlist==1.3.0 -hexbytes==0.2.2 -idna==3.3 -iniconfig==1.1.1 -ipfshttpclient==0.8.0a2 -jsonschema==3.2.0 -lru-dict==1.1.7 -multiaddr==0.0.9 -multidict==6.0.2 -netaddr==0.8.0 -packaging==21.3 -parsimonious==0.8.1 -pluggy==1.0.0 -protobuf==3.19.4 -py==1.11.0 -py-order-utils>=0.3.0 -pycryptodome==3.14.0 -pyparsing==3.0.7 -pyrsistent==0.18.1 -pysha3==1.0.2 -pytest==6.2.5 +black==24.4.2 +eth-account===0.13.0 +eth-utils===4.1.1 +poly_eip712_structs==0.0.1 +py_order_utils==0.3.1 +pytest==8.2.2 python-dotenv==0.19.2 -requests==2.27.1 -rlp==2.0.1 -six==1.16.0 -toml==0.10.2 -toolz==0.11.2 -urllib3==1.26.8 -varint==1.0.2 -web3==5.27.0 -websockets==9.1 -yarl==1.7.2 -black==22.3.0 +requests==2.32.3 +websockets==12.0 diff --git a/setup.py b/setup.py index 0d0e86f..68f3a9e 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="py_clob_client", - version="0.17.1", + version="0.17.2", author="Polymarket Engineering", author_email="engineering@polymarket.com", maintainer="Polymarket Engineering", @@ -14,7 +14,14 @@ long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/Polymarket/py-clob-client", - install_requires=["python-dotenv", "py-order-utils>=0.1.3"], + install_requires=[ + "eth-account>=0.13.0", + "eth-utils>=4.1.1", + "poly_eip712_structs>=0.0.1", + "py-order-utils>=0.3.1", + "python-dotenv", + "requests" + ], project_urls={ "Bug Tracker": "https://github.com/Polymarket/py-clob-client/issues", },