You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "test.py", line 11, in <module>
print(s.to_message(domain))
File "site-packages/eip712_structs/struct.py", line 165, in to_message
structs = {domain, self}
File "site-packages/eip712_structs/struct.py", line 315, in __hash__
value_hashes = [hash(k) ^ hash(v) for k, v in self.values.items()]
File "site-packages/eip712_structs/struct.py", line 315, in <listcomp>
value_hashes = [hash(k) ^ hash(v) for k, v in self.values.items()]
TypeError: unhashable type: 'list'
Activity
numpde commentedon Jun 22, 2022
Same problem here. How about changing to
structs = [domain, self]in that line?
gqoew commentedon Jun 28, 2022
I have the same error when I used
.to_message()on Arraysand when I use
.signable_bytes(domain)I get:AttributeError: 'bytes' object has no attribute 'version'PierreMkt commentedon Jul 14, 2022
Same error. Any workaround found ?
jvinet commentedon Jul 20, 2022
This project appears to be dormant. I used a custom solution instead: https://github.com/jvinet/eip712
Perhaps it can work for you, too.
josh-davis-vicinft commentedon Dec 22, 2022
This is fixed in my branch at https://github.com/ViciNFT/py-eip712-structs. The answer posted by @numpde is part of the solution, and there were a few other changes required.
hao0707 commentedon Feb 15, 2023
Arrayshould pass variables of type tuple.Like this:byte_array = tuple([os.urandom(32) for _ in range(4)])BoboTiG commentedon Oct 18, 2024
FTR it's fixed on my fork (available on PyPI): https://github.com/BoboTiG/py-eip712-structs-ng